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

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

Issue 6673082: Refactor lithium CheckSmi instruction into two separate instructions CheckSmi... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3507 matching lines...) Expand 10 before | Expand all | Expand 10 after
3518 DeoptimizeIf(ne, instr->environment()); 3518 DeoptimizeIf(ne, instr->environment());
3519 // Retrieve the result. 3519 // Retrieve the result.
3520 __ vmov(result_reg, single_scratch); 3520 __ vmov(result_reg, single_scratch);
3521 } 3521 }
3522 __ bind(&done); 3522 __ bind(&done);
3523 } 3523 }
3524 3524
3525 3525
3526 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 3526 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
3527 LOperand* input = instr->InputAt(0); 3527 LOperand* input = instr->InputAt(0);
3528 ASSERT(input->IsRegister());
3529 __ tst(ToRegister(input), Operand(kSmiTagMask)); 3528 __ tst(ToRegister(input), Operand(kSmiTagMask));
3530 DeoptimizeIf(instr->condition(), instr->environment()); 3529 DeoptimizeIf(ne, instr->environment());
3530 }
3531
3532
3533 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
3534 LOperand* input = instr->InputAt(0);
3535 __ tst(ToRegister(input), Operand(kSmiTagMask));
3536 DeoptimizeIf(eq, instr->environment());
3531 } 3537 }
3532 3538
3533 3539
3534 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 3540 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
3535 Register input = ToRegister(instr->InputAt(0)); 3541 Register input = ToRegister(instr->InputAt(0));
3536 Register scratch = scratch0(); 3542 Register scratch = scratch0();
3537 InstanceType first = instr->hydrogen()->first(); 3543 InstanceType first = instr->hydrogen()->first();
3538 InstanceType last = instr->hydrogen()->last(); 3544 InstanceType last = instr->hydrogen()->last();
3539 3545
3540 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); 3546 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset));
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
3950 ASSERT(!environment->HasBeenRegistered()); 3956 ASSERT(!environment->HasBeenRegistered());
3951 RegisterEnvironmentForDeoptimization(environment); 3957 RegisterEnvironmentForDeoptimization(environment);
3952 ASSERT(osr_pc_offset_ == -1); 3958 ASSERT(osr_pc_offset_ == -1);
3953 osr_pc_offset_ = masm()->pc_offset(); 3959 osr_pc_offset_ = masm()->pc_offset();
3954 } 3960 }
3955 3961
3956 3962
3957 #undef __ 3963 #undef __
3958 3964
3959 } } // namespace v8::internal 3965 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698