diff options
author | Sverker Eriksson <[email protected]> | 2011-11-18 17:42:28 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-11-18 17:42:28 +0100 |
commit | 7d9ef0fdde8119e1be0a47e3e45c9cdb85f926d8 (patch) | |
tree | f9cbbd41ccf67517b8d9c7423ee2b3d64c6bba31 /erts/emulator/hipe/hipe_bif0.c | |
parent | b130455e73b0bcacee2bfd3dfe6bafa9dd497886 (diff) | |
parent | 327c072661840f671fc0041bc5e88bc69691d5aa (diff) | |
download | otp-7d9ef0fdde8119e1be0a47e3e45c9cdb85f926d8.tar.gz otp-7d9ef0fdde8119e1be0a47e3e45c9cdb85f926d8.tar.bz2 otp-7d9ef0fdde8119e1be0a47e3e45c9cdb85f926d8.zip |
Merge branch 'sverk/hipe-without-fpe/OTP-9724'
* sverk/hipe-without-fpe/OTP-9724:
otp_build: Disable FPE by default on Linux
stdlib: Make sure qlc_SUITE:otp_6964 restores backtrace_depth
erts: Add test for inf/NaN intermediate float results
hipe,erts: Allow hipe without floating point exceptions
hipe: Fix bug in hipe_rtl_lcm:calc_killed_expr_bb
erts: Rename macros used by float instructions without FPE
Diffstat (limited to 'erts/emulator/hipe/hipe_bif0.c')
-rw-r--r-- | erts/emulator/hipe/hipe_bif0.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c index e7fb850530..cec22b3836 100644 --- a/erts/emulator/hipe/hipe_bif0.c +++ b/erts/emulator/hipe/hipe_bif0.c @@ -985,6 +985,26 @@ BIF_RETTYPE hipe_conv_big_to_float(BIF_ALIST_1) BIF_RET(res); } +#ifdef NO_FPE_SIGNALS + +/* + This is the current solution to make hipe run without FPE. + The native code is the same except that a call to this primop + is made after _every_ float operation to check the result. + The native fcheckerror still done later will detect if an + "emulated" FPE has occured. + We use p->hipe.float_result to avoid passing a 'double' argument, + which has its own calling convention (on amd64 at least). + Simple and slow... +*/ +void hipe_emulate_fpe(Process* p) +{ + if (!finite(p->hipe.float_result)) { + p->fp_exception = 1; + } +} +#endif + #if 0 /* XXX: unused */ /* * At least parts of this should be inlined in native code. |