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

Side by Side Diff: src/arm/lithium-codegen-arm.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/arm/lithium-codegen-arm.h ('k') | src/ia32/lithium-codegen-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 // 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 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 Register scratch = scratch0(); 2468 Register scratch = scratch0();
2469 __ VmovHigh(scratch, input_reg); 2469 __ VmovHigh(scratch, input_reg);
2470 __ cmp(scratch, Operand(kHoleNanUpper32)); 2470 __ cmp(scratch, Operand(kHoleNanUpper32));
2471 EmitBranch(instr, eq); 2471 EmitBranch(instr, eq);
2472 } 2472 }
2473 2473
2474 2474
2475 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { 2475 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) {
2476 Representation rep = instr->hydrogen()->value()->representation(); 2476 Representation rep = instr->hydrogen()->value()->representation();
2477 ASSERT(!rep.IsInteger32()); 2477 ASSERT(!rep.IsInteger32());
2478 Label if_false;
2479 Register scratch = ToRegister(instr->temp()); 2478 Register scratch = ToRegister(instr->temp());
2480 2479
2481 if (rep.IsDouble()) { 2480 if (rep.IsDouble()) {
2482 DwVfpRegister value = ToDoubleRegister(instr->value()); 2481 DwVfpRegister value = ToDoubleRegister(instr->value());
2483 __ VFPCompareAndSetFlags(value, 0.0); 2482 __ VFPCompareAndSetFlags(value, 0.0);
2484 __ b(ne, &if_false); 2483 EmitFalseBranch(instr, ne);
2485 __ VmovHigh(scratch, value); 2484 __ VmovHigh(scratch, value);
2486 __ cmp(scratch, Operand(0x80000000)); 2485 __ cmp(scratch, Operand(0x80000000));
2487 } else { 2486 } else {
2488 Register value = ToRegister(instr->value()); 2487 Register value = ToRegister(instr->value());
2489 __ CheckMap( 2488 __ CheckMap(value,
2490 value, scratch, Heap::kHeapNumberMapRootIndex, &if_false, DO_SMI_CHECK); 2489 scratch,
2490 Heap::kHeapNumberMapRootIndex,
2491 instr->FalseLabel(chunk()),
2492 DO_SMI_CHECK);
2491 __ ldr(scratch, FieldMemOperand(value, HeapNumber::kExponentOffset)); 2493 __ ldr(scratch, FieldMemOperand(value, HeapNumber::kExponentOffset));
2492 __ ldr(ip, FieldMemOperand(value, HeapNumber::kMantissaOffset)); 2494 __ ldr(ip, FieldMemOperand(value, HeapNumber::kMantissaOffset));
2493 __ cmp(scratch, Operand(0x80000000)); 2495 __ cmp(scratch, Operand(0x80000000));
2494 __ cmp(ip, Operand(0x00000000), eq); 2496 __ cmp(ip, Operand(0x00000000), eq);
2495 } 2497 }
2496 EmitBranch(instr, eq); 2498 EmitBranch(instr, eq);
2497
2498 __ bind(&if_false);
2499 EmitFalseBranch(instr, al);
2500 } 2499 }
2501 2500
2502 2501
2503 Condition LCodeGen::EmitIsObject(Register input, 2502 Condition LCodeGen::EmitIsObject(Register input,
2504 Register temp1, 2503 Register temp1,
2505 Label* is_not_object, 2504 Label* is_not_object,
2506 Label* is_object) { 2505 Label* is_object) {
2507 Register temp2 = scratch0(); 2506 Register temp2 = scratch0();
2508 __ JumpIfSmi(input, is_not_object); 2507 __ JumpIfSmi(input, is_not_object);
2509 2508
(...skipping 3401 matching lines...) Expand 10 before | Expand all | Expand 10 after
5911 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5910 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5912 __ ldr(result, FieldMemOperand(scratch, 5911 __ ldr(result, FieldMemOperand(scratch,
5913 FixedArray::kHeaderSize - kPointerSize)); 5912 FixedArray::kHeaderSize - kPointerSize));
5914 __ bind(&done); 5913 __ bind(&done);
5915 } 5914 }
5916 5915
5917 5916
5918 #undef __ 5917 #undef __
5919 5918
5920 } } // namespace v8::internal 5919 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698