OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3078 __ bind(&skip_assignment); | 3078 __ bind(&skip_assignment); |
3079 } | 3079 } |
3080 | 3080 |
3081 | 3081 |
3082 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 3082 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
3083 Register object = ToRegister(instr->object()); | 3083 Register object = ToRegister(instr->object()); |
3084 if (!FLAG_track_double_fields) { | 3084 if (!FLAG_track_double_fields) { |
3085 ASSERT(!instr->hydrogen()->representation().IsDouble()); | 3085 ASSERT(!instr->hydrogen()->representation().IsDouble()); |
3086 } | 3086 } |
3087 Register temp = instr->hydrogen()->representation().IsDouble() | 3087 Register temp = instr->hydrogen()->representation().IsDouble() |
3088 ? ToRegister(instr->temp()) : ToRegister(instr->result()); | 3088 ? scratch0() : ToRegister(instr->result()); |
3089 if (instr->hydrogen()->is_in_object()) { | 3089 if (instr->hydrogen()->is_in_object()) { |
3090 __ ldr(temp, FieldMemOperand(object, instr->hydrogen()->offset())); | 3090 __ ldr(temp, FieldMemOperand(object, instr->hydrogen()->offset())); |
3091 } else { | 3091 } else { |
3092 __ ldr(temp, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 3092 __ ldr(temp, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
3093 __ ldr(temp, FieldMemOperand(temp, instr->hydrogen()->offset())); | 3093 __ ldr(temp, FieldMemOperand(temp, instr->hydrogen()->offset())); |
3094 } | 3094 } |
3095 | 3095 |
3096 if (instr->hydrogen()->representation().IsDouble()) { | 3096 if (instr->hydrogen()->representation().IsDouble()) { |
3097 Label load_from_heap_number, done; | 3097 Label load_from_heap_number, done; |
3098 DwVfpRegister result = ToDoubleRegister(instr->result()); | 3098 DwVfpRegister result = ToDoubleRegister(instr->result()); |
3099 SwVfpRegister flt_scratch = double_scratch0().low(); | 3099 SwVfpRegister flt_scratch = double_scratch0().low(); |
3100 __ JumpIfNotSmi(temp, &load_from_heap_number); | 3100 __ JumpIfNotSmi(temp, &load_from_heap_number); |
3101 __ SmiUntag(temp); | 3101 __ SmiUntag(temp); |
3102 __ vmov(flt_scratch, temp); | 3102 __ vmov(flt_scratch, temp); |
3103 __ vcvt_f64_s32(result, flt_scratch); | 3103 __ vcvt_f64_s32(result, flt_scratch); |
3104 __ b(&done); | 3104 __ b(&done); |
3105 __ sub(ip, temp, Operand(kHeapObjectTag)); | 3105 __ bind(&load_from_heap_number); |
3106 __ vldr(result, ip, HeapNumber::kValueOffset); | 3106 __ vldr(result, FieldMemOperand(temp, HeapNumber::kValueOffset)); |
3107 __ bind(&done); | 3107 __ bind(&done); |
3108 } | 3108 } |
3109 } | 3109 } |
3110 | 3110 |
3111 | 3111 |
3112 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, | 3112 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
3113 Register object, | 3113 Register object, |
3114 Handle<Map> type, | 3114 Handle<Map> type, |
3115 Handle<String> name, | 3115 Handle<String> name, |
3116 LEnvironment* env) { | 3116 LEnvironment* env) { |
(...skipping 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6064 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6064 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
6065 __ ldr(result, FieldMemOperand(scratch, | 6065 __ ldr(result, FieldMemOperand(scratch, |
6066 FixedArray::kHeaderSize - kPointerSize)); | 6066 FixedArray::kHeaderSize - kPointerSize)); |
6067 __ bind(&done); | 6067 __ bind(&done); |
6068 } | 6068 } |
6069 | 6069 |
6070 | 6070 |
6071 #undef __ | 6071 #undef __ |
6072 | 6072 |
6073 } } // namespace v8::internal | 6073 } } // namespace v8::internal |
OLD | NEW |