Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 68933009: Fix usage of EmitBranch in compare-minus-zero-and-branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 2242
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;
2253 2252
2254 if (rep.IsDouble()) { 2253 if (rep.IsDouble()) {
2255 XMMRegister value = ToDoubleRegister(instr->value()); 2254 XMMRegister value = ToDoubleRegister(instr->value());
2256 XMMRegister xmm_scratch = double_scratch0(); 2255 XMMRegister xmm_scratch = double_scratch0();
2257 __ xorps(xmm_scratch, xmm_scratch); 2256 __ xorps(xmm_scratch, xmm_scratch);
2258 __ ucomisd(xmm_scratch, value); 2257 __ ucomisd(xmm_scratch, value);
2259 __ j(not_equal, &if_false); 2258 EmitFalseBranch(instr, not_equal);
2260 __ movmskpd(kScratchRegister, value); 2259 __ movmskpd(kScratchRegister, value);
2261 __ testl(kScratchRegister, Immediate(1)); 2260 __ testl(kScratchRegister, Immediate(1));
2262 EmitBranch(instr, not_zero); 2261 EmitBranch(instr, not_zero);
2263 } else { 2262 } else {
2264 Register value = ToRegister(instr->value()); 2263 Register value = ToRegister(instr->value());
2265 Handle<Map> map = masm()->isolate()->factory()->heap_number_map(); 2264 Handle<Map> map = masm()->isolate()->factory()->heap_number_map();
2266 __ CheckMap(value, map, &if_false, DO_SMI_CHECK); 2265 __ CheckMap(value, map, instr->FalseLabel(chunk()), DO_SMI_CHECK);
2267 __ cmpl(FieldOperand(value, HeapNumber::kExponentOffset), 2266 __ cmpl(FieldOperand(value, HeapNumber::kExponentOffset),
2268 Immediate(0x80000000)); 2267 Immediate(0x80000000));
2269 __ j(not_equal, &if_false); 2268 EmitFalseBranch(instr, not_equal);
2270 __ cmpl(FieldOperand(value, HeapNumber::kMantissaOffset), 2269 __ cmpl(FieldOperand(value, HeapNumber::kMantissaOffset),
2271 Immediate(0x00000000)); 2270 Immediate(0x00000000));
2272 EmitBranch(instr, equal); 2271 EmitBranch(instr, equal);
2273 } 2272 }
2274
2275 __ bind(&if_false);
2276 EmitFalseBranch(instr, always);
2277 } 2273 }
2278 2274
2279 2275
2280 Condition LCodeGen::EmitIsObject(Register input, 2276 Condition LCodeGen::EmitIsObject(Register input,
2281 Label* is_not_object, 2277 Label* is_not_object,
2282 Label* is_object) { 2278 Label* is_object) {
2283 ASSERT(!input.is(kScratchRegister)); 2279 ASSERT(!input.is(kScratchRegister));
2284 2280
2285 __ JumpIfSmi(input, is_not_object); 2281 __ JumpIfSmi(input, is_not_object);
2286 2282
(...skipping 3390 matching lines...) Expand 10 before | Expand all | Expand 10 after
5677 FixedArray::kHeaderSize - kPointerSize)); 5673 FixedArray::kHeaderSize - kPointerSize));
5678 __ bind(&done); 5674 __ bind(&done);
5679 } 5675 }
5680 5676
5681 5677
5682 #undef __ 5678 #undef __
5683 5679
5684 } } // namespace v8::internal 5680 } } // namespace v8::internal
5685 5681
5686 #endif // V8_TARGET_ARCH_X64 5682 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698