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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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-codegen-arm.cc ('k') | src/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 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 3479 matching lines...) Expand 10 before | Expand all | Expand 10 after
3490 __ and_(result_reg, 1); 3490 __ and_(result_reg, 1);
3491 DeoptimizeIf(not_zero, instr->environment()); 3491 DeoptimizeIf(not_zero, instr->environment());
3492 } 3492 }
3493 __ bind(&done); 3493 __ bind(&done);
3494 } 3494 }
3495 } 3495 }
3496 3496
3497 3497
3498 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 3498 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
3499 LOperand* input = instr->InputAt(0); 3499 LOperand* input = instr->InputAt(0);
3500 ASSERT(input->IsRegister());
3501 __ test(ToRegister(input), Immediate(kSmiTagMask)); 3500 __ test(ToRegister(input), Immediate(kSmiTagMask));
3502 DeoptimizeIf(instr->condition(), instr->environment()); 3501 DeoptimizeIf(not_zero, instr->environment());
3502 }
3503
3504
3505 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
3506 LOperand* input = instr->InputAt(0);
3507 __ test(ToRegister(input), Immediate(kSmiTagMask));
3508 DeoptimizeIf(zero, instr->environment());
3503 } 3509 }
3504 3510
3505 3511
3506 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 3512 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
3507 Register input = ToRegister(instr->InputAt(0)); 3513 Register input = ToRegister(instr->InputAt(0));
3508 Register temp = ToRegister(instr->TempAt(0)); 3514 Register temp = ToRegister(instr->TempAt(0));
3509 InstanceType first = instr->hydrogen()->first(); 3515 InstanceType first = instr->hydrogen()->first();
3510 InstanceType last = instr->hydrogen()->last(); 3516 InstanceType last = instr->hydrogen()->last();
3511 3517
3512 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); 3518 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset));
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
3938 ASSERT(osr_pc_offset_ == -1); 3944 ASSERT(osr_pc_offset_ == -1);
3939 osr_pc_offset_ = masm()->pc_offset(); 3945 osr_pc_offset_ = masm()->pc_offset();
3940 } 3946 }
3941 3947
3942 3948
3943 #undef __ 3949 #undef __
3944 3950
3945 } } // namespace v8::internal 3951 } } // namespace v8::internal
3946 3952
3947 #endif // V8_TARGET_ARCH_IA32 3953 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698