Index: src/ia32/lithium-codegen-ia32.cc |
=================================================================== |
--- src/ia32/lithium-codegen-ia32.cc (revision 6698) |
+++ src/ia32/lithium-codegen-ia32.cc (working copy) |
@@ -1021,6 +1021,36 @@ |
} |
+void LCodeGen::DoNegI(LNegI* instr) { |
+ Register input = ToRegister(instr->InputAt(0)); |
+ if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
+ __ test(eax, Operand(eax)); |
Kevin Millikin (Chromium)
2011/02/11 12:12:59
eax ==> input?
fschneider
2011/02/11 12:44:12
Thanks, of course.
|
+ DeoptimizeIf(zero, instr->environment()); |
+ } |
+ __ neg(input); |
+ if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { |
+ DeoptimizeIf(overflow, instr->environment()); |
+ } |
+} |
+ |
+ |
+void LCodeGen::DoNegD(LNegD* instr) { |
+ XMMRegister reg = ToDoubleRegister(instr->InputAt(0)); |
+ Register temp = ToRegister(instr->TempAt(0)); |
+ __ Set(temp, Immediate(0x80000000)); |
+ __ movd(xmm0, Operand(temp)); |
+ __ psllq(xmm0, 32); |
Kevin Millikin (Chromium)
2011/02/11 12:12:59
Gesundheit.
Vitaly Repeshko
2011/02/11 17:17:56
It might be faster to load the minus zero constant
|
+ __ xorpd(reg, xmm0); |
+} |
+ |
+ |
+void LCodeGen::DoNegT(LNegT* instr) { |
+ UnaryOverwriteMode overwrite = UNARY_NO_OVERWRITE; |
+ GenericUnaryOpStub stub(Token::SUB, overwrite, NO_UNARY_FLAGS); |
+ CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
+} |
+ |
+ |
void LCodeGen::DoThrow(LThrow* instr) { |
__ push(ToOperand(instr->InputAt(0))); |
CallRuntime(Runtime::kThrow, 1, instr); |