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 3993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4004 Register scratch = scratch0(); | 4004 Register scratch = scratch0(); |
4005 LOperand* input = instr->InputAt(0); | 4005 LOperand* input = instr->InputAt(0); |
4006 ASSERT(input->IsRegister()); | 4006 ASSERT(input->IsRegister()); |
4007 Register reg = ToRegister(input); | 4007 Register reg = ToRegister(input); |
4008 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset)); | 4008 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset)); |
4009 __ cmp(scratch, Operand(instr->hydrogen()->map())); | 4009 __ cmp(scratch, Operand(instr->hydrogen()->map())); |
4010 DeoptimizeIf(ne, instr->environment()); | 4010 DeoptimizeIf(ne, instr->environment()); |
4011 } | 4011 } |
4012 | 4012 |
4013 | 4013 |
4014 void LCodeGen::DoClampDoubleToUint8(LClampDoubleToUint8* instr) { | 4014 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { |
4015 DoubleRegister value_reg = ToDoubleRegister(instr->unclamped()); | 4015 DoubleRegister value_reg = ToDoubleRegister(instr->unclamped()); |
4016 Register result_reg = ToRegister(instr->result()); | 4016 Register result_reg = ToRegister(instr->result()); |
4017 DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0)); | 4017 DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0)); |
4018 __ ClampDoubleToUint8(result_reg, value_reg, temp_reg); | 4018 __ ClampDoubleToUint8(result_reg, value_reg, temp_reg); |
4019 } | 4019 } |
4020 | 4020 |
4021 | 4021 |
4022 void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) { | 4022 void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) { |
4023 Register unclamped_reg = ToRegister(instr->unclamped()); | 4023 Register unclamped_reg = ToRegister(instr->unclamped()); |
4024 Register result_reg = ToRegister(instr->result()); | 4024 Register result_reg = ToRegister(instr->result()); |
4025 __ ClampUint8(result_reg, unclamped_reg); | 4025 __ ClampUint8(result_reg, unclamped_reg); |
4026 } | 4026 } |
4027 | 4027 |
4028 | 4028 |
4029 void LCodeGen::DoClampTaggedToUint8(LClampTaggedToUint8* instr) { | 4029 void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) { |
4030 Register scratch = scratch0(); | 4030 Register scratch = scratch0(); |
4031 Register input_reg = ToRegister(instr->unclamped()); | 4031 Register input_reg = ToRegister(instr->unclamped()); |
4032 Register result_reg = ToRegister(instr->result()); | 4032 Register result_reg = ToRegister(instr->result()); |
4033 DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0)); | 4033 DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0)); |
4034 Label is_smi, done, heap_number; | 4034 Label is_smi, done, heap_number; |
4035 | 4035 |
4036 // Both smi and heap number cases are handled. | 4036 // Both smi and heap number cases are handled. |
4037 __ JumpIfSmi(input_reg, &is_smi); | 4037 __ JumpIfSmi(input_reg, &is_smi); |
4038 | 4038 |
4039 // Check for heap number | 4039 // Check for heap number |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4466 ASSERT(osr_pc_offset_ == -1); | 4466 ASSERT(osr_pc_offset_ == -1); |
4467 osr_pc_offset_ = masm()->pc_offset(); | 4467 osr_pc_offset_ = masm()->pc_offset(); |
4468 } | 4468 } |
4469 | 4469 |
4470 | 4470 |
4471 | 4471 |
4472 | 4472 |
4473 #undef __ | 4473 #undef __ |
4474 | 4474 |
4475 } } // namespace v8::internal | 4475 } } // namespace v8::internal |
OLD | NEW |