diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-14 13:24:58 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-14 13:24:58 -0800 |
commit | 7a3353756f29d3885fb361bf984c67e9d61be1bd (patch) | |
tree | b768ed3fa4d018ac6b83dd336d3c3cf567158a6b /lib/Target/CppBackend | |
parent | 02ab691e5965b6500886edea8289f3fac792ef75 (diff) |
fix FPtoIHigh
Diffstat (limited to 'lib/Target/CppBackend')
-rw-r--r-- | lib/Target/CppBackend/CallHandlers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/CppBackend/CallHandlers.h b/lib/Target/CppBackend/CallHandlers.h index d68237466a..e126b34bb9 100644 --- a/lib/Target/CppBackend/CallHandlers.h +++ b/lib/Target/CppBackend/CallHandlers.h @@ -48,7 +48,7 @@ DEF_CALL_HANDLER(FPtoILow, { DEF_CALL_HANDLER(FPtoIHigh, { std::string Input = getValueAsStr(CI->getArgOperand(0)); - return getAssign(getCppName(CI), CI->getType()) + "Math_abs(" + Input + ") >= 1.0 ? " + Input + " > 0.0 ? (Math_min(+Math_floor(" + Input + " / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Math_ceil((" + Input + " - +(~~" + Input + " >>> 0)) / 4294967296.0) >>> 0 : 0)"; + return getAssign(getCppName(CI), CI->getType()) + "Math_abs(" + Input + ") >= +1 ? " + Input + " > +0 ? (Math_min(+Math_floor(" + Input + " / +4294967296), +4294967295) | 0) >>> 0 : ~~+Math_ceil((" + Input + " - +(~~" + Input + " >>> 0)) / +4294967296) >>> 0 : 0"; }) DEF_CALL_HANDLER(llvm_nacl_atomic_store_i32, { |