Add support for truncation operators
Created attachment 296382 [details] Patch
Comment on attachment 296382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=296382&action=review r=me > Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:1316 > + // instructions are the same. Otherwise, we subtract need to int64_t::min() convert then add it back. Otherwise, we need to: subtract int64_t::min(); truncate double to uint64_t; then add back int64_t::min(). > Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:1324 > + m_assembler.movq_i64r(0x8000000000000000, scratchRegister()); Let's use numeric_limits<int64_t>::min() here instead of 0x8. > Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:1356 > + m_assembler.movq_i64r(0x8000000000000000, scratchRegister()); Samesies. > Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:1043 > + constant = m_currentBlock->appendNew<ConstDoubleValue>(m_proc, Origin(), bitwise_cast<double>(0x43e0000000000000)); static_cast<double>(numeric_limits<int64_t>::min()) > Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:1108 > + constant = m_currentBlock->appendNew<ConstFloatValue>(m_proc, Origin(), bitwise_cast<float>(0x5f000000)); static_cast<float>(numeric_limits<int64_t>::min())
Committed r209476: <http://trac.webkit.org/changeset/209476>