Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: src/arm/codegen-arm.cc

Issue 10818026: Relax requirement from VFP3 to VFP2 where possible. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 MacroAssembler* masm, Label* fail) { 100 MacroAssembler* masm, Label* fail) {
101 // ----------- S t a t e ------------- 101 // ----------- S t a t e -------------
102 // -- r0 : value 102 // -- r0 : value
103 // -- r1 : key 103 // -- r1 : key
104 // -- r2 : receiver 104 // -- r2 : receiver
105 // -- lr : return address 105 // -- lr : return address
106 // -- r3 : target map, scratch for subsequent call 106 // -- r3 : target map, scratch for subsequent call
107 // -- r4 : scratch (elements) 107 // -- r4 : scratch (elements)
108 // ----------------------------------- 108 // -----------------------------------
109 Label loop, entry, convert_hole, gc_required, only_change_map, done; 109 Label loop, entry, convert_hole, gc_required, only_change_map, done;
110 bool vfp3_supported = CpuFeatures::IsSupported(VFP3); 110 bool vfp3_supported = CpuFeatures::IsSupported(VFP2);
111 111
112 // Check for empty arrays, which only require a map transition and no changes 112 // Check for empty arrays, which only require a map transition and no changes
113 // to the backing store. 113 // to the backing store.
114 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset)); 114 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset));
115 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex); 115 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex);
116 __ b(eq, &only_change_map); 116 __ b(eq, &only_change_map);
117 117
118 __ push(lr); 118 __ push(lr);
119 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset)); 119 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset));
120 // r4: source FixedArray 120 // r4: source FixedArray
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 __ b(fail); 204 __ b(fail);
205 205
206 // Convert and copy elements. 206 // Convert and copy elements.
207 __ bind(&loop); 207 __ bind(&loop);
208 __ ldr(r9, MemOperand(r3, 4, PostIndex)); 208 __ ldr(r9, MemOperand(r3, 4, PostIndex));
209 // r9: current element 209 // r9: current element
210 __ UntagAndJumpIfNotSmi(r9, r9, &convert_hole); 210 __ UntagAndJumpIfNotSmi(r9, r9, &convert_hole);
211 211
212 // Normal smi, convert to double and store. 212 // Normal smi, convert to double and store.
213 if (vfp3_supported) { 213 if (vfp3_supported) {
214 CpuFeatures::Scope scope(VFP3); 214 CpuFeatures::Scope scope(VFP2);
215 __ vmov(s0, r9); 215 __ vmov(s0, r9);
216 __ vcvt_f64_s32(d0, s0); 216 __ vcvt_f64_s32(d0, s0);
217 __ vstr(d0, r7, 0); 217 __ vstr(d0, r7, 0);
218 __ add(r7, r7, Operand(8)); 218 __ add(r7, r7, Operand(8));
219 } else { 219 } else {
220 FloatingPointHelper::ConvertIntToDouble(masm, 220 FloatingPointHelper::ConvertIntToDouble(masm,
221 r9, 221 r9,
222 FloatingPointHelper::kCoreRegisters, 222 FloatingPointHelper::kCoreRegisters,
223 d0, 223 d0,
224 r0, 224 r0,
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // Ascii string. 448 // Ascii string.
449 __ ldrb(result, MemOperand(string, index)); 449 __ ldrb(result, MemOperand(string, index));
450 __ bind(&done); 450 __ bind(&done);
451 } 451 }
452 452
453 #undef __ 453 #undef __
454 454
455 } } // namespace v8::internal 455 } } // namespace v8::internal
456 456
457 #endif // V8_TARGET_ARCH_ARM 457 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698