OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 __ Bind(&is_heap_number); | 2217 __ Bind(&is_heap_number); |
2218 DoubleRegister dbl_scratch = double_scratch(); | 2218 DoubleRegister dbl_scratch = double_scratch(); |
2219 DoubleRegister dbl_scratch2 = ToDoubleRegister(instr->temp2()); | 2219 DoubleRegister dbl_scratch2 = ToDoubleRegister(instr->temp2()); |
2220 __ Ldr(dbl_scratch, FieldMemOperand(input, HeapNumber::kValueOffset)); | 2220 __ Ldr(dbl_scratch, FieldMemOperand(input, HeapNumber::kValueOffset)); |
2221 __ ClampDoubleToUint8(result, dbl_scratch, dbl_scratch2); | 2221 __ ClampDoubleToUint8(result, dbl_scratch, dbl_scratch2); |
2222 | 2222 |
2223 __ Bind(&done); | 2223 __ Bind(&done); |
2224 } | 2224 } |
2225 | 2225 |
2226 | 2226 |
2227 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { | |
2228 DoubleRegister value_reg = ToDoubleRegister(instr->value()); | |
2229 Register result_reg = ToRegister(instr->result()); | |
2230 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | |
2231 __ Fmov(result_reg, value_reg); | |
2232 __ Mov(result_reg, Operand(result_reg, LSR, 32)); | |
2233 } else { | |
2234 __ Fmov(result_reg.W(), value_reg.S()); | |
2235 } | |
2236 } | |
2237 | |
2238 | |
2239 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { | |
2240 Register hi_reg = ToRegister(instr->hi()); | |
2241 Register lo_reg = ToRegister(instr->lo()); | |
2242 Register temp = ToRegister(instr->temp()); | |
2243 DoubleRegister result_reg = ToDoubleRegister(instr->result()); | |
2244 | |
2245 __ And(temp, lo_reg, Operand(0xffffffff)); | |
2246 __ Orr(temp, temp, Operand(hi_reg, LSL, 32)); | |
2247 __ Fmov(result_reg, temp); | |
2248 } | |
2249 | |
2250 | |
2251 void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) { | 2227 void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) { |
2252 Handle<String> class_name = instr->hydrogen()->class_name(); | 2228 Handle<String> class_name = instr->hydrogen()->class_name(); |
2253 Label* true_label = instr->TrueLabel(chunk_); | 2229 Label* true_label = instr->TrueLabel(chunk_); |
2254 Label* false_label = instr->FalseLabel(chunk_); | 2230 Label* false_label = instr->FalseLabel(chunk_); |
2255 Register input = ToRegister(instr->value()); | 2231 Register input = ToRegister(instr->value()); |
2256 Register scratch1 = ToRegister(instr->temp1()); | 2232 Register scratch1 = ToRegister(instr->temp1()); |
2257 Register scratch2 = ToRegister(instr->temp2()); | 2233 Register scratch2 = ToRegister(instr->temp2()); |
2258 | 2234 |
2259 __ JumpIfSmi(input, false_label); | 2235 __ JumpIfSmi(input, false_label); |
2260 | 2236 |
(...skipping 3429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5690 __ Bind(&out_of_object); | 5666 __ Bind(&out_of_object); |
5691 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5667 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5692 // Index is equal to negated out of object property index plus 1. | 5668 // Index is equal to negated out of object property index plus 1. |
5693 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5669 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5694 __ Ldr(result, FieldMemOperand(result, | 5670 __ Ldr(result, FieldMemOperand(result, |
5695 FixedArray::kHeaderSize - kPointerSize)); | 5671 FixedArray::kHeaderSize - kPointerSize)); |
5696 __ Bind(&done); | 5672 __ Bind(&done); |
5697 } | 5673 } |
5698 | 5674 |
5699 } } // namespace v8::internal | 5675 } } // namespace v8::internal |
OLD | NEW |