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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 } T; | 168 } T; |
169 T t; | 169 T t; |
170 | 170 |
171 Assembler assm(isolate, NULL, 0); | 171 Assembler assm(isolate, NULL, 0); |
172 Label L, C; | 172 Label L, C; |
173 | 173 |
174 __ mov(ip, Operand(sp)); | 174 __ mov(ip, Operand(sp)); |
175 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); | 175 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
176 __ sub(fp, ip, Operand(4)); | 176 __ sub(fp, ip, Operand(4)); |
177 __ mov(r4, Operand(r0)); | 177 __ mov(r4, Operand(r0)); |
178 __ ldr(r0, MemOperand(r4, OFFSET_OF(T, i))); | 178 __ ldr(r0, MemOperand(r4, offsetof(T, i))); |
179 __ mov(r2, Operand(r0, ASR, 1)); | 179 __ mov(r2, Operand(r0, ASR, 1)); |
180 __ str(r2, MemOperand(r4, OFFSET_OF(T, i))); | 180 __ str(r2, MemOperand(r4, offsetof(T, i))); |
181 __ ldrsb(r2, MemOperand(r4, OFFSET_OF(T, c))); | 181 __ ldrsb(r2, MemOperand(r4, offsetof(T, c))); |
182 __ add(r0, r2, Operand(r0)); | 182 __ add(r0, r2, Operand(r0)); |
183 __ mov(r2, Operand(r2, LSL, 2)); | 183 __ mov(r2, Operand(r2, LSL, 2)); |
184 __ strb(r2, MemOperand(r4, OFFSET_OF(T, c))); | 184 __ strb(r2, MemOperand(r4, offsetof(T, c))); |
185 __ ldrsh(r2, MemOperand(r4, OFFSET_OF(T, s))); | 185 __ ldrsh(r2, MemOperand(r4, offsetof(T, s))); |
186 __ add(r0, r2, Operand(r0)); | 186 __ add(r0, r2, Operand(r0)); |
187 __ mov(r2, Operand(r2, ASR, 3)); | 187 __ mov(r2, Operand(r2, ASR, 3)); |
188 __ strh(r2, MemOperand(r4, OFFSET_OF(T, s))); | 188 __ strh(r2, MemOperand(r4, offsetof(T, s))); |
189 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); | 189 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); |
190 | 190 |
191 CodeDesc desc; | 191 CodeDesc desc; |
192 assm.GetCode(&desc); | 192 assm.GetCode(&desc); |
193 Handle<Code> code = isolate->factory()->NewCode( | 193 Handle<Code> code = isolate->factory()->NewCode( |
194 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 194 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
195 #ifdef DEBUG | 195 #ifdef DEBUG |
196 OFStream os(stdout); | 196 OFStream os(stdout); |
197 code->Print(os); | 197 code->Print(os); |
198 #endif | 198 #endif |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 | 241 |
242 if (CpuFeatures::IsSupported(VFP3)) { | 242 if (CpuFeatures::IsSupported(VFP3)) { |
243 CpuFeatureScope scope(&assm, VFP3); | 243 CpuFeatureScope scope(&assm, VFP3); |
244 | 244 |
245 __ mov(ip, Operand(sp)); | 245 __ mov(ip, Operand(sp)); |
246 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); | 246 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
247 __ sub(fp, ip, Operand(4)); | 247 __ sub(fp, ip, Operand(4)); |
248 | 248 |
249 __ mov(r4, Operand(r0)); | 249 __ mov(r4, Operand(r0)); |
250 __ vldr(d6, r4, OFFSET_OF(T, a)); | 250 __ vldr(d6, r4, offsetof(T, a)); |
251 __ vldr(d7, r4, OFFSET_OF(T, b)); | 251 __ vldr(d7, r4, offsetof(T, b)); |
252 __ vadd(d5, d6, d7); | 252 __ vadd(d5, d6, d7); |
253 __ vstr(d5, r4, OFFSET_OF(T, c)); | 253 __ vstr(d5, r4, offsetof(T, c)); |
254 | 254 |
255 __ vmla(d5, d6, d7); | 255 __ vmla(d5, d6, d7); |
256 __ vmls(d5, d5, d6); | 256 __ vmls(d5, d5, d6); |
257 | 257 |
258 __ vmov(r2, r3, d5); | 258 __ vmov(r2, r3, d5); |
259 __ vmov(d4, r2, r3); | 259 __ vmov(d4, r2, r3); |
260 __ vstr(d4, r4, OFFSET_OF(T, b)); | 260 __ vstr(d4, r4, offsetof(T, b)); |
261 | 261 |
262 // Load t.x and t.y, switch values, and store back to the struct. | 262 // Load t.x and t.y, switch values, and store back to the struct. |
263 __ vldr(s0, r4, OFFSET_OF(T, x)); | 263 __ vldr(s0, r4, offsetof(T, x)); |
264 __ vldr(s31, r4, OFFSET_OF(T, y)); | 264 __ vldr(s31, r4, offsetof(T, y)); |
265 __ vmov(s16, s0); | 265 __ vmov(s16, s0); |
266 __ vmov(s0, s31); | 266 __ vmov(s0, s31); |
267 __ vmov(s31, s16); | 267 __ vmov(s31, s16); |
268 __ vstr(s0, r4, OFFSET_OF(T, x)); | 268 __ vstr(s0, r4, offsetof(T, x)); |
269 __ vstr(s31, r4, OFFSET_OF(T, y)); | 269 __ vstr(s31, r4, offsetof(T, y)); |
270 | 270 |
271 // Move a literal into a register that can be encoded in the instruction. | 271 // Move a literal into a register that can be encoded in the instruction. |
272 __ vmov(d4, 1.0); | 272 __ vmov(d4, 1.0); |
273 __ vstr(d4, r4, OFFSET_OF(T, e)); | 273 __ vstr(d4, r4, offsetof(T, e)); |
274 | 274 |
275 // Move a literal into a register that requires 64 bits to encode. | 275 // Move a literal into a register that requires 64 bits to encode. |
276 // 0x3ff0000010000000 = 1.000000059604644775390625 | 276 // 0x3ff0000010000000 = 1.000000059604644775390625 |
277 __ vmov(d4, 1.000000059604644775390625); | 277 __ vmov(d4, 1.000000059604644775390625); |
278 __ vstr(d4, r4, OFFSET_OF(T, d)); | 278 __ vstr(d4, r4, offsetof(T, d)); |
279 | 279 |
280 // Convert from floating point to integer. | 280 // Convert from floating point to integer. |
281 __ vmov(d4, 2.0); | 281 __ vmov(d4, 2.0); |
282 __ vcvt_s32_f64(s31, d4); | 282 __ vcvt_s32_f64(s31, d4); |
283 __ vstr(s31, r4, OFFSET_OF(T, i)); | 283 __ vstr(s31, r4, offsetof(T, i)); |
284 | 284 |
285 // Convert from integer to floating point. | 285 // Convert from integer to floating point. |
286 __ mov(lr, Operand(42)); | 286 __ mov(lr, Operand(42)); |
287 __ vmov(s31, lr); | 287 __ vmov(s31, lr); |
288 __ vcvt_f64_s32(d4, s31); | 288 __ vcvt_f64_s32(d4, s31); |
289 __ vstr(d4, r4, OFFSET_OF(T, f)); | 289 __ vstr(d4, r4, offsetof(T, f)); |
290 | 290 |
291 // Convert from fixed point to floating point. | 291 // Convert from fixed point to floating point. |
292 __ mov(lr, Operand(2468)); | 292 __ mov(lr, Operand(2468)); |
293 __ vmov(s8, lr); | 293 __ vmov(s8, lr); |
294 __ vcvt_f64_s32(d4, 2); | 294 __ vcvt_f64_s32(d4, 2); |
295 __ vstr(d4, r4, OFFSET_OF(T, j)); | 295 __ vstr(d4, r4, offsetof(T, j)); |
296 | 296 |
297 // Test vabs. | 297 // Test vabs. |
298 __ vldr(d1, r4, OFFSET_OF(T, g)); | 298 __ vldr(d1, r4, offsetof(T, g)); |
299 __ vabs(d0, d1); | 299 __ vabs(d0, d1); |
300 __ vstr(d0, r4, OFFSET_OF(T, g)); | 300 __ vstr(d0, r4, offsetof(T, g)); |
301 __ vldr(d2, r4, OFFSET_OF(T, h)); | 301 __ vldr(d2, r4, offsetof(T, h)); |
302 __ vabs(d0, d2); | 302 __ vabs(d0, d2); |
303 __ vstr(d0, r4, OFFSET_OF(T, h)); | 303 __ vstr(d0, r4, offsetof(T, h)); |
304 | 304 |
305 // Test vneg. | 305 // Test vneg. |
306 __ vldr(d1, r4, OFFSET_OF(T, m)); | 306 __ vldr(d1, r4, offsetof(T, m)); |
307 __ vneg(d0, d1); | 307 __ vneg(d0, d1); |
308 __ vstr(d0, r4, OFFSET_OF(T, m)); | 308 __ vstr(d0, r4, offsetof(T, m)); |
309 __ vldr(d1, r4, OFFSET_OF(T, n)); | 309 __ vldr(d1, r4, offsetof(T, n)); |
310 __ vneg(d0, d1); | 310 __ vneg(d0, d1); |
311 __ vstr(d0, r4, OFFSET_OF(T, n)); | 311 __ vstr(d0, r4, offsetof(T, n)); |
312 | 312 |
313 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); | 313 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); |
314 | 314 |
315 CodeDesc desc; | 315 CodeDesc desc; |
316 assm.GetCode(&desc); | 316 assm.GetCode(&desc); |
317 Handle<Code> code = isolate->factory()->NewCode( | 317 Handle<Code> code = isolate->factory()->NewCode( |
318 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 318 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
319 #ifdef DEBUG | 319 #ifdef DEBUG |
320 OFStream os(stdout); | 320 OFStream os(stdout); |
321 code->Print(os); | 321 code->Print(os); |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 F f; | 640 F f; |
641 | 641 |
642 // Create a function that uses vldm/vstm to move some double and | 642 // Create a function that uses vldm/vstm to move some double and |
643 // single precision values around in memory. | 643 // single precision values around in memory. |
644 Assembler assm(isolate, NULL, 0); | 644 Assembler assm(isolate, NULL, 0); |
645 | 645 |
646 __ mov(ip, Operand(sp)); | 646 __ mov(ip, Operand(sp)); |
647 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); | 647 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
648 __ sub(fp, ip, Operand(4)); | 648 __ sub(fp, ip, Operand(4)); |
649 | 649 |
650 __ add(r4, r0, Operand(OFFSET_OF(D, a))); | 650 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(D, a)))); |
651 __ vldm(ia_w, r4, d0, d3); | 651 __ vldm(ia_w, r4, d0, d3); |
652 __ vldm(ia_w, r4, d4, d7); | 652 __ vldm(ia_w, r4, d4, d7); |
653 | 653 |
654 __ add(r4, r0, Operand(OFFSET_OF(D, a))); | 654 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(D, a)))); |
655 __ vstm(ia_w, r4, d6, d7); | 655 __ vstm(ia_w, r4, d6, d7); |
656 __ vstm(ia_w, r4, d0, d5); | 656 __ vstm(ia_w, r4, d0, d5); |
657 | 657 |
658 __ add(r4, r1, Operand(OFFSET_OF(F, a))); | 658 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, a)))); |
659 __ vldm(ia_w, r4, s0, s3); | 659 __ vldm(ia_w, r4, s0, s3); |
660 __ vldm(ia_w, r4, s4, s7); | 660 __ vldm(ia_w, r4, s4, s7); |
661 | 661 |
662 __ add(r4, r1, Operand(OFFSET_OF(F, a))); | 662 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, a)))); |
663 __ vstm(ia_w, r4, s6, s7); | 663 __ vstm(ia_w, r4, s6, s7); |
664 __ vstm(ia_w, r4, s0, s5); | 664 __ vstm(ia_w, r4, s0, s5); |
665 | 665 |
666 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); | 666 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); |
667 | 667 |
668 CodeDesc desc; | 668 CodeDesc desc; |
669 assm.GetCode(&desc); | 669 assm.GetCode(&desc); |
670 Handle<Code> code = isolate->factory()->NewCode( | 670 Handle<Code> code = isolate->factory()->NewCode( |
671 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 671 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
672 #ifdef DEBUG | 672 #ifdef DEBUG |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 F f; | 746 F f; |
747 | 747 |
748 // Create a function that uses vldm/vstm to move some double and | 748 // Create a function that uses vldm/vstm to move some double and |
749 // single precision values around in memory. | 749 // single precision values around in memory. |
750 Assembler assm(isolate, NULL, 0); | 750 Assembler assm(isolate, NULL, 0); |
751 | 751 |
752 __ mov(ip, Operand(sp)); | 752 __ mov(ip, Operand(sp)); |
753 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); | 753 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
754 __ sub(fp, ip, Operand(4)); | 754 __ sub(fp, ip, Operand(4)); |
755 | 755 |
756 __ add(r4, r0, Operand(OFFSET_OF(D, a))); | 756 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(D, a)))); |
757 __ vldm(ia, r4, d0, d3); | 757 __ vldm(ia, r4, d0, d3); |
758 __ add(r4, r4, Operand(4 * 8)); | 758 __ add(r4, r4, Operand(4 * 8)); |
759 __ vldm(ia, r4, d4, d7); | 759 __ vldm(ia, r4, d4, d7); |
760 | 760 |
761 __ add(r4, r0, Operand(OFFSET_OF(D, a))); | 761 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(D, a)))); |
762 __ vstm(ia, r4, d6, d7); | 762 __ vstm(ia, r4, d6, d7); |
763 __ add(r4, r4, Operand(2 * 8)); | 763 __ add(r4, r4, Operand(2 * 8)); |
764 __ vstm(ia, r4, d0, d5); | 764 __ vstm(ia, r4, d0, d5); |
765 | 765 |
766 __ add(r4, r1, Operand(OFFSET_OF(F, a))); | 766 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, a)))); |
767 __ vldm(ia, r4, s0, s3); | 767 __ vldm(ia, r4, s0, s3); |
768 __ add(r4, r4, Operand(4 * 4)); | 768 __ add(r4, r4, Operand(4 * 4)); |
769 __ vldm(ia, r4, s4, s7); | 769 __ vldm(ia, r4, s4, s7); |
770 | 770 |
771 __ add(r4, r1, Operand(OFFSET_OF(F, a))); | 771 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, a)))); |
772 __ vstm(ia, r4, s6, s7); | 772 __ vstm(ia, r4, s6, s7); |
773 __ add(r4, r4, Operand(2 * 4)); | 773 __ add(r4, r4, Operand(2 * 4)); |
774 __ vstm(ia, r4, s0, s5); | 774 __ vstm(ia, r4, s0, s5); |
775 | 775 |
776 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); | 776 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); |
777 | 777 |
778 CodeDesc desc; | 778 CodeDesc desc; |
779 assm.GetCode(&desc); | 779 assm.GetCode(&desc); |
780 Handle<Code> code = isolate->factory()->NewCode( | 780 Handle<Code> code = isolate->factory()->NewCode( |
781 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 781 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 F f; | 856 F f; |
857 | 857 |
858 // Create a function that uses vldm/vstm to move some double and | 858 // Create a function that uses vldm/vstm to move some double and |
859 // single precision values around in memory. | 859 // single precision values around in memory. |
860 Assembler assm(isolate, NULL, 0); | 860 Assembler assm(isolate, NULL, 0); |
861 | 861 |
862 __ mov(ip, Operand(sp)); | 862 __ mov(ip, Operand(sp)); |
863 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); | 863 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
864 __ sub(fp, ip, Operand(4)); | 864 __ sub(fp, ip, Operand(4)); |
865 | 865 |
866 __ add(r4, r0, Operand(OFFSET_OF(D, h) + 8)); | 866 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(D, h)) + 8)); |
867 __ vldm(db_w, r4, d4, d7); | 867 __ vldm(db_w, r4, d4, d7); |
868 __ vldm(db_w, r4, d0, d3); | 868 __ vldm(db_w, r4, d0, d3); |
869 | 869 |
870 __ add(r4, r0, Operand(OFFSET_OF(D, h) + 8)); | 870 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(D, h)) + 8)); |
871 __ vstm(db_w, r4, d0, d5); | 871 __ vstm(db_w, r4, d0, d5); |
872 __ vstm(db_w, r4, d6, d7); | 872 __ vstm(db_w, r4, d6, d7); |
873 | 873 |
874 __ add(r4, r1, Operand(OFFSET_OF(F, h) + 4)); | 874 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, h)) + 4)); |
875 __ vldm(db_w, r4, s4, s7); | 875 __ vldm(db_w, r4, s4, s7); |
876 __ vldm(db_w, r4, s0, s3); | 876 __ vldm(db_w, r4, s0, s3); |
877 | 877 |
878 __ add(r4, r1, Operand(OFFSET_OF(F, h) + 4)); | 878 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, h)) + 4)); |
879 __ vstm(db_w, r4, s0, s5); | 879 __ vstm(db_w, r4, s0, s5); |
880 __ vstm(db_w, r4, s6, s7); | 880 __ vstm(db_w, r4, s6, s7); |
881 | 881 |
882 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); | 882 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); |
883 | 883 |
884 CodeDesc desc; | 884 CodeDesc desc; |
885 assm.GetCode(&desc); | 885 assm.GetCode(&desc); |
886 Handle<Code> code = isolate->factory()->NewCode( | 886 Handle<Code> code = isolate->factory()->NewCode( |
887 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 887 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
888 #ifdef DEBUG | 888 #ifdef DEBUG |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 int32_t d; | 944 int32_t d; |
945 } I; | 945 } I; |
946 I i; | 946 I i; |
947 | 947 |
948 i.a = 0xabcd0001; | 948 i.a = 0xabcd0001; |
949 i.b = 0xabcd0000; | 949 i.b = 0xabcd0000; |
950 | 950 |
951 Assembler assm(isolate, NULL, 0); | 951 Assembler assm(isolate, NULL, 0); |
952 | 952 |
953 // Test HeapObject untagging. | 953 // Test HeapObject untagging. |
954 __ ldr(r1, MemOperand(r0, OFFSET_OF(I, a))); | 954 __ ldr(r1, MemOperand(r0, offsetof(I, a))); |
955 __ mov(r1, Operand(r1, ASR, 1), SetCC); | 955 __ mov(r1, Operand(r1, ASR, 1), SetCC); |
956 __ adc(r1, r1, Operand(r1), LeaveCC, cs); | 956 __ adc(r1, r1, Operand(r1), LeaveCC, cs); |
957 __ str(r1, MemOperand(r0, OFFSET_OF(I, a))); | 957 __ str(r1, MemOperand(r0, offsetof(I, a))); |
958 | 958 |
959 __ ldr(r2, MemOperand(r0, OFFSET_OF(I, b))); | 959 __ ldr(r2, MemOperand(r0, offsetof(I, b))); |
960 __ mov(r2, Operand(r2, ASR, 1), SetCC); | 960 __ mov(r2, Operand(r2, ASR, 1), SetCC); |
961 __ adc(r2, r2, Operand(r2), LeaveCC, cs); | 961 __ adc(r2, r2, Operand(r2), LeaveCC, cs); |
962 __ str(r2, MemOperand(r0, OFFSET_OF(I, b))); | 962 __ str(r2, MemOperand(r0, offsetof(I, b))); |
963 | 963 |
964 // Test corner cases. | 964 // Test corner cases. |
965 __ mov(r1, Operand(0xffffffff)); | 965 __ mov(r1, Operand(0xffffffff)); |
966 __ mov(r2, Operand::Zero()); | 966 __ mov(r2, Operand::Zero()); |
967 __ mov(r3, Operand(r1, ASR, 1), SetCC); // Set the carry. | 967 __ mov(r3, Operand(r1, ASR, 1), SetCC); // Set the carry. |
968 __ adc(r3, r1, Operand(r2)); | 968 __ adc(r3, r1, Operand(r2)); |
969 __ str(r3, MemOperand(r0, OFFSET_OF(I, c))); | 969 __ str(r3, MemOperand(r0, offsetof(I, c))); |
970 | 970 |
971 __ mov(r1, Operand(0xffffffff)); | 971 __ mov(r1, Operand(0xffffffff)); |
972 __ mov(r2, Operand::Zero()); | 972 __ mov(r2, Operand::Zero()); |
973 __ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry. | 973 __ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry. |
974 __ adc(r3, r1, Operand(r2)); | 974 __ adc(r3, r1, Operand(r2)); |
975 __ str(r3, MemOperand(r0, OFFSET_OF(I, d))); | 975 __ str(r3, MemOperand(r0, offsetof(I, d))); |
976 | 976 |
977 __ mov(pc, Operand(lr)); | 977 __ mov(pc, Operand(lr)); |
978 | 978 |
979 CodeDesc desc; | 979 CodeDesc desc; |
980 assm.GetCode(&desc); | 980 assm.GetCode(&desc); |
981 Handle<Code> code = isolate->factory()->NewCode( | 981 Handle<Code> code = isolate->factory()->NewCode( |
982 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 982 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
983 #ifdef DEBUG | 983 #ifdef DEBUG |
984 OFStream os(stdout); | 984 OFStream os(stdout); |
985 code->Print(os); | 985 code->Print(os); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 Label L, C; | 1041 Label L, C; |
1042 | 1042 |
1043 | 1043 |
1044 if (CpuFeatures::IsSupported(VFP3)) { | 1044 if (CpuFeatures::IsSupported(VFP3)) { |
1045 CpuFeatureScope scope(&assm, VFP3); | 1045 CpuFeatureScope scope(&assm, VFP3); |
1046 | 1046 |
1047 __ stm(db_w, sp, r4.bit() | lr.bit()); | 1047 __ stm(db_w, sp, r4.bit() | lr.bit()); |
1048 | 1048 |
1049 // Load a, b, c into d16, d17, d18. | 1049 // Load a, b, c into d16, d17, d18. |
1050 __ mov(r4, Operand(r0)); | 1050 __ mov(r4, Operand(r0)); |
1051 __ vldr(d16, r4, OFFSET_OF(T, a)); | 1051 __ vldr(d16, r4, offsetof(T, a)); |
1052 __ vldr(d17, r4, OFFSET_OF(T, b)); | 1052 __ vldr(d17, r4, offsetof(T, b)); |
1053 __ vldr(d18, r4, OFFSET_OF(T, c)); | 1053 __ vldr(d18, r4, offsetof(T, c)); |
1054 | 1054 |
1055 __ vneg(d25, d16); | 1055 __ vneg(d25, d16); |
1056 __ vadd(d25, d25, d17); | 1056 __ vadd(d25, d25, d17); |
1057 __ vsub(d25, d25, d18); | 1057 __ vsub(d25, d25, d18); |
1058 __ vmul(d25, d25, d25); | 1058 __ vmul(d25, d25, d25); |
1059 __ vdiv(d25, d25, d18); | 1059 __ vdiv(d25, d25, d18); |
1060 | 1060 |
1061 __ vmov(d16, d25); | 1061 __ vmov(d16, d25); |
1062 __ vsqrt(d17, d25); | 1062 __ vsqrt(d17, d25); |
1063 __ vneg(d17, d17); | 1063 __ vneg(d17, d17); |
1064 __ vabs(d17, d17); | 1064 __ vabs(d17, d17); |
1065 __ vmla(d18, d16, d17); | 1065 __ vmla(d18, d16, d17); |
1066 | 1066 |
1067 // Store d16, d17, d18 into a, b, c. | 1067 // Store d16, d17, d18 into a, b, c. |
1068 __ mov(r4, Operand(r0)); | 1068 __ mov(r4, Operand(r0)); |
1069 __ vstr(d16, r4, OFFSET_OF(T, a)); | 1069 __ vstr(d16, r4, offsetof(T, a)); |
1070 __ vstr(d17, r4, OFFSET_OF(T, b)); | 1070 __ vstr(d17, r4, offsetof(T, b)); |
1071 __ vstr(d18, r4, OFFSET_OF(T, c)); | 1071 __ vstr(d18, r4, offsetof(T, c)); |
1072 | 1072 |
1073 // Load x, y, z into d29-d31. | 1073 // Load x, y, z into d29-d31. |
1074 __ add(r4, r0, Operand(OFFSET_OF(T, x))); | 1074 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, x)))); |
1075 __ vldm(ia_w, r4, d29, d31); | 1075 __ vldm(ia_w, r4, d29, d31); |
1076 | 1076 |
1077 // Swap d29 and d30 via r registers. | 1077 // Swap d29 and d30 via r registers. |
1078 __ vmov(r1, r2, d29); | 1078 __ vmov(r1, r2, d29); |
1079 __ vmov(d29, d30); | 1079 __ vmov(d29, d30); |
1080 __ vmov(d30, r1, r2); | 1080 __ vmov(d30, r1, r2); |
1081 | 1081 |
1082 // Convert to and from integer. | 1082 // Convert to and from integer. |
1083 __ vcvt_s32_f64(s1, d31); | 1083 __ vcvt_s32_f64(s1, d31); |
1084 __ vcvt_f64_u32(d31, s1); | 1084 __ vcvt_f64_u32(d31, s1); |
1085 | 1085 |
1086 // Store d29-d31 into x, y, z. | 1086 // Store d29-d31 into x, y, z. |
1087 __ add(r4, r0, Operand(OFFSET_OF(T, x))); | 1087 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, x)))); |
1088 __ vstm(ia_w, r4, d29, d31); | 1088 __ vstm(ia_w, r4, d29, d31); |
1089 | 1089 |
1090 // Move constants into d20, d21, d22 and store into i, j, k. | 1090 // Move constants into d20, d21, d22 and store into i, j, k. |
1091 __ vmov(d20, 14.7610017472335499); | 1091 __ vmov(d20, 14.7610017472335499); |
1092 __ vmov(d21, 16.0); | 1092 __ vmov(d21, 16.0); |
1093 __ mov(r1, Operand(372106121)); | 1093 __ mov(r1, Operand(372106121)); |
1094 __ mov(r2, Operand(1079146608)); | 1094 __ mov(r2, Operand(1079146608)); |
1095 __ vmov(d22, VmovIndexLo, r1); | 1095 __ vmov(d22, VmovIndexLo, r1); |
1096 __ vmov(d22, VmovIndexHi, r2); | 1096 __ vmov(d22, VmovIndexHi, r2); |
1097 __ add(r4, r0, Operand(OFFSET_OF(T, i))); | 1097 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, i)))); |
1098 __ vstm(ia_w, r4, d20, d22); | 1098 __ vstm(ia_w, r4, d20, d22); |
1099 // Move d22 into low and high. | 1099 // Move d22 into low and high. |
1100 __ vmov(r4, VmovIndexLo, d22); | 1100 __ vmov(r4, VmovIndexLo, d22); |
1101 __ str(r4, MemOperand(r0, OFFSET_OF(T, low))); | 1101 __ str(r4, MemOperand(r0, offsetof(T, low))); |
1102 __ vmov(r4, VmovIndexHi, d22); | 1102 __ vmov(r4, VmovIndexHi, d22); |
1103 __ str(r4, MemOperand(r0, OFFSET_OF(T, high))); | 1103 __ str(r4, MemOperand(r0, offsetof(T, high))); |
1104 | 1104 |
1105 __ ldm(ia_w, sp, r4.bit() | pc.bit()); | 1105 __ ldm(ia_w, sp, r4.bit() | pc.bit()); |
1106 | 1106 |
1107 CodeDesc desc; | 1107 CodeDesc desc; |
1108 assm.GetCode(&desc); | 1108 assm.GetCode(&desc); |
1109 Handle<Code> code = isolate->factory()->NewCode( | 1109 Handle<Code> code = isolate->factory()->NewCode( |
1110 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1110 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
1111 #ifdef DEBUG | 1111 #ifdef DEBUG |
1112 OFStream os(stdout); | 1112 OFStream os(stdout); |
1113 code->Print(os); | 1113 code->Print(os); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 | 1157 |
1158 // Ensure FPSCR state (as JSEntryStub does). | 1158 // Ensure FPSCR state (as JSEntryStub does). |
1159 Label fpscr_done; | 1159 Label fpscr_done; |
1160 __ vmrs(r1); | 1160 __ vmrs(r1); |
1161 __ tst(r1, Operand(kVFPDefaultNaNModeControlBit)); | 1161 __ tst(r1, Operand(kVFPDefaultNaNModeControlBit)); |
1162 __ b(ne, &fpscr_done); | 1162 __ b(ne, &fpscr_done); |
1163 __ orr(r1, r1, Operand(kVFPDefaultNaNModeControlBit)); | 1163 __ orr(r1, r1, Operand(kVFPDefaultNaNModeControlBit)); |
1164 __ vmsr(r1); | 1164 __ vmsr(r1); |
1165 __ bind(&fpscr_done); | 1165 __ bind(&fpscr_done); |
1166 | 1166 |
1167 __ vldr(d0, r0, OFFSET_OF(T, left)); | 1167 __ vldr(d0, r0, offsetof(T, left)); |
1168 __ vldr(d1, r0, OFFSET_OF(T, right)); | 1168 __ vldr(d1, r0, offsetof(T, right)); |
1169 __ vadd(d2, d0, d1); | 1169 __ vadd(d2, d0, d1); |
1170 __ vstr(d2, r0, OFFSET_OF(T, add_result)); | 1170 __ vstr(d2, r0, offsetof(T, add_result)); |
1171 __ vsub(d2, d0, d1); | 1171 __ vsub(d2, d0, d1); |
1172 __ vstr(d2, r0, OFFSET_OF(T, sub_result)); | 1172 __ vstr(d2, r0, offsetof(T, sub_result)); |
1173 __ vmul(d2, d0, d1); | 1173 __ vmul(d2, d0, d1); |
1174 __ vstr(d2, r0, OFFSET_OF(T, mul_result)); | 1174 __ vstr(d2, r0, offsetof(T, mul_result)); |
1175 __ vdiv(d2, d0, d1); | 1175 __ vdiv(d2, d0, d1); |
1176 __ vstr(d2, r0, OFFSET_OF(T, div_result)); | 1176 __ vstr(d2, r0, offsetof(T, div_result)); |
1177 | 1177 |
1178 __ mov(pc, Operand(lr)); | 1178 __ mov(pc, Operand(lr)); |
1179 | 1179 |
1180 CodeDesc desc; | 1180 CodeDesc desc; |
1181 assm.GetCode(&desc); | 1181 assm.GetCode(&desc); |
1182 Handle<Code> code = isolate->factory()->NewCode( | 1182 Handle<Code> code = isolate->factory()->NewCode( |
1183 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1183 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
1184 #ifdef DEBUG | 1184 #ifdef DEBUG |
1185 OFStream os(stdout); | 1185 OFStream os(stdout); |
1186 code->Print(os); | 1186 code->Print(os); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 // Create a function that accepts &t, and loads, manipulates, and stores | 1257 // Create a function that accepts &t, and loads, manipulates, and stores |
1258 // the doubles and floats. | 1258 // the doubles and floats. |
1259 Assembler assm(isolate, NULL, 0); | 1259 Assembler assm(isolate, NULL, 0); |
1260 | 1260 |
1261 | 1261 |
1262 if (CpuFeatures::IsSupported(NEON)) { | 1262 if (CpuFeatures::IsSupported(NEON)) { |
1263 CpuFeatureScope scope(&assm, NEON); | 1263 CpuFeatureScope scope(&assm, NEON); |
1264 | 1264 |
1265 __ stm(db_w, sp, r4.bit() | lr.bit()); | 1265 __ stm(db_w, sp, r4.bit() | lr.bit()); |
1266 // Move 32 bytes with neon. | 1266 // Move 32 bytes with neon. |
1267 __ add(r4, r0, Operand(OFFSET_OF(T, src0))); | 1267 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, src0)))); |
1268 __ vld1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(r4)); | 1268 __ vld1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(r4)); |
1269 __ add(r4, r0, Operand(OFFSET_OF(T, dst0))); | 1269 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, dst0)))); |
1270 __ vst1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(r4)); | 1270 __ vst1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(r4)); |
1271 | 1271 |
1272 // Expand 8 bytes into 8 words(16 bits). | 1272 // Expand 8 bytes into 8 words(16 bits). |
1273 __ add(r4, r0, Operand(OFFSET_OF(T, srcA0))); | 1273 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, srcA0)))); |
1274 __ vld1(Neon8, NeonListOperand(d0), NeonMemOperand(r4)); | 1274 __ vld1(Neon8, NeonListOperand(d0), NeonMemOperand(r4)); |
1275 __ vmovl(NeonU8, q0, d0); | 1275 __ vmovl(NeonU8, q0, d0); |
1276 __ add(r4, r0, Operand(OFFSET_OF(T, dstA0))); | 1276 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, dstA0)))); |
1277 __ vst1(Neon8, NeonListOperand(d0, 2), NeonMemOperand(r4)); | 1277 __ vst1(Neon8, NeonListOperand(d0, 2), NeonMemOperand(r4)); |
1278 | 1278 |
1279 // The same expansion, but with different source and destination registers. | 1279 // The same expansion, but with different source and destination registers. |
1280 __ add(r4, r0, Operand(OFFSET_OF(T, srcA0))); | 1280 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, srcA0)))); |
1281 __ vld1(Neon8, NeonListOperand(d1), NeonMemOperand(r4)); | 1281 __ vld1(Neon8, NeonListOperand(d1), NeonMemOperand(r4)); |
1282 __ vmovl(NeonU8, q1, d1); | 1282 __ vmovl(NeonU8, q1, d1); |
1283 __ add(r4, r0, Operand(OFFSET_OF(T, dstA4))); | 1283 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, dstA4)))); |
1284 __ vst1(Neon8, NeonListOperand(d2, 2), NeonMemOperand(r4)); | 1284 __ vst1(Neon8, NeonListOperand(d2, 2), NeonMemOperand(r4)); |
1285 | 1285 |
1286 __ ldm(ia_w, sp, r4.bit() | pc.bit()); | 1286 __ ldm(ia_w, sp, r4.bit() | pc.bit()); |
1287 | 1287 |
1288 CodeDesc desc; | 1288 CodeDesc desc; |
1289 assm.GetCode(&desc); | 1289 assm.GetCode(&desc); |
1290 Handle<Code> code = isolate->factory()->NewCode( | 1290 Handle<Code> code = isolate->factory()->NewCode( |
1291 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1291 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
1292 #ifdef DEBUG | 1292 #ifdef DEBUG |
1293 OFStream os(stdout); | 1293 OFStream os(stdout); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 } T; | 1360 } T; |
1361 T t; | 1361 T t; |
1362 | 1362 |
1363 // Create a function that accepts &t, and loads, manipulates, and stores | 1363 // Create a function that accepts &t, and loads, manipulates, and stores |
1364 // the doubles and floats. | 1364 // the doubles and floats. |
1365 Assembler assm(isolate, NULL, 0); | 1365 Assembler assm(isolate, NULL, 0); |
1366 | 1366 |
1367 __ stm(db_w, sp, r4.bit() | lr.bit()); | 1367 __ stm(db_w, sp, r4.bit() | lr.bit()); |
1368 | 1368 |
1369 __ mov(r4, Operand(r0)); | 1369 __ mov(r4, Operand(r0)); |
1370 __ ldr(r0, MemOperand(r4, OFFSET_OF(T, src0))); | 1370 __ ldr(r0, MemOperand(r4, offsetof(T, src0))); |
1371 __ ldr(r1, MemOperand(r4, OFFSET_OF(T, src1))); | 1371 __ ldr(r1, MemOperand(r4, offsetof(T, src1))); |
1372 | 1372 |
1373 __ pkhbt(r2, r0, Operand(r1, LSL, 8)); | 1373 __ pkhbt(r2, r0, Operand(r1, LSL, 8)); |
1374 __ str(r2, MemOperand(r4, OFFSET_OF(T, dst0))); | 1374 __ str(r2, MemOperand(r4, offsetof(T, dst0))); |
1375 | 1375 |
1376 __ pkhtb(r2, r0, Operand(r1, ASR, 8)); | 1376 __ pkhtb(r2, r0, Operand(r1, ASR, 8)); |
1377 __ str(r2, MemOperand(r4, OFFSET_OF(T, dst1))); | 1377 __ str(r2, MemOperand(r4, offsetof(T, dst1))); |
1378 | 1378 |
1379 __ uxtb16(r2, r0, 8); | 1379 __ uxtb16(r2, r0, 8); |
1380 __ str(r2, MemOperand(r4, OFFSET_OF(T, dst2))); | 1380 __ str(r2, MemOperand(r4, offsetof(T, dst2))); |
1381 | 1381 |
1382 __ uxtb(r2, r0, 8); | 1382 __ uxtb(r2, r0, 8); |
1383 __ str(r2, MemOperand(r4, OFFSET_OF(T, dst3))); | 1383 __ str(r2, MemOperand(r4, offsetof(T, dst3))); |
1384 | 1384 |
1385 __ ldr(r0, MemOperand(r4, OFFSET_OF(T, src2))); | 1385 __ ldr(r0, MemOperand(r4, offsetof(T, src2))); |
1386 __ uxtab(r2, r0, r1, 8); | 1386 __ uxtab(r2, r0, r1, 8); |
1387 __ str(r2, MemOperand(r4, OFFSET_OF(T, dst4))); | 1387 __ str(r2, MemOperand(r4, offsetof(T, dst4))); |
1388 | 1388 |
1389 __ ldm(ia_w, sp, r4.bit() | pc.bit()); | 1389 __ ldm(ia_w, sp, r4.bit() | pc.bit()); |
1390 | 1390 |
1391 CodeDesc desc; | 1391 CodeDesc desc; |
1392 assm.GetCode(&desc); | 1392 assm.GetCode(&desc); |
1393 Handle<Code> code = isolate->factory()->NewCode( | 1393 Handle<Code> code = isolate->factory()->NewCode( |
1394 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1394 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
1395 #ifdef DEBUG | 1395 #ifdef DEBUG |
1396 OFStream os(stdout); | 1396 OFStream os(stdout); |
1397 code->Print(os); | 1397 code->Print(os); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 int32_t dividend; | 1454 int32_t dividend; |
1455 int32_t divisor; | 1455 int32_t divisor; |
1456 int32_t result; | 1456 int32_t result; |
1457 } t; | 1457 } t; |
1458 | 1458 |
1459 if (CpuFeatures::IsSupported(SUDIV)) { | 1459 if (CpuFeatures::IsSupported(SUDIV)) { |
1460 CpuFeatureScope scope(&assm, SUDIV); | 1460 CpuFeatureScope scope(&assm, SUDIV); |
1461 | 1461 |
1462 __ mov(r3, Operand(r0)); | 1462 __ mov(r3, Operand(r0)); |
1463 | 1463 |
1464 __ ldr(r0, MemOperand(r3, OFFSET_OF(T, dividend))); | 1464 __ ldr(r0, MemOperand(r3, offsetof(T, dividend))); |
1465 __ ldr(r1, MemOperand(r3, OFFSET_OF(T, divisor))); | 1465 __ ldr(r1, MemOperand(r3, offsetof(T, divisor))); |
1466 | 1466 |
1467 __ sdiv(r2, r0, r1); | 1467 __ sdiv(r2, r0, r1); |
1468 __ str(r2, MemOperand(r3, OFFSET_OF(T, result))); | 1468 __ str(r2, MemOperand(r3, offsetof(T, result))); |
1469 | 1469 |
1470 __ bx(lr); | 1470 __ bx(lr); |
1471 | 1471 |
1472 CodeDesc desc; | 1472 CodeDesc desc; |
1473 assm.GetCode(&desc); | 1473 assm.GetCode(&desc); |
1474 Handle<Code> code = isolate->factory()->NewCode( | 1474 Handle<Code> code = isolate->factory()->NewCode( |
1475 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1475 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
1476 #ifdef DEBUG | 1476 #ifdef DEBUG |
1477 OFStream os(stdout); | 1477 OFStream os(stdout); |
1478 code->Print(os); | 1478 code->Print(os); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 uint32_t dividend; | 1518 uint32_t dividend; |
1519 uint32_t divisor; | 1519 uint32_t divisor; |
1520 uint32_t result; | 1520 uint32_t result; |
1521 } t; | 1521 } t; |
1522 | 1522 |
1523 if (CpuFeatures::IsSupported(SUDIV)) { | 1523 if (CpuFeatures::IsSupported(SUDIV)) { |
1524 CpuFeatureScope scope(&assm, SUDIV); | 1524 CpuFeatureScope scope(&assm, SUDIV); |
1525 | 1525 |
1526 __ mov(r3, Operand(r0)); | 1526 __ mov(r3, Operand(r0)); |
1527 | 1527 |
1528 __ ldr(r0, MemOperand(r3, OFFSET_OF(T, dividend))); | 1528 __ ldr(r0, MemOperand(r3, offsetof(T, dividend))); |
1529 __ ldr(r1, MemOperand(r3, OFFSET_OF(T, divisor))); | 1529 __ ldr(r1, MemOperand(r3, offsetof(T, divisor))); |
1530 | 1530 |
1531 __ sdiv(r2, r0, r1); | 1531 __ sdiv(r2, r0, r1); |
1532 __ str(r2, MemOperand(r3, OFFSET_OF(T, result))); | 1532 __ str(r2, MemOperand(r3, offsetof(T, result))); |
1533 | 1533 |
1534 __ bx(lr); | 1534 __ bx(lr); |
1535 | 1535 |
1536 CodeDesc desc; | 1536 CodeDesc desc; |
1537 assm.GetCode(&desc); | 1537 assm.GetCode(&desc); |
1538 Handle<Code> code = isolate->factory()->NewCode( | 1538 Handle<Code> code = isolate->factory()->NewCode( |
1539 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1539 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
1540 #ifdef DEBUG | 1540 #ifdef DEBUG |
1541 OFStream os(stdout); | 1541 OFStream os(stdout); |
1542 code->Print(os); | 1542 code->Print(os); |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1910 | 1910 |
1911 if (CpuFeatures::IsSupported(ARMv8)) { | 1911 if (CpuFeatures::IsSupported(ARMv8)) { |
1912 CpuFeatureScope scope(&assm, ARMv8); | 1912 CpuFeatureScope scope(&assm, ARMv8); |
1913 | 1913 |
1914 __ mov(ip, Operand(sp)); | 1914 __ mov(ip, Operand(sp)); |
1915 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); | 1915 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
1916 | 1916 |
1917 __ mov(r4, Operand(r0)); | 1917 __ mov(r4, Operand(r0)); |
1918 | 1918 |
1919 // Test vrinta | 1919 // Test vrinta |
1920 __ vldr(d6, r4, OFFSET_OF(T, input)); | 1920 __ vldr(d6, r4, offsetof(T, input)); |
1921 __ vrinta(d5, d6); | 1921 __ vrinta(d5, d6); |
1922 __ vstr(d5, r4, OFFSET_OF(T, ar)); | 1922 __ vstr(d5, r4, offsetof(T, ar)); |
1923 | 1923 |
1924 // Test vrintn | 1924 // Test vrintn |
1925 __ vldr(d6, r4, OFFSET_OF(T, input)); | 1925 __ vldr(d6, r4, offsetof(T, input)); |
1926 __ vrintn(d5, d6); | 1926 __ vrintn(d5, d6); |
1927 __ vstr(d5, r4, OFFSET_OF(T, nr)); | 1927 __ vstr(d5, r4, offsetof(T, nr)); |
1928 | 1928 |
1929 // Test vrintp | 1929 // Test vrintp |
1930 __ vldr(d6, r4, OFFSET_OF(T, input)); | 1930 __ vldr(d6, r4, offsetof(T, input)); |
1931 __ vrintp(d5, d6); | 1931 __ vrintp(d5, d6); |
1932 __ vstr(d5, r4, OFFSET_OF(T, pr)); | 1932 __ vstr(d5, r4, offsetof(T, pr)); |
1933 | 1933 |
1934 // Test vrintm | 1934 // Test vrintm |
1935 __ vldr(d6, r4, OFFSET_OF(T, input)); | 1935 __ vldr(d6, r4, offsetof(T, input)); |
1936 __ vrintm(d5, d6); | 1936 __ vrintm(d5, d6); |
1937 __ vstr(d5, r4, OFFSET_OF(T, mr)); | 1937 __ vstr(d5, r4, offsetof(T, mr)); |
1938 | 1938 |
1939 // Test vrintz | 1939 // Test vrintz |
1940 __ vldr(d6, r4, OFFSET_OF(T, input)); | 1940 __ vldr(d6, r4, offsetof(T, input)); |
1941 __ vrintz(d5, d6); | 1941 __ vrintz(d5, d6); |
1942 __ vstr(d5, r4, OFFSET_OF(T, zr)); | 1942 __ vstr(d5, r4, offsetof(T, zr)); |
1943 | 1943 |
1944 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); | 1944 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); |
1945 | 1945 |
1946 CodeDesc desc; | 1946 CodeDesc desc; |
1947 assm.GetCode(&desc); | 1947 assm.GetCode(&desc); |
1948 Handle<Code> code = isolate->factory()->NewCode( | 1948 Handle<Code> code = isolate->factory()->NewCode( |
1949 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1949 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
1950 #ifdef DEBUG | 1950 #ifdef DEBUG |
1951 OFStream os(stdout); | 1951 OFStream os(stdout); |
1952 code->Print(os); | 1952 code->Print(os); |
(...skipping 22 matching lines...) Expand all Loading... |
1975 CHECK_VRINT(inf, inf, inf, inf, inf, inf) | 1975 CHECK_VRINT(inf, inf, inf, inf, inf, inf) |
1976 CHECK_VRINT(-inf, -inf, -inf, -inf, -inf, -inf) | 1976 CHECK_VRINT(-inf, -inf, -inf, -inf, -inf, -inf) |
1977 CHECK_VRINT(-0.0, -0.0, -0.0, -0.0, -0.0, -0.0) | 1977 CHECK_VRINT(-0.0, -0.0, -0.0, -0.0, -0.0, -0.0) |
1978 double nan = std::numeric_limits<double>::quiet_NaN(); | 1978 double nan = std::numeric_limits<double>::quiet_NaN(); |
1979 CHECK_VRINT(nan, nan, nan, nan, nan, nan) | 1979 CHECK_VRINT(nan, nan, nan, nan, nan, nan) |
1980 | 1980 |
1981 #undef CHECK_VRINT | 1981 #undef CHECK_VRINT |
1982 } | 1982 } |
1983 } | 1983 } |
1984 #undef __ | 1984 #undef __ |
OLD | NEW |