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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.cc

Issue 1680783002: [intrinsics] Kill the %_IsMinusZero intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « src/crankshaft/hydrogen-range-analysis.cc ('k') | src/crankshaft/ia32/lithium-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 __ sub(esp, Immediate(kDoubleSize)); 2210 __ sub(esp, Immediate(kDoubleSize));
2211 __ movsd(MemOperand(esp, 0), input_reg); 2211 __ movsd(MemOperand(esp, 0), input_reg);
2212 2212
2213 __ add(esp, Immediate(kDoubleSize)); 2213 __ add(esp, Immediate(kDoubleSize));
2214 int offset = sizeof(kHoleNanUpper32); 2214 int offset = sizeof(kHoleNanUpper32);
2215 __ cmp(MemOperand(esp, -offset), Immediate(kHoleNanUpper32)); 2215 __ cmp(MemOperand(esp, -offset), Immediate(kHoleNanUpper32));
2216 EmitBranch(instr, equal); 2216 EmitBranch(instr, equal);
2217 } 2217 }
2218 2218
2219 2219
2220 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) {
2221 Representation rep = instr->hydrogen()->value()->representation();
2222 DCHECK(!rep.IsInteger32());
2223 Register scratch = ToRegister(instr->temp());
2224
2225 if (rep.IsDouble()) {
2226 XMMRegister value = ToDoubleRegister(instr->value());
2227 XMMRegister xmm_scratch = double_scratch0();
2228 __ xorps(xmm_scratch, xmm_scratch);
2229 __ ucomisd(xmm_scratch, value);
2230 EmitFalseBranch(instr, not_equal);
2231 __ movmskpd(scratch, value);
2232 __ test(scratch, Immediate(1));
2233 EmitBranch(instr, not_zero);
2234 } else {
2235 Register value = ToRegister(instr->value());
2236 Handle<Map> map = masm()->isolate()->factory()->heap_number_map();
2237 __ CheckMap(value, map, instr->FalseLabel(chunk()), DO_SMI_CHECK);
2238 __ cmp(FieldOperand(value, HeapNumber::kExponentOffset),
2239 Immediate(0x1));
2240 EmitFalseBranch(instr, no_overflow);
2241 __ cmp(FieldOperand(value, HeapNumber::kMantissaOffset),
2242 Immediate(0x00000000));
2243 EmitBranch(instr, equal);
2244 }
2245 }
2246
2247
2248 Condition LCodeGen::EmitIsString(Register input, 2220 Condition LCodeGen::EmitIsString(Register input,
2249 Register temp1, 2221 Register temp1,
2250 Label* is_not_string, 2222 Label* is_not_string,
2251 SmiCheck check_needed = INLINE_SMI_CHECK) { 2223 SmiCheck check_needed = INLINE_SMI_CHECK) {
2252 if (check_needed == INLINE_SMI_CHECK) { 2224 if (check_needed == INLINE_SMI_CHECK) {
2253 __ JumpIfSmi(input, is_not_string); 2225 __ JumpIfSmi(input, is_not_string);
2254 } 2226 }
2255 2227
2256 Condition cond = masm_->IsObjectStringType(input, temp1, temp1); 2228 Condition cond = masm_->IsObjectStringType(input, temp1, temp1);
2257 2229
(...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after
5455 RecordSafepoint(Safepoint::kNoLazyDeopt); 5427 RecordSafepoint(Safepoint::kNoLazyDeopt);
5456 } 5428 }
5457 5429
5458 5430
5459 #undef __ 5431 #undef __
5460 5432
5461 } // namespace internal 5433 } // namespace internal
5462 } // namespace v8 5434 } // namespace v8
5463 5435
5464 #endif // V8_TARGET_ARCH_IA32 5436 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-range-analysis.cc ('k') | src/crankshaft/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698