| 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 4052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4063 | 4063 |
| 4064 // Check for heap number | 4064 // Check for heap number |
| 4065 __ ldr(scratch, FieldMemOperand(input_reg, HeapObject::kMapOffset)); | 4065 __ ldr(scratch, FieldMemOperand(input_reg, HeapObject::kMapOffset)); |
| 4066 __ cmp(scratch, Operand(factory()->heap_number_map())); | 4066 __ cmp(scratch, Operand(factory()->heap_number_map())); |
| 4067 __ b(eq, &heap_number); | 4067 __ b(eq, &heap_number); |
| 4068 | 4068 |
| 4069 // Check for undefined. Undefined is converted to zero for clamping | 4069 // Check for undefined. Undefined is converted to zero for clamping |
| 4070 // conversions. | 4070 // conversions. |
| 4071 __ cmp(input_reg, Operand(factory()->undefined_value())); | 4071 __ cmp(input_reg, Operand(factory()->undefined_value())); |
| 4072 DeoptimizeIf(ne, instr->environment()); | 4072 DeoptimizeIf(ne, instr->environment()); |
| 4073 __ movt(input_reg, 0); | 4073 __ mov(result_reg, Operand(0)); |
| 4074 __ jmp(&done); | 4074 __ jmp(&done); |
| 4075 | 4075 |
| 4076 // Heap number | 4076 // Heap number |
| 4077 __ bind(&heap_number); | 4077 __ bind(&heap_number); |
| 4078 __ vldr(double_scratch0(), FieldMemOperand(input_reg, | 4078 __ vldr(double_scratch0(), FieldMemOperand(input_reg, |
| 4079 HeapNumber::kValueOffset)); | 4079 HeapNumber::kValueOffset)); |
| 4080 __ ClampDoubleToUint8(result_reg, double_scratch0(), temp_reg); | 4080 __ ClampDoubleToUint8(result_reg, double_scratch0(), temp_reg); |
| 4081 __ jmp(&done); | 4081 __ jmp(&done); |
| 4082 | 4082 |
| 4083 // smi | 4083 // smi |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4485 ASSERT(osr_pc_offset_ == -1); | 4485 ASSERT(osr_pc_offset_ == -1); |
| 4486 osr_pc_offset_ = masm()->pc_offset(); | 4486 osr_pc_offset_ = masm()->pc_offset(); |
| 4487 } | 4487 } |
| 4488 | 4488 |
| 4489 | 4489 |
| 4490 | 4490 |
| 4491 | 4491 |
| 4492 #undef __ | 4492 #undef __ |
| 4493 | 4493 |
| 4494 } } // namespace v8::internal | 4494 } } // namespace v8::internal |
| OLD | NEW |