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

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

Issue 63573004: Fix implementation of compare-minus-zero-and-branch on ia32 and x64. (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/ia32/lithium-codegen-ia32.cc ('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 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698