OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |