Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 7d621a34fd972d767ab7f154fb1f994f8c153f76..422e966c0b844a8b548496b6ccb3cf5ff7b5f58d 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -155,6 +155,24 @@ void MacroAssembler::ClampUint8(Register reg) { |
} |
+static double kUint32Bias = |
+ static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1; |
+ |
+ |
+void MacroAssembler::LoadUint32(XMMRegister dst, |
+ Register src, |
+ XMMRegister scratch) { |
+ Label done; |
+ cmp(src, Immediate(0)); |
+ movdbl(scratch, |
+ Operand(reinterpret_cast<int32_t>(&kUint32Bias), RelocInfo::NONE)); |
+ cvtsi2sd(dst, src); |
+ j(not_sign, &done, Label::kNear); |
+ addsd(dst, scratch); |
+ bind(&done); |
+} |
+ |
+ |
void MacroAssembler::RecordWriteArray(Register object, |
Register value, |
Register index, |