Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 83aef7801a70bc663815a9270b61eb5b9df33af1..e81144a244abccd94fcf33c0f5d243dfda03dcd1 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -134,10 +134,7 @@ void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg, |
Set(result_reg, Immediate(0)); |
ucomisd(input_reg, scratch_reg); |
j(below, &done, Label::kNear); |
- ExternalReference half_ref = ExternalReference::address_of_one_half(); |
- movdbl(scratch_reg, Operand::StaticVariable(half_ref)); |
- addsd(scratch_reg, input_reg); |
- cvttsd2si(result_reg, Operand(scratch_reg)); |
+ cvtsd2si(result_reg, input_reg); |
test(result_reg, Immediate(0xFFFFFF00)); |
j(zero, &done, Label::kNear); |
Set(result_reg, Immediate(255)); |