Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2243 int offset = sizeof(kHoleNanUpper32); | 2243 int offset = sizeof(kHoleNanUpper32); |
| 2244 __ cmpl(MemOperand(rsp, -offset), Immediate(kHoleNanUpper32)); | 2244 __ cmpl(MemOperand(rsp, -offset), Immediate(kHoleNanUpper32)); |
| 2245 EmitBranch(instr, equal); | 2245 EmitBranch(instr, equal); |
| 2246 } | 2246 } |
| 2247 | 2247 |
| 2248 | 2248 |
| 2249 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { | 2249 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { |
| 2250 Representation rep = instr->hydrogen()->value()->representation(); | 2250 Representation rep = instr->hydrogen()->value()->representation(); |
| 2251 ASSERT(!rep.IsInteger32()); | 2251 ASSERT(!rep.IsInteger32()); |
| 2252 Label if_false; | 2252 Label if_false; |
| 2253 | 2253 __ int3(); |
|
Jakob Kummerow
2013/11/12 15:10:02
Might wanna remove this before landing.
| |
| 2254 if (rep.IsDouble()) { | 2254 if (rep.IsDouble()) { |
| 2255 XMMRegister value = ToDoubleRegister(instr->value()); | 2255 XMMRegister value = ToDoubleRegister(instr->value()); |
| 2256 XMMRegister xmm_scratch = double_scratch0(); | 2256 XMMRegister xmm_scratch = double_scratch0(); |
| 2257 __ xorps(xmm_scratch, xmm_scratch); | 2257 __ xorps(xmm_scratch, xmm_scratch); |
| 2258 __ ucomisd(xmm_scratch, value); | 2258 __ ucomisd(xmm_scratch, value); |
| 2259 __ j(not_equal, &if_false); | 2259 __ j(not_equal, &if_false); |
| 2260 __ movmskpd(kScratchRegister, value); | 2260 __ movmskpd(kScratchRegister, value); |
| 2261 __ testl(kScratchRegister, Immediate(1)); | 2261 __ testl(kScratchRegister, Immediate(1)); |
| 2262 EmitBranch(instr, not_zero); | 2262 EmitBranch(instr, not_zero); |
| 2263 } else { | 2263 } else { |
| 2264 Register value = ToRegister(instr->value()); | 2264 Register value = ToRegister(instr->value()); |
| 2265 Handle<Map> map = masm()->isolate()->factory()->heap_number_map(); | 2265 Handle<Map> map = masm()->isolate()->factory()->heap_number_map(); |
| 2266 __ CheckMap(rax, map, &if_false, DO_SMI_CHECK); | 2266 __ CheckMap(value, map, &if_false, DO_SMI_CHECK); |
| 2267 __ cmpl(FieldOperand(value, HeapNumber::kExponentOffset), | 2267 __ cmpl(FieldOperand(value, HeapNumber::kExponentOffset), |
| 2268 Immediate(0x80000000)); | 2268 Immediate(0x80000000)); |
| 2269 __ j(not_equal, &if_false); | 2269 __ j(not_equal, &if_false); |
| 2270 __ cmpl(FieldOperand(value, HeapNumber::kMantissaOffset), | 2270 __ cmpl(FieldOperand(value, HeapNumber::kMantissaOffset), |
| 2271 Immediate(0x00000000)); | 2271 Immediate(0x00000000)); |
| 2272 EmitBranch(instr, equal); | 2272 EmitBranch(instr, equal); |
| 2273 } | 2273 } |
| 2274 | 2274 |
| 2275 __ bind(&if_false); | 2275 __ bind(&if_false); |
| 2276 EmitFalseBranch(instr, always); | 2276 EmitFalseBranch(instr, always); |
| (...skipping 3400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5677 FixedArray::kHeaderSize - kPointerSize)); | 5677 FixedArray::kHeaderSize - kPointerSize)); |
| 5678 __ bind(&done); | 5678 __ bind(&done); |
| 5679 } | 5679 } |
| 5680 | 5680 |
| 5681 | 5681 |
| 5682 #undef __ | 5682 #undef __ |
| 5683 | 5683 |
| 5684 } } // namespace v8::internal | 5684 } } // namespace v8::internal |
| 5685 | 5685 |
| 5686 #endif // V8_TARGET_ARCH_X64 | 5686 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |