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

Side by Side Diff: src/x64/lithium-codegen-x64.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/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.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 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 3279 matching lines...) Expand 10 before | Expand all | Expand 10 after
3290 __ andl(result_reg, Immediate(1)); 3290 __ andl(result_reg, Immediate(1));
3291 DeoptimizeIf(not_zero, instr->environment()); 3291 DeoptimizeIf(not_zero, instr->environment());
3292 __ bind(&done); 3292 __ bind(&done);
3293 } 3293 }
3294 } 3294 }
3295 } 3295 }
3296 3296
3297 3297
3298 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 3298 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
3299 LOperand* input = instr->InputAt(0); 3299 LOperand* input = instr->InputAt(0);
3300 ASSERT(input->IsRegister());
3301 Condition cc = masm()->CheckSmi(ToRegister(input)); 3300 Condition cc = masm()->CheckSmi(ToRegister(input));
3302 if (instr->condition() != equal) { 3301 DeoptimizeIf(NegateCondition(cc), instr->environment());
3303 cc = NegateCondition(cc); 3302 }
3304 } 3303
3304
3305 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
3306 LOperand* input = instr->InputAt(0);
3307 Condition cc = masm()->CheckSmi(ToRegister(input));
3305 DeoptimizeIf(cc, instr->environment()); 3308 DeoptimizeIf(cc, instr->environment());
3306 } 3309 }
3307 3310
3308 3311
3309 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 3312 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
3310 Register input = ToRegister(instr->InputAt(0)); 3313 Register input = ToRegister(instr->InputAt(0));
3311 InstanceType first = instr->hydrogen()->first(); 3314 InstanceType first = instr->hydrogen()->first();
3312 InstanceType last = instr->hydrogen()->last(); 3315 InstanceType last = instr->hydrogen()->last();
3313 3316
3314 __ movq(kScratchRegister, FieldOperand(input, HeapObject::kMapOffset)); 3317 __ movq(kScratchRegister, FieldOperand(input, HeapObject::kMapOffset));
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
3763 RegisterEnvironmentForDeoptimization(environment); 3766 RegisterEnvironmentForDeoptimization(environment);
3764 ASSERT(osr_pc_offset_ == -1); 3767 ASSERT(osr_pc_offset_ == -1);
3765 osr_pc_offset_ = masm()->pc_offset(); 3768 osr_pc_offset_ = masm()->pc_offset();
3766 } 3769 }
3767 3770
3768 #undef __ 3771 #undef __
3769 3772
3770 } } // namespace v8::internal 3773 } } // namespace v8::internal
3771 3774
3772 #endif // V8_TARGET_ARCH_X64 3775 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698