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

Side by Side Diff: test/cctest/test-assembler-arm.cc

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 years, 6 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
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 CcTest::InitializeVM(); 54 CcTest::InitializeVM();
55 Isolate* isolate = CcTest::i_isolate(); 55 Isolate* isolate = CcTest::i_isolate();
56 HandleScope scope(isolate); 56 HandleScope scope(isolate);
57 57
58 Assembler assm(isolate, NULL, 0); 58 Assembler assm(isolate, NULL, 0);
59 59
60 __ add(r0, r0, Operand(r1)); 60 __ add(r0, r0, Operand(r1));
61 __ mov(pc, Operand(lr)); 61 __ mov(pc, Operand(lr));
62 62
63 CodeDesc desc; 63 CodeDesc desc;
64 assm.GetCode(&desc); 64 assm.GetCode(isolate, &desc);
65 Handle<Code> code = isolate->factory()->NewCode( 65 Handle<Code> code = isolate->factory()->NewCode(
66 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 66 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
67 #ifdef DEBUG 67 #ifdef DEBUG
68 OFStream os(stdout); 68 OFStream os(stdout);
69 code->Print(os); 69 code->Print(os);
70 #endif 70 #endif
71 F2 f = FUNCTION_CAST<F2>(code->entry()); 71 F2 f = FUNCTION_CAST<F2>(code->entry());
72 int res = 72 int res =
73 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 3, 4, 0, 0, 0)); 73 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 3, 4, 0, 0, 0));
74 ::printf("f() = %d\n", res); 74 ::printf("f() = %d\n", res);
(...skipping 16 matching lines...) Expand all
91 __ bind(&L); 91 __ bind(&L);
92 __ add(r0, r0, Operand(r1)); 92 __ add(r0, r0, Operand(r1));
93 __ sub(r1, r1, Operand(1)); 93 __ sub(r1, r1, Operand(1));
94 94
95 __ bind(&C); 95 __ bind(&C);
96 __ teq(r1, Operand::Zero()); 96 __ teq(r1, Operand::Zero());
97 __ b(ne, &L); 97 __ b(ne, &L);
98 __ mov(pc, Operand(lr)); 98 __ mov(pc, Operand(lr));
99 99
100 CodeDesc desc; 100 CodeDesc desc;
101 assm.GetCode(&desc); 101 assm.GetCode(isolate, &desc);
102 Handle<Code> code = isolate->factory()->NewCode( 102 Handle<Code> code = isolate->factory()->NewCode(
103 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 103 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
104 #ifdef DEBUG 104 #ifdef DEBUG
105 OFStream os(stdout); 105 OFStream os(stdout);
106 code->Print(os); 106 code->Print(os);
107 #endif 107 #endif
108 F1 f = FUNCTION_CAST<F1>(code->entry()); 108 F1 f = FUNCTION_CAST<F1>(code->entry());
109 int res = 109 int res =
110 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 100, 0, 0, 0, 0)); 110 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 100, 0, 0, 0, 0));
111 ::printf("f() = %d\n", res); 111 ::printf("f() = %d\n", res);
(...skipping 25 matching lines...) Expand all
137 // some relocated stuff here, not executed 137 // some relocated stuff here, not executed
138 __ RecordComment("dead code, just testing relocations"); 138 __ RecordComment("dead code, just testing relocations");
139 __ mov(r0, Operand(isolate->factory()->true_value())); 139 __ mov(r0, Operand(isolate->factory()->true_value()));
140 __ RecordComment("dead code, just testing immediate operands"); 140 __ RecordComment("dead code, just testing immediate operands");
141 __ mov(r0, Operand(-1)); 141 __ mov(r0, Operand(-1));
142 __ mov(r0, Operand(0xFF000000)); 142 __ mov(r0, Operand(0xFF000000));
143 __ mov(r0, Operand(0xF0F0F0F0)); 143 __ mov(r0, Operand(0xF0F0F0F0));
144 __ mov(r0, Operand(0xFFF0FFFF)); 144 __ mov(r0, Operand(0xFFF0FFFF));
145 145
146 CodeDesc desc; 146 CodeDesc desc;
147 assm.GetCode(&desc); 147 assm.GetCode(isolate, &desc);
148 Handle<Code> code = isolate->factory()->NewCode( 148 Handle<Code> code = isolate->factory()->NewCode(
149 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 149 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
150 #ifdef DEBUG 150 #ifdef DEBUG
151 OFStream os(stdout); 151 OFStream os(stdout);
152 code->Print(os); 152 code->Print(os);
153 #endif 153 #endif
154 F1 f = FUNCTION_CAST<F1>(code->entry()); 154 F1 f = FUNCTION_CAST<F1>(code->entry());
155 int res = 155 int res =
156 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 10, 0, 0, 0, 0)); 156 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 10, 0, 0, 0, 0));
157 ::printf("f() = %d\n", res); 157 ::printf("f() = %d\n", res);
(...skipping 27 matching lines...) Expand all
185 __ add(r0, r2, Operand(r0)); 185 __ add(r0, r2, Operand(r0));
186 __ mov(r2, Operand(r2, LSL, 2)); 186 __ mov(r2, Operand(r2, LSL, 2));
187 __ strb(r2, MemOperand(r4, offsetof(T, c))); 187 __ strb(r2, MemOperand(r4, offsetof(T, c)));
188 __ ldrsh(r2, MemOperand(r4, offsetof(T, s))); 188 __ ldrsh(r2, MemOperand(r4, offsetof(T, s)));
189 __ add(r0, r2, Operand(r0)); 189 __ add(r0, r2, Operand(r0));
190 __ mov(r2, Operand(r2, ASR, 3)); 190 __ mov(r2, Operand(r2, ASR, 3));
191 __ strh(r2, MemOperand(r4, offsetof(T, s))); 191 __ strh(r2, MemOperand(r4, offsetof(T, s)));
192 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); 192 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
193 193
194 CodeDesc desc; 194 CodeDesc desc;
195 assm.GetCode(&desc); 195 assm.GetCode(isolate, &desc);
196 Handle<Code> code = isolate->factory()->NewCode( 196 Handle<Code> code = isolate->factory()->NewCode(
197 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 197 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
198 #ifdef DEBUG 198 #ifdef DEBUG
199 OFStream os(stdout); 199 OFStream os(stdout);
200 code->Print(os); 200 code->Print(os);
201 #endif 201 #endif
202 F3 f = FUNCTION_CAST<F3>(code->entry()); 202 F3 f = FUNCTION_CAST<F3>(code->entry());
203 t.i = 100000; 203 t.i = 100000;
204 t.c = 10; 204 t.c = 10;
205 t.s = 1000; 205 t.s = 1000;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 // Test vmov for single-precision immediates. 318 // Test vmov for single-precision immediates.
319 __ vmov(s0, 0.25f); 319 __ vmov(s0, 0.25f);
320 __ vstr(s0, r4, offsetof(T, o)); 320 __ vstr(s0, r4, offsetof(T, o));
321 __ vmov(s0, -16.0f); 321 __ vmov(s0, -16.0f);
322 __ vstr(s0, r4, offsetof(T, p)); 322 __ vstr(s0, r4, offsetof(T, p));
323 323
324 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); 324 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
325 325
326 CodeDesc desc; 326 CodeDesc desc;
327 assm.GetCode(&desc); 327 assm.GetCode(isolate, &desc);
328 Handle<Code> code = isolate->factory()->NewCode( 328 Handle<Code> code = isolate->factory()->NewCode(
329 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 329 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
330 #ifdef DEBUG 330 #ifdef DEBUG
331 OFStream os(stdout); 331 OFStream os(stdout);
332 code->Print(os); 332 code->Print(os);
333 #endif 333 #endif
334 F3 f = FUNCTION_CAST<F3>(code->entry()); 334 F3 f = FUNCTION_CAST<F3>(code->entry());
335 t.a = 1.5; 335 t.a = 1.5;
336 t.b = 2.75; 336 t.b = 2.75;
337 t.c = 17.17; 337 t.c = 17.17;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 CpuFeatureScope scope(&assm, ARMv7); 380 CpuFeatureScope scope(&assm, ARMv7);
381 // On entry, r0 = 0xAAAAAAAA = 0b10..10101010. 381 // On entry, r0 = 0xAAAAAAAA = 0b10..10101010.
382 __ ubfx(r0, r0, 1, 12); // 0b00..010101010101 = 0x555 382 __ ubfx(r0, r0, 1, 12); // 0b00..010101010101 = 0x555
383 __ sbfx(r0, r0, 0, 5); // 0b11..111111110101 = -11 383 __ sbfx(r0, r0, 0, 5); // 0b11..111111110101 = -11
384 __ bfc(r0, 1, 3); // 0b11..111111110001 = -15 384 __ bfc(r0, 1, 3); // 0b11..111111110001 = -15
385 __ mov(r1, Operand(7)); 385 __ mov(r1, Operand(7));
386 __ bfi(r0, r1, 3, 3); // 0b11..111111111001 = -7 386 __ bfi(r0, r1, 3, 3); // 0b11..111111111001 = -7
387 __ mov(pc, Operand(lr)); 387 __ mov(pc, Operand(lr));
388 388
389 CodeDesc desc; 389 CodeDesc desc;
390 assm.GetCode(&desc); 390 assm.GetCode(isolate, &desc);
391 Handle<Code> code = isolate->factory()->NewCode( 391 Handle<Code> code = isolate->factory()->NewCode(
392 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 392 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
393 #ifdef DEBUG 393 #ifdef DEBUG
394 OFStream os(stdout); 394 OFStream os(stdout);
395 code->Print(os); 395 code->Print(os);
396 #endif 396 #endif
397 F1 f = FUNCTION_CAST<F1>(code->entry()); 397 F1 f = FUNCTION_CAST<F1>(code->entry());
398 int res = reinterpret_cast<int>( 398 int res = reinterpret_cast<int>(
399 CALL_GENERATED_CODE(isolate, f, 0xAAAAAAAA, 0, 0, 0, 0)); 399 CALL_GENERATED_CODE(isolate, f, 0xAAAAAAAA, 0, 0, 0, 0));
400 ::printf("f() = %d\n", res); 400 ::printf("f() = %d\n", res);
(...skipping 11 matching lines...) Expand all
412 Assembler assm(isolate, NULL, 0); 412 Assembler assm(isolate, NULL, 0);
413 413
414 __ usat(r1, 8, Operand(r0)); // Sat 0xFFFF to 0-255 = 0xFF. 414 __ usat(r1, 8, Operand(r0)); // Sat 0xFFFF to 0-255 = 0xFF.
415 __ usat(r2, 12, Operand(r0, ASR, 9)); // Sat (0xFFFF>>9) to 0-4095 = 0x7F. 415 __ usat(r2, 12, Operand(r0, ASR, 9)); // Sat (0xFFFF>>9) to 0-4095 = 0x7F.
416 __ usat(r3, 1, Operand(r0, LSL, 16)); // Sat (0xFFFF<<16) to 0-1 = 0x0. 416 __ usat(r3, 1, Operand(r0, LSL, 16)); // Sat (0xFFFF<<16) to 0-1 = 0x0.
417 __ add(r0, r1, Operand(r2)); 417 __ add(r0, r1, Operand(r2));
418 __ add(r0, r0, Operand(r3)); 418 __ add(r0, r0, Operand(r3));
419 __ mov(pc, Operand(lr)); 419 __ mov(pc, Operand(lr));
420 420
421 CodeDesc desc; 421 CodeDesc desc;
422 assm.GetCode(&desc); 422 assm.GetCode(isolate, &desc);
423 Handle<Code> code = isolate->factory()->NewCode( 423 Handle<Code> code = isolate->factory()->NewCode(
424 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 424 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
425 #ifdef DEBUG 425 #ifdef DEBUG
426 OFStream os(stdout); 426 OFStream os(stdout);
427 code->Print(os); 427 code->Print(os);
428 #endif 428 #endif
429 F1 f = FUNCTION_CAST<F1>(code->entry()); 429 F1 f = FUNCTION_CAST<F1>(code->entry());
430 int res = reinterpret_cast<int>( 430 int res = reinterpret_cast<int>(
431 CALL_GENERATED_CODE(isolate, f, 0xFFFF, 0, 0, 0, 0)); 431 CALL_GENERATED_CODE(isolate, f, 0xFFFF, 0, 0, 0, 0));
432 ::printf("f() = %d\n", res); 432 ::printf("f() = %d\n", res);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 __ vmov(r0, s0); 481 __ vmov(r0, s0);
482 __ mov(pc, Operand(lr)); 482 __ mov(pc, Operand(lr));
483 483
484 // The exception behaviour is not what we expected. 484 // The exception behaviour is not what we expected.
485 // Load a special value and return. 485 // Load a special value and return.
486 __ bind(&wrong_exception); 486 __ bind(&wrong_exception);
487 __ mov(r0, Operand(11223344)); 487 __ mov(r0, Operand(11223344));
488 __ mov(pc, Operand(lr)); 488 __ mov(pc, Operand(lr));
489 489
490 CodeDesc desc; 490 CodeDesc desc;
491 assm.GetCode(&desc); 491 assm.GetCode(isolate, &desc);
492 Handle<Code> code = isolate->factory()->NewCode( 492 Handle<Code> code = isolate->factory()->NewCode(
493 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 493 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
494 #ifdef DEBUG 494 #ifdef DEBUG
495 OFStream os(stdout); 495 OFStream os(stdout);
496 code->Print(os); 496 code->Print(os);
497 #endif 497 #endif
498 F1 f = FUNCTION_CAST<F1>(code->entry()); 498 F1 f = FUNCTION_CAST<F1>(code->entry());
499 int res = 499 int res =
500 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 500 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
501 ::printf("res = %d\n", res); 501 ::printf("res = %d\n", res);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 __ vldm(ia_w, r4, s0, s3); 664 __ vldm(ia_w, r4, s0, s3);
665 __ vldm(ia_w, r4, s4, s7); 665 __ vldm(ia_w, r4, s4, s7);
666 666
667 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, a)))); 667 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, a))));
668 __ vstm(ia_w, r4, s6, s7); 668 __ vstm(ia_w, r4, s6, s7);
669 __ vstm(ia_w, r4, s0, s5); 669 __ vstm(ia_w, r4, s0, s5);
670 670
671 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); 671 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
672 672
673 CodeDesc desc; 673 CodeDesc desc;
674 assm.GetCode(&desc); 674 assm.GetCode(isolate, &desc);
675 Handle<Code> code = isolate->factory()->NewCode( 675 Handle<Code> code = isolate->factory()->NewCode(
676 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 676 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
677 #ifdef DEBUG 677 #ifdef DEBUG
678 OFStream os(stdout); 678 OFStream os(stdout);
679 code->Print(os); 679 code->Print(os);
680 #endif 680 #endif
681 F4 fn = FUNCTION_CAST<F4>(code->entry()); 681 F4 fn = FUNCTION_CAST<F4>(code->entry());
682 d.a = 1.1; 682 d.a = 1.1;
683 d.b = 2.2; 683 d.b = 2.2;
684 d.c = 3.3; 684 d.c = 3.3;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 __ vldm(ia, r4, s4, s7); 774 __ vldm(ia, r4, s4, s7);
775 775
776 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, a)))); 776 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, a))));
777 __ vstm(ia, r4, s6, s7); 777 __ vstm(ia, r4, s6, s7);
778 __ add(r4, r4, Operand(2 * 4)); 778 __ add(r4, r4, Operand(2 * 4));
779 __ vstm(ia, r4, s0, s5); 779 __ vstm(ia, r4, s0, s5);
780 780
781 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); 781 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
782 782
783 CodeDesc desc; 783 CodeDesc desc;
784 assm.GetCode(&desc); 784 assm.GetCode(isolate, &desc);
785 Handle<Code> code = isolate->factory()->NewCode( 785 Handle<Code> code = isolate->factory()->NewCode(
786 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 786 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
787 #ifdef DEBUG 787 #ifdef DEBUG
788 OFStream os(stdout); 788 OFStream os(stdout);
789 code->Print(os); 789 code->Print(os);
790 #endif 790 #endif
791 F4 fn = FUNCTION_CAST<F4>(code->entry()); 791 F4 fn = FUNCTION_CAST<F4>(code->entry());
792 d.a = 1.1; 792 d.a = 1.1;
793 d.b = 2.2; 793 d.b = 2.2;
794 d.c = 3.3; 794 d.c = 3.3;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 __ vldm(db_w, r4, s4, s7); 880 __ vldm(db_w, r4, s4, s7);
881 __ vldm(db_w, r4, s0, s3); 881 __ vldm(db_w, r4, s0, s3);
882 882
883 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, h)) + 4)); 883 __ add(r4, r1, Operand(static_cast<int32_t>(offsetof(F, h)) + 4));
884 __ vstm(db_w, r4, s0, s5); 884 __ vstm(db_w, r4, s0, s5);
885 __ vstm(db_w, r4, s6, s7); 885 __ vstm(db_w, r4, s6, s7);
886 886
887 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); 887 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
888 888
889 CodeDesc desc; 889 CodeDesc desc;
890 assm.GetCode(&desc); 890 assm.GetCode(isolate, &desc);
891 Handle<Code> code = isolate->factory()->NewCode( 891 Handle<Code> code = isolate->factory()->NewCode(
892 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 892 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
893 #ifdef DEBUG 893 #ifdef DEBUG
894 OFStream os(stdout); 894 OFStream os(stdout);
895 code->Print(os); 895 code->Print(os);
896 #endif 896 #endif
897 F4 fn = FUNCTION_CAST<F4>(code->entry()); 897 F4 fn = FUNCTION_CAST<F4>(code->entry());
898 d.a = 1.1; 898 d.a = 1.1;
899 d.b = 2.2; 899 d.b = 2.2;
900 d.c = 3.3; 900 d.c = 3.3;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 975
976 __ mov(r1, Operand(0xffffffff)); 976 __ mov(r1, Operand(0xffffffff));
977 __ mov(r2, Operand::Zero()); 977 __ mov(r2, Operand::Zero());
978 __ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry. 978 __ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry.
979 __ adc(r3, r1, Operand(r2)); 979 __ adc(r3, r1, Operand(r2));
980 __ str(r3, MemOperand(r0, offsetof(I, d))); 980 __ str(r3, MemOperand(r0, offsetof(I, d)));
981 981
982 __ mov(pc, Operand(lr)); 982 __ mov(pc, Operand(lr));
983 983
984 CodeDesc desc; 984 CodeDesc desc;
985 assm.GetCode(&desc); 985 assm.GetCode(isolate, &desc);
986 Handle<Code> code = isolate->factory()->NewCode( 986 Handle<Code> code = isolate->factory()->NewCode(
987 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 987 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
988 #ifdef DEBUG 988 #ifdef DEBUG
989 OFStream os(stdout); 989 OFStream os(stdout);
990 code->Print(os); 990 code->Print(os);
991 #endif 991 #endif
992 F3 f = FUNCTION_CAST<F3>(code->entry()); 992 F3 f = FUNCTION_CAST<F3>(code->entry());
993 Object* dummy = CALL_GENERATED_CODE(isolate, f, &i, 0, 0, 0, 0); 993 Object* dummy = CALL_GENERATED_CODE(isolate, f, &i, 0, 0, 0, 0);
994 USE(dummy); 994 USE(dummy);
995 995
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 __ vstm(ia_w, r4, d20, d22); 1102 __ vstm(ia_w, r4, d20, d22);
1103 // Move d22 into low and high. 1103 // Move d22 into low and high.
1104 __ vmov(r4, VmovIndexLo, d22); 1104 __ vmov(r4, VmovIndexLo, d22);
1105 __ str(r4, MemOperand(r0, offsetof(T, low))); 1105 __ str(r4, MemOperand(r0, offsetof(T, low)));
1106 __ vmov(r4, VmovIndexHi, d22); 1106 __ vmov(r4, VmovIndexHi, d22);
1107 __ str(r4, MemOperand(r0, offsetof(T, high))); 1107 __ str(r4, MemOperand(r0, offsetof(T, high)));
1108 1108
1109 __ ldm(ia_w, sp, r4.bit() | pc.bit()); 1109 __ ldm(ia_w, sp, r4.bit() | pc.bit());
1110 1110
1111 CodeDesc desc; 1111 CodeDesc desc;
1112 assm.GetCode(&desc); 1112 assm.GetCode(isolate, &desc);
1113 Handle<Code> code = isolate->factory()->NewCode( 1113 Handle<Code> code = isolate->factory()->NewCode(
1114 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1114 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1115 #ifdef DEBUG 1115 #ifdef DEBUG
1116 OFStream os(stdout); 1116 OFStream os(stdout);
1117 code->Print(os); 1117 code->Print(os);
1118 #endif 1118 #endif
1119 F3 f = FUNCTION_CAST<F3>(code->entry()); 1119 F3 f = FUNCTION_CAST<F3>(code->entry());
1120 t.a = 1.5; 1120 t.a = 1.5;
1121 t.b = 2.75; 1121 t.b = 2.75;
1122 t.c = 17.17; 1122 t.c = 17.17;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 __ vsub(d2, d0, d1); 1175 __ vsub(d2, d0, d1);
1176 __ vstr(d2, r0, offsetof(T, sub_result)); 1176 __ vstr(d2, r0, offsetof(T, sub_result));
1177 __ vmul(d2, d0, d1); 1177 __ vmul(d2, d0, d1);
1178 __ vstr(d2, r0, offsetof(T, mul_result)); 1178 __ vstr(d2, r0, offsetof(T, mul_result));
1179 __ vdiv(d2, d0, d1); 1179 __ vdiv(d2, d0, d1);
1180 __ vstr(d2, r0, offsetof(T, div_result)); 1180 __ vstr(d2, r0, offsetof(T, div_result));
1181 1181
1182 __ mov(pc, Operand(lr)); 1182 __ mov(pc, Operand(lr));
1183 1183
1184 CodeDesc desc; 1184 CodeDesc desc;
1185 assm.GetCode(&desc); 1185 assm.GetCode(isolate, &desc);
1186 Handle<Code> code = isolate->factory()->NewCode( 1186 Handle<Code> code = isolate->factory()->NewCode(
1187 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1187 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1188 #ifdef DEBUG 1188 #ifdef DEBUG
1189 OFStream os(stdout); 1189 OFStream os(stdout);
1190 code->Print(os); 1190 code->Print(os);
1191 #endif 1191 #endif
1192 F3 f = FUNCTION_CAST<F3>(code->entry()); 1192 F3 f = FUNCTION_CAST<F3>(code->entry());
1193 t.left = bit_cast<double>(kHoleNanInt64); 1193 t.left = bit_cast<double>(kHoleNanInt64);
1194 t.right = 1; 1194 t.right = 1;
1195 t.add_result = 0; 1195 t.add_result = 0;
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 __ vmov(d2, r4, r5); // d2 = ff05030106040200 2056 __ vmov(d2, r4, r5); // d2 = ff05030106040200
2057 __ vtbl(d0, NeonListOperand(d2, 1), d2); 2057 __ vtbl(d0, NeonListOperand(d2, 1), d2);
2058 __ vstr(d0, r0, offsetof(T, vtbl)); 2058 __ vstr(d0, r0, offsetof(T, vtbl));
2059 __ vtbx(d2, NeonListOperand(d2, 1), d2); 2059 __ vtbx(d2, NeonListOperand(d2, 1), d2);
2060 __ vstr(d2, r0, offsetof(T, vtbx)); 2060 __ vstr(d2, r0, offsetof(T, vtbx));
2061 2061
2062 // Restore and return. 2062 // Restore and return.
2063 __ ldm(ia_w, sp, r4.bit() | r5.bit() | pc.bit()); 2063 __ ldm(ia_w, sp, r4.bit() | r5.bit() | pc.bit());
2064 2064
2065 CodeDesc desc; 2065 CodeDesc desc;
2066 assm.GetCode(&desc); 2066 assm.GetCode(isolate, &desc);
2067 Handle<Code> code = isolate->factory()->NewCode( 2067 Handle<Code> code = isolate->factory()->NewCode(
2068 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2068 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2069 #ifdef DEBUG 2069 #ifdef DEBUG
2070 OFStream os(stdout); 2070 OFStream os(stdout);
2071 code->Print(os); 2071 code->Print(os);
2072 #endif 2072 #endif
2073 F3 f = FUNCTION_CAST<F3>(code->entry()); 2073 F3 f = FUNCTION_CAST<F3>(code->entry());
2074 t.src0 = 0x01020304; 2074 t.src0 = 0x01020304;
2075 t.src1 = 0x11121314; 2075 t.src1 = 0x11121314;
2076 t.src2 = 0x21222324; 2076 t.src2 = 0x21222324;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
2333 __ uxtb(r2, r0, 8); 2333 __ uxtb(r2, r0, 8);
2334 __ str(r2, MemOperand(r4, offsetof(T, dst3))); 2334 __ str(r2, MemOperand(r4, offsetof(T, dst3)));
2335 2335
2336 __ ldr(r0, MemOperand(r4, offsetof(T, src2))); 2336 __ ldr(r0, MemOperand(r4, offsetof(T, src2)));
2337 __ uxtab(r2, r0, r1, 8); 2337 __ uxtab(r2, r0, r1, 8);
2338 __ str(r2, MemOperand(r4, offsetof(T, dst4))); 2338 __ str(r2, MemOperand(r4, offsetof(T, dst4)));
2339 2339
2340 __ ldm(ia_w, sp, r4.bit() | pc.bit()); 2340 __ ldm(ia_w, sp, r4.bit() | pc.bit());
2341 2341
2342 CodeDesc desc; 2342 CodeDesc desc;
2343 assm.GetCode(&desc); 2343 assm.GetCode(isolate, &desc);
2344 Handle<Code> code = isolate->factory()->NewCode( 2344 Handle<Code> code = isolate->factory()->NewCode(
2345 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2345 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2346 #ifdef DEBUG 2346 #ifdef DEBUG
2347 OFStream os(stdout); 2347 OFStream os(stdout);
2348 code->Print(os); 2348 code->Print(os);
2349 #endif 2349 #endif
2350 F3 f = FUNCTION_CAST<F3>(code->entry()); 2350 F3 f = FUNCTION_CAST<F3>(code->entry());
2351 t.src0 = 0x01020304; 2351 t.src0 = 0x01020304;
2352 t.src1 = 0x11121314; 2352 t.src1 = 0x11121314;
2353 t.src2 = 0x11121300; 2353 t.src2 = 0x11121300;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 2414
2415 __ ldr(r0, MemOperand(r3, offsetof(T, dividend))); 2415 __ ldr(r0, MemOperand(r3, offsetof(T, dividend)));
2416 __ ldr(r1, MemOperand(r3, offsetof(T, divisor))); 2416 __ ldr(r1, MemOperand(r3, offsetof(T, divisor)));
2417 2417
2418 __ sdiv(r2, r0, r1); 2418 __ sdiv(r2, r0, r1);
2419 __ str(r2, MemOperand(r3, offsetof(T, result))); 2419 __ str(r2, MemOperand(r3, offsetof(T, result)));
2420 2420
2421 __ bx(lr); 2421 __ bx(lr);
2422 2422
2423 CodeDesc desc; 2423 CodeDesc desc;
2424 assm.GetCode(&desc); 2424 assm.GetCode(isolate, &desc);
2425 Handle<Code> code = isolate->factory()->NewCode( 2425 Handle<Code> code = isolate->factory()->NewCode(
2426 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2426 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2427 #ifdef DEBUG 2427 #ifdef DEBUG
2428 OFStream os(stdout); 2428 OFStream os(stdout);
2429 code->Print(os); 2429 code->Print(os);
2430 #endif 2430 #endif
2431 F3 f = FUNCTION_CAST<F3>(code->entry()); 2431 F3 f = FUNCTION_CAST<F3>(code->entry());
2432 Object* dummy; 2432 Object* dummy;
2433 TEST_SDIV(0, kMinInt, 0); 2433 TEST_SDIV(0, kMinInt, 0);
2434 TEST_SDIV(0, 1024, 0); 2434 TEST_SDIV(0, 1024, 0);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 2478
2479 __ ldr(r0, MemOperand(r3, offsetof(T, dividend))); 2479 __ ldr(r0, MemOperand(r3, offsetof(T, dividend)));
2480 __ ldr(r1, MemOperand(r3, offsetof(T, divisor))); 2480 __ ldr(r1, MemOperand(r3, offsetof(T, divisor)));
2481 2481
2482 __ sdiv(r2, r0, r1); 2482 __ sdiv(r2, r0, r1);
2483 __ str(r2, MemOperand(r3, offsetof(T, result))); 2483 __ str(r2, MemOperand(r3, offsetof(T, result)));
2484 2484
2485 __ bx(lr); 2485 __ bx(lr);
2486 2486
2487 CodeDesc desc; 2487 CodeDesc desc;
2488 assm.GetCode(&desc); 2488 assm.GetCode(isolate, &desc);
2489 Handle<Code> code = isolate->factory()->NewCode( 2489 Handle<Code> code = isolate->factory()->NewCode(
2490 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2490 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2491 #ifdef DEBUG 2491 #ifdef DEBUG
2492 OFStream os(stdout); 2492 OFStream os(stdout);
2493 code->Print(os); 2493 code->Print(os);
2494 #endif 2494 #endif
2495 F3 f = FUNCTION_CAST<F3>(code->entry()); 2495 F3 f = FUNCTION_CAST<F3>(code->entry());
2496 Object* dummy; 2496 Object* dummy;
2497 TEST_UDIV(0u, 0, 0); 2497 TEST_UDIV(0u, 0, 0);
2498 TEST_UDIV(0u, 1024, 0); 2498 TEST_UDIV(0u, 1024, 0);
(...skipping 10 matching lines...) Expand all
2509 TEST(smmla) { 2509 TEST(smmla) {
2510 CcTest::InitializeVM(); 2510 CcTest::InitializeVM();
2511 Isolate* const isolate = CcTest::i_isolate(); 2511 Isolate* const isolate = CcTest::i_isolate();
2512 HandleScope scope(isolate); 2512 HandleScope scope(isolate);
2513 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2513 RandomNumberGenerator* const rng = isolate->random_number_generator();
2514 Assembler assm(isolate, nullptr, 0); 2514 Assembler assm(isolate, nullptr, 0);
2515 __ smmla(r1, r1, r2, r3); 2515 __ smmla(r1, r1, r2, r3);
2516 __ str(r1, MemOperand(r0)); 2516 __ str(r1, MemOperand(r0));
2517 __ bx(lr); 2517 __ bx(lr);
2518 CodeDesc desc; 2518 CodeDesc desc;
2519 assm.GetCode(&desc); 2519 assm.GetCode(isolate, &desc);
2520 Handle<Code> code = isolate->factory()->NewCode( 2520 Handle<Code> code = isolate->factory()->NewCode(
2521 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2521 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2522 #ifdef OBJECT_PRINT 2522 #ifdef OBJECT_PRINT
2523 code->Print(std::cout); 2523 code->Print(std::cout);
2524 #endif 2524 #endif
2525 F3 f = FUNCTION_CAST<F3>(code->entry()); 2525 F3 f = FUNCTION_CAST<F3>(code->entry());
2526 for (size_t i = 0; i < 128; ++i) { 2526 for (size_t i = 0; i < 128; ++i) {
2527 int32_t r, x = rng->NextInt(), y = rng->NextInt(), z = rng->NextInt(); 2527 int32_t r, x = rng->NextInt(), y = rng->NextInt(), z = rng->NextInt();
2528 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, z, 0); 2528 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, z, 0);
2529 CHECK_EQ(bits::SignedMulHighAndAdd32(x, y, z), r); 2529 CHECK_EQ(bits::SignedMulHighAndAdd32(x, y, z), r);
2530 USE(dummy); 2530 USE(dummy);
2531 } 2531 }
2532 } 2532 }
2533 2533
2534 2534
2535 TEST(smmul) { 2535 TEST(smmul) {
2536 CcTest::InitializeVM(); 2536 CcTest::InitializeVM();
2537 Isolate* const isolate = CcTest::i_isolate(); 2537 Isolate* const isolate = CcTest::i_isolate();
2538 HandleScope scope(isolate); 2538 HandleScope scope(isolate);
2539 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2539 RandomNumberGenerator* const rng = isolate->random_number_generator();
2540 Assembler assm(isolate, nullptr, 0); 2540 Assembler assm(isolate, nullptr, 0);
2541 __ smmul(r1, r1, r2); 2541 __ smmul(r1, r1, r2);
2542 __ str(r1, MemOperand(r0)); 2542 __ str(r1, MemOperand(r0));
2543 __ bx(lr); 2543 __ bx(lr);
2544 CodeDesc desc; 2544 CodeDesc desc;
2545 assm.GetCode(&desc); 2545 assm.GetCode(isolate, &desc);
2546 Handle<Code> code = isolate->factory()->NewCode( 2546 Handle<Code> code = isolate->factory()->NewCode(
2547 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2547 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2548 #ifdef OBJECT_PRINT 2548 #ifdef OBJECT_PRINT
2549 code->Print(std::cout); 2549 code->Print(std::cout);
2550 #endif 2550 #endif
2551 F3 f = FUNCTION_CAST<F3>(code->entry()); 2551 F3 f = FUNCTION_CAST<F3>(code->entry());
2552 for (size_t i = 0; i < 128; ++i) { 2552 for (size_t i = 0; i < 128; ++i) {
2553 int32_t r, x = rng->NextInt(), y = rng->NextInt(); 2553 int32_t r, x = rng->NextInt(), y = rng->NextInt();
2554 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0); 2554 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
2555 CHECK_EQ(bits::SignedMulHigh32(x, y), r); 2555 CHECK_EQ(bits::SignedMulHigh32(x, y), r);
2556 USE(dummy); 2556 USE(dummy);
2557 } 2557 }
2558 } 2558 }
2559 2559
2560 2560
2561 TEST(sxtb) { 2561 TEST(sxtb) {
2562 CcTest::InitializeVM(); 2562 CcTest::InitializeVM();
2563 Isolate* const isolate = CcTest::i_isolate(); 2563 Isolate* const isolate = CcTest::i_isolate();
2564 HandleScope scope(isolate); 2564 HandleScope scope(isolate);
2565 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2565 RandomNumberGenerator* const rng = isolate->random_number_generator();
2566 Assembler assm(isolate, nullptr, 0); 2566 Assembler assm(isolate, nullptr, 0);
2567 __ sxtb(r1, r1); 2567 __ sxtb(r1, r1);
2568 __ str(r1, MemOperand(r0)); 2568 __ str(r1, MemOperand(r0));
2569 __ bx(lr); 2569 __ bx(lr);
2570 CodeDesc desc; 2570 CodeDesc desc;
2571 assm.GetCode(&desc); 2571 assm.GetCode(isolate, &desc);
2572 Handle<Code> code = isolate->factory()->NewCode( 2572 Handle<Code> code = isolate->factory()->NewCode(
2573 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2573 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2574 #ifdef OBJECT_PRINT 2574 #ifdef OBJECT_PRINT
2575 code->Print(std::cout); 2575 code->Print(std::cout);
2576 #endif 2576 #endif
2577 F3 f = FUNCTION_CAST<F3>(code->entry()); 2577 F3 f = FUNCTION_CAST<F3>(code->entry());
2578 for (size_t i = 0; i < 128; ++i) { 2578 for (size_t i = 0; i < 128; ++i) {
2579 int32_t r, x = rng->NextInt(); 2579 int32_t r, x = rng->NextInt();
2580 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0); 2580 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0);
2581 CHECK_EQ(static_cast<int32_t>(static_cast<int8_t>(x)), r); 2581 CHECK_EQ(static_cast<int32_t>(static_cast<int8_t>(x)), r);
2582 USE(dummy); 2582 USE(dummy);
2583 } 2583 }
2584 } 2584 }
2585 2585
2586 2586
2587 TEST(sxtab) { 2587 TEST(sxtab) {
2588 CcTest::InitializeVM(); 2588 CcTest::InitializeVM();
2589 Isolate* const isolate = CcTest::i_isolate(); 2589 Isolate* const isolate = CcTest::i_isolate();
2590 HandleScope scope(isolate); 2590 HandleScope scope(isolate);
2591 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2591 RandomNumberGenerator* const rng = isolate->random_number_generator();
2592 Assembler assm(isolate, nullptr, 0); 2592 Assembler assm(isolate, nullptr, 0);
2593 __ sxtab(r1, r2, r1); 2593 __ sxtab(r1, r2, r1);
2594 __ str(r1, MemOperand(r0)); 2594 __ str(r1, MemOperand(r0));
2595 __ bx(lr); 2595 __ bx(lr);
2596 CodeDesc desc; 2596 CodeDesc desc;
2597 assm.GetCode(&desc); 2597 assm.GetCode(isolate, &desc);
2598 Handle<Code> code = isolate->factory()->NewCode( 2598 Handle<Code> code = isolate->factory()->NewCode(
2599 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2599 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2600 #ifdef OBJECT_PRINT 2600 #ifdef OBJECT_PRINT
2601 code->Print(std::cout); 2601 code->Print(std::cout);
2602 #endif 2602 #endif
2603 F3 f = FUNCTION_CAST<F3>(code->entry()); 2603 F3 f = FUNCTION_CAST<F3>(code->entry());
2604 for (size_t i = 0; i < 128; ++i) { 2604 for (size_t i = 0; i < 128; ++i) {
2605 int32_t r, x = rng->NextInt(), y = rng->NextInt(); 2605 int32_t r, x = rng->NextInt(), y = rng->NextInt();
2606 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0); 2606 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
2607 CHECK_EQ(static_cast<int32_t>(static_cast<int8_t>(x)) + y, r); 2607 CHECK_EQ(static_cast<int32_t>(static_cast<int8_t>(x)) + y, r);
2608 USE(dummy); 2608 USE(dummy);
2609 } 2609 }
2610 } 2610 }
2611 2611
2612 2612
2613 TEST(sxth) { 2613 TEST(sxth) {
2614 CcTest::InitializeVM(); 2614 CcTest::InitializeVM();
2615 Isolate* const isolate = CcTest::i_isolate(); 2615 Isolate* const isolate = CcTest::i_isolate();
2616 HandleScope scope(isolate); 2616 HandleScope scope(isolate);
2617 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2617 RandomNumberGenerator* const rng = isolate->random_number_generator();
2618 Assembler assm(isolate, nullptr, 0); 2618 Assembler assm(isolate, nullptr, 0);
2619 __ sxth(r1, r1); 2619 __ sxth(r1, r1);
2620 __ str(r1, MemOperand(r0)); 2620 __ str(r1, MemOperand(r0));
2621 __ bx(lr); 2621 __ bx(lr);
2622 CodeDesc desc; 2622 CodeDesc desc;
2623 assm.GetCode(&desc); 2623 assm.GetCode(isolate, &desc);
2624 Handle<Code> code = isolate->factory()->NewCode( 2624 Handle<Code> code = isolate->factory()->NewCode(
2625 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2625 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2626 #ifdef OBJECT_PRINT 2626 #ifdef OBJECT_PRINT
2627 code->Print(std::cout); 2627 code->Print(std::cout);
2628 #endif 2628 #endif
2629 F3 f = FUNCTION_CAST<F3>(code->entry()); 2629 F3 f = FUNCTION_CAST<F3>(code->entry());
2630 for (size_t i = 0; i < 128; ++i) { 2630 for (size_t i = 0; i < 128; ++i) {
2631 int32_t r, x = rng->NextInt(); 2631 int32_t r, x = rng->NextInt();
2632 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0); 2632 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0);
2633 CHECK_EQ(static_cast<int32_t>(static_cast<int16_t>(x)), r); 2633 CHECK_EQ(static_cast<int32_t>(static_cast<int16_t>(x)), r);
2634 USE(dummy); 2634 USE(dummy);
2635 } 2635 }
2636 } 2636 }
2637 2637
2638 2638
2639 TEST(sxtah) { 2639 TEST(sxtah) {
2640 CcTest::InitializeVM(); 2640 CcTest::InitializeVM();
2641 Isolate* const isolate = CcTest::i_isolate(); 2641 Isolate* const isolate = CcTest::i_isolate();
2642 HandleScope scope(isolate); 2642 HandleScope scope(isolate);
2643 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2643 RandomNumberGenerator* const rng = isolate->random_number_generator();
2644 Assembler assm(isolate, nullptr, 0); 2644 Assembler assm(isolate, nullptr, 0);
2645 __ sxtah(r1, r2, r1); 2645 __ sxtah(r1, r2, r1);
2646 __ str(r1, MemOperand(r0)); 2646 __ str(r1, MemOperand(r0));
2647 __ bx(lr); 2647 __ bx(lr);
2648 CodeDesc desc; 2648 CodeDesc desc;
2649 assm.GetCode(&desc); 2649 assm.GetCode(isolate, &desc);
2650 Handle<Code> code = isolate->factory()->NewCode( 2650 Handle<Code> code = isolate->factory()->NewCode(
2651 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2651 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2652 #ifdef OBJECT_PRINT 2652 #ifdef OBJECT_PRINT
2653 code->Print(std::cout); 2653 code->Print(std::cout);
2654 #endif 2654 #endif
2655 F3 f = FUNCTION_CAST<F3>(code->entry()); 2655 F3 f = FUNCTION_CAST<F3>(code->entry());
2656 for (size_t i = 0; i < 128; ++i) { 2656 for (size_t i = 0; i < 128; ++i) {
2657 int32_t r, x = rng->NextInt(), y = rng->NextInt(); 2657 int32_t r, x = rng->NextInt(), y = rng->NextInt();
2658 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0); 2658 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
2659 CHECK_EQ(static_cast<int32_t>(static_cast<int16_t>(x)) + y, r); 2659 CHECK_EQ(static_cast<int32_t>(static_cast<int16_t>(x)) + y, r);
2660 USE(dummy); 2660 USE(dummy);
2661 } 2661 }
2662 } 2662 }
2663 2663
2664 2664
2665 TEST(uxtb) { 2665 TEST(uxtb) {
2666 CcTest::InitializeVM(); 2666 CcTest::InitializeVM();
2667 Isolate* const isolate = CcTest::i_isolate(); 2667 Isolate* const isolate = CcTest::i_isolate();
2668 HandleScope scope(isolate); 2668 HandleScope scope(isolate);
2669 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2669 RandomNumberGenerator* const rng = isolate->random_number_generator();
2670 Assembler assm(isolate, nullptr, 0); 2670 Assembler assm(isolate, nullptr, 0);
2671 __ uxtb(r1, r1); 2671 __ uxtb(r1, r1);
2672 __ str(r1, MemOperand(r0)); 2672 __ str(r1, MemOperand(r0));
2673 __ bx(lr); 2673 __ bx(lr);
2674 CodeDesc desc; 2674 CodeDesc desc;
2675 assm.GetCode(&desc); 2675 assm.GetCode(isolate, &desc);
2676 Handle<Code> code = isolate->factory()->NewCode( 2676 Handle<Code> code = isolate->factory()->NewCode(
2677 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2677 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2678 #ifdef OBJECT_PRINT 2678 #ifdef OBJECT_PRINT
2679 code->Print(std::cout); 2679 code->Print(std::cout);
2680 #endif 2680 #endif
2681 F3 f = FUNCTION_CAST<F3>(code->entry()); 2681 F3 f = FUNCTION_CAST<F3>(code->entry());
2682 for (size_t i = 0; i < 128; ++i) { 2682 for (size_t i = 0; i < 128; ++i) {
2683 int32_t r, x = rng->NextInt(); 2683 int32_t r, x = rng->NextInt();
2684 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0); 2684 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0);
2685 CHECK_EQ(static_cast<int32_t>(static_cast<uint8_t>(x)), r); 2685 CHECK_EQ(static_cast<int32_t>(static_cast<uint8_t>(x)), r);
2686 USE(dummy); 2686 USE(dummy);
2687 } 2687 }
2688 } 2688 }
2689 2689
2690 2690
2691 TEST(uxtab) { 2691 TEST(uxtab) {
2692 CcTest::InitializeVM(); 2692 CcTest::InitializeVM();
2693 Isolate* const isolate = CcTest::i_isolate(); 2693 Isolate* const isolate = CcTest::i_isolate();
2694 HandleScope scope(isolate); 2694 HandleScope scope(isolate);
2695 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2695 RandomNumberGenerator* const rng = isolate->random_number_generator();
2696 Assembler assm(isolate, nullptr, 0); 2696 Assembler assm(isolate, nullptr, 0);
2697 __ uxtab(r1, r2, r1); 2697 __ uxtab(r1, r2, r1);
2698 __ str(r1, MemOperand(r0)); 2698 __ str(r1, MemOperand(r0));
2699 __ bx(lr); 2699 __ bx(lr);
2700 CodeDesc desc; 2700 CodeDesc desc;
2701 assm.GetCode(&desc); 2701 assm.GetCode(isolate, &desc);
2702 Handle<Code> code = isolate->factory()->NewCode( 2702 Handle<Code> code = isolate->factory()->NewCode(
2703 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2703 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2704 #ifdef OBJECT_PRINT 2704 #ifdef OBJECT_PRINT
2705 code->Print(std::cout); 2705 code->Print(std::cout);
2706 #endif 2706 #endif
2707 F3 f = FUNCTION_CAST<F3>(code->entry()); 2707 F3 f = FUNCTION_CAST<F3>(code->entry());
2708 for (size_t i = 0; i < 128; ++i) { 2708 for (size_t i = 0; i < 128; ++i) {
2709 int32_t r, x = rng->NextInt(), y = rng->NextInt(); 2709 int32_t r, x = rng->NextInt(), y = rng->NextInt();
2710 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0); 2710 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
2711 CHECK_EQ(static_cast<int32_t>(static_cast<uint8_t>(x)) + y, r); 2711 CHECK_EQ(static_cast<int32_t>(static_cast<uint8_t>(x)) + y, r);
2712 USE(dummy); 2712 USE(dummy);
2713 } 2713 }
2714 } 2714 }
2715 2715
2716 2716
2717 TEST(uxth) { 2717 TEST(uxth) {
2718 CcTest::InitializeVM(); 2718 CcTest::InitializeVM();
2719 Isolate* const isolate = CcTest::i_isolate(); 2719 Isolate* const isolate = CcTest::i_isolate();
2720 HandleScope scope(isolate); 2720 HandleScope scope(isolate);
2721 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2721 RandomNumberGenerator* const rng = isolate->random_number_generator();
2722 Assembler assm(isolate, nullptr, 0); 2722 Assembler assm(isolate, nullptr, 0);
2723 __ uxth(r1, r1); 2723 __ uxth(r1, r1);
2724 __ str(r1, MemOperand(r0)); 2724 __ str(r1, MemOperand(r0));
2725 __ bx(lr); 2725 __ bx(lr);
2726 CodeDesc desc; 2726 CodeDesc desc;
2727 assm.GetCode(&desc); 2727 assm.GetCode(isolate, &desc);
2728 Handle<Code> code = isolate->factory()->NewCode( 2728 Handle<Code> code = isolate->factory()->NewCode(
2729 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2729 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2730 #ifdef OBJECT_PRINT 2730 #ifdef OBJECT_PRINT
2731 code->Print(std::cout); 2731 code->Print(std::cout);
2732 #endif 2732 #endif
2733 F3 f = FUNCTION_CAST<F3>(code->entry()); 2733 F3 f = FUNCTION_CAST<F3>(code->entry());
2734 for (size_t i = 0; i < 128; ++i) { 2734 for (size_t i = 0; i < 128; ++i) {
2735 int32_t r, x = rng->NextInt(); 2735 int32_t r, x = rng->NextInt();
2736 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0); 2736 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0);
2737 CHECK_EQ(static_cast<int32_t>(static_cast<uint16_t>(x)), r); 2737 CHECK_EQ(static_cast<int32_t>(static_cast<uint16_t>(x)), r);
2738 USE(dummy); 2738 USE(dummy);
2739 } 2739 }
2740 } 2740 }
2741 2741
2742 2742
2743 TEST(uxtah) { 2743 TEST(uxtah) {
2744 CcTest::InitializeVM(); 2744 CcTest::InitializeVM();
2745 Isolate* const isolate = CcTest::i_isolate(); 2745 Isolate* const isolate = CcTest::i_isolate();
2746 HandleScope scope(isolate); 2746 HandleScope scope(isolate);
2747 RandomNumberGenerator* const rng = isolate->random_number_generator(); 2747 RandomNumberGenerator* const rng = isolate->random_number_generator();
2748 Assembler assm(isolate, nullptr, 0); 2748 Assembler assm(isolate, nullptr, 0);
2749 __ uxtah(r1, r2, r1); 2749 __ uxtah(r1, r2, r1);
2750 __ str(r1, MemOperand(r0)); 2750 __ str(r1, MemOperand(r0));
2751 __ bx(lr); 2751 __ bx(lr);
2752 CodeDesc desc; 2752 CodeDesc desc;
2753 assm.GetCode(&desc); 2753 assm.GetCode(isolate, &desc);
2754 Handle<Code> code = isolate->factory()->NewCode( 2754 Handle<Code> code = isolate->factory()->NewCode(
2755 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2755 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2756 #ifdef OBJECT_PRINT 2756 #ifdef OBJECT_PRINT
2757 code->Print(std::cout); 2757 code->Print(std::cout);
2758 #endif 2758 #endif
2759 F3 f = FUNCTION_CAST<F3>(code->entry()); 2759 F3 f = FUNCTION_CAST<F3>(code->entry());
2760 for (size_t i = 0; i < 128; ++i) { 2760 for (size_t i = 0; i < 128; ++i) {
2761 int32_t r, x = rng->NextInt(), y = rng->NextInt(); 2761 int32_t r, x = rng->NextInt(), y = rng->NextInt();
2762 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0); 2762 Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
2763 CHECK_EQ(static_cast<int32_t>(static_cast<uint16_t>(x)) + y, r); 2763 CHECK_EQ(static_cast<int32_t>(static_cast<uint16_t>(x)) + y, r);
(...skipping 21 matching lines...) Expand all
2785 uint32_t result; 2785 uint32_t result;
2786 } T; 2786 } T;
2787 T t; 2787 T t;
2788 2788
2789 __ ldr(r1, MemOperand(r0, offsetof(T, input))); 2789 __ ldr(r1, MemOperand(r0, offsetof(T, input)));
2790 __ rbit(r1, r1); 2790 __ rbit(r1, r1);
2791 __ str(r1, MemOperand(r0, offsetof(T, result))); 2791 __ str(r1, MemOperand(r0, offsetof(T, result)));
2792 __ bx(lr); 2792 __ bx(lr);
2793 2793
2794 CodeDesc desc; 2794 CodeDesc desc;
2795 assm.GetCode(&desc); 2795 assm.GetCode(isolate, &desc);
2796 Handle<Code> code = isolate->factory()->NewCode( 2796 Handle<Code> code = isolate->factory()->NewCode(
2797 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2797 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2798 2798
2799 #ifdef OBJECT_PRINT 2799 #ifdef OBJECT_PRINT
2800 code->Print(std::cout); 2800 code->Print(std::cout);
2801 #endif 2801 #endif
2802 2802
2803 F3 f = FUNCTION_CAST<F3>(code->entry()); 2803 F3 f = FUNCTION_CAST<F3>(code->entry());
2804 Object* dummy = NULL; 2804 Object* dummy = NULL;
2805 TEST_RBIT(0xffffffff, 0xffffffff); 2805 TEST_RBIT(0xffffffff, 0xffffffff);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2867 for (int i = 0; i < (1 << 21); i++) { 2867 for (int i = 0; i < (1 << 21); i++) {
2868 __ ldr(r3, MemOperand(r3)); 2868 __ ldr(r3, MemOperand(r3));
2869 } 2869 }
2870 __ bind(&target_faraway); 2870 __ bind(&target_faraway);
2871 // r0 = r0 + 5 + 5 + 11 2871 // r0 = r0 + 5 + 5 + 11
2872 __ add(r0, r0, Operand(11)); 2872 __ add(r0, r0, Operand(11));
2873 2873
2874 __ ldm(ia_w, sp, r4.bit() | r5.bit() | pc.bit()); 2874 __ ldm(ia_w, sp, r4.bit() | r5.bit() | pc.bit());
2875 2875
2876 CodeDesc desc; 2876 CodeDesc desc;
2877 assm.GetCode(&desc); 2877 assm.GetCode(isolate, &desc);
2878 Handle<Code> code = isolate->factory()->NewCode( 2878 Handle<Code> code = isolate->factory()->NewCode(
2879 desc, Code::ComputeFlags(Code::STUB), code_object); 2879 desc, Code::ComputeFlags(Code::STUB), code_object);
2880 F1 f = FUNCTION_CAST<F1>(code->entry()); 2880 F1 f = FUNCTION_CAST<F1>(code->entry());
2881 int res = 2881 int res =
2882 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 21, 0, 0, 0, 0)); 2882 reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 21, 0, 0, 0, 0));
2883 ::printf("f() = %d\n", res); 2883 ::printf("f() = %d\n", res);
2884 CHECK_EQ(42, res); 2884 CHECK_EQ(42, res);
2885 } 2885 }
2886 2886
2887 TEST(msr_mrs) { 2887 TEST(msr_mrs) {
(...skipping 19 matching lines...) Expand all
2907 __ str(r3, MemOperand(r1)); 2907 __ str(r3, MemOperand(r1));
2908 2908
2909 // Also check mrs, ignoring everything other than the flags. 2909 // Also check mrs, ignoring everything other than the flags.
2910 __ mrs(r3, CPSR); 2910 __ mrs(r3, CPSR);
2911 __ and_(r3, r3, Operand(kSpecialCondition)); 2911 __ and_(r3, r3, Operand(kSpecialCondition));
2912 __ str(r3, MemOperand(r2)); 2912 __ str(r3, MemOperand(r2));
2913 2913
2914 __ bx(lr); 2914 __ bx(lr);
2915 2915
2916 CodeDesc desc; 2916 CodeDesc desc;
2917 assm.GetCode(&desc); 2917 assm.GetCode(isolate, &desc);
2918 Handle<Code> code = isolate->factory()->NewCode( 2918 Handle<Code> code = isolate->factory()->NewCode(
2919 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2919 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2920 #ifdef DEBUG 2920 #ifdef DEBUG
2921 OFStream os(stdout); 2921 OFStream os(stdout);
2922 code->Print(os); 2922 code->Print(os);
2923 #endif 2923 #endif
2924 F5 f = FUNCTION_CAST<F5>(code->entry()); 2924 F5 f = FUNCTION_CAST<F5>(code->entry());
2925 Object* dummy = nullptr; 2925 Object* dummy = nullptr;
2926 USE(dummy); 2926 USE(dummy);
2927 2927
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
3008 __ vstr(s5, r4, offsetof(T, mr)); 3008 __ vstr(s5, r4, offsetof(T, mr));
3009 3009
3010 // Test vrintz 3010 // Test vrintz
3011 __ vldr(s6, r4, offsetof(T, input)); 3011 __ vldr(s6, r4, offsetof(T, input));
3012 __ vrintz(s5, s6); 3012 __ vrintz(s5, s6);
3013 __ vstr(s5, r4, offsetof(T, zr)); 3013 __ vstr(s5, r4, offsetof(T, zr));
3014 3014
3015 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); 3015 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
3016 3016
3017 CodeDesc desc; 3017 CodeDesc desc;
3018 assm.GetCode(&desc); 3018 assm.GetCode(isolate, &desc);
3019 Handle<Code> code = isolate->factory()->NewCode( 3019 Handle<Code> code = isolate->factory()->NewCode(
3020 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3020 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3021 #ifdef DEBUG 3021 #ifdef DEBUG
3022 OFStream os(stdout); 3022 OFStream os(stdout);
3023 code->Print(os); 3023 code->Print(os);
3024 #endif 3024 #endif
3025 F3 f = FUNCTION_CAST<F3>(code->entry()); 3025 F3 f = FUNCTION_CAST<F3>(code->entry());
3026 3026
3027 Object* dummy = nullptr; 3027 Object* dummy = nullptr;
3028 USE(dummy); 3028 USE(dummy);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
3113 __ vstr(d5, r4, offsetof(T, mr)); 3113 __ vstr(d5, r4, offsetof(T, mr));
3114 3114
3115 // Test vrintz 3115 // Test vrintz
3116 __ vldr(d6, r4, offsetof(T, input)); 3116 __ vldr(d6, r4, offsetof(T, input));
3117 __ vrintz(d5, d6); 3117 __ vrintz(d5, d6);
3118 __ vstr(d5, r4, offsetof(T, zr)); 3118 __ vstr(d5, r4, offsetof(T, zr));
3119 3119
3120 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); 3120 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
3121 3121
3122 CodeDesc desc; 3122 CodeDesc desc;
3123 assm.GetCode(&desc); 3123 assm.GetCode(isolate, &desc);
3124 Handle<Code> code = isolate->factory()->NewCode( 3124 Handle<Code> code = isolate->factory()->NewCode(
3125 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3125 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3126 #ifdef DEBUG 3126 #ifdef DEBUG
3127 OFStream os(stdout); 3127 OFStream os(stdout);
3128 code->Print(os); 3128 code->Print(os);
3129 #endif 3129 #endif
3130 F3 f = FUNCTION_CAST<F3>(code->entry()); 3130 F3 f = FUNCTION_CAST<F3>(code->entry());
3131 3131
3132 Object* dummy = nullptr; 3132 Object* dummy = nullptr;
3133 USE(dummy); 3133 USE(dummy);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
3253 __ vsel(lt, d0, d1, d2); 3253 __ vsel(lt, d0, d1, d2);
3254 __ vstr(d0, r2, offsetof(ResultsF64, vsellt_)); 3254 __ vstr(d0, r2, offsetof(ResultsF64, vsellt_));
3255 __ vsel(le, d0, d1, d2); 3255 __ vsel(le, d0, d1, d2);
3256 __ vstr(d0, r2, offsetof(ResultsF64, vselle_)); 3256 __ vstr(d0, r2, offsetof(ResultsF64, vselle_));
3257 __ vsel(vc, d0, d1, d2); 3257 __ vsel(vc, d0, d1, d2);
3258 __ vstr(d0, r2, offsetof(ResultsF64, vselvc_)); 3258 __ vstr(d0, r2, offsetof(ResultsF64, vselvc_));
3259 3259
3260 __ bx(lr); 3260 __ bx(lr);
3261 3261
3262 CodeDesc desc; 3262 CodeDesc desc;
3263 assm.GetCode(&desc); 3263 assm.GetCode(isolate, &desc);
3264 Handle<Code> code = isolate->factory()->NewCode( 3264 Handle<Code> code = isolate->factory()->NewCode(
3265 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3265 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3266 #ifdef DEBUG 3266 #ifdef DEBUG
3267 OFStream os(stdout); 3267 OFStream os(stdout);
3268 code->Print(os); 3268 code->Print(os);
3269 #endif 3269 #endif
3270 F5 f = FUNCTION_CAST<F5>(code->entry()); 3270 F5 f = FUNCTION_CAST<F5>(code->entry());
3271 Object* dummy = nullptr; 3271 Object* dummy = nullptr;
3272 USE(dummy); 3272 USE(dummy);
3273 3273
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
3347 __ vldr(d2, r0, offsetof(Inputs, right_)); 3347 __ vldr(d2, r0, offsetof(Inputs, right_));
3348 3348
3349 __ vminnm(d0, d1, d2); 3349 __ vminnm(d0, d1, d2);
3350 __ vstr(d0, r1, offsetof(Results, vminnm_)); 3350 __ vstr(d0, r1, offsetof(Results, vminnm_));
3351 __ vmaxnm(d0, d1, d2); 3351 __ vmaxnm(d0, d1, d2);
3352 __ vstr(d0, r1, offsetof(Results, vmaxnm_)); 3352 __ vstr(d0, r1, offsetof(Results, vmaxnm_));
3353 3353
3354 __ bx(lr); 3354 __ bx(lr);
3355 3355
3356 CodeDesc desc; 3356 CodeDesc desc;
3357 assm.GetCode(&desc); 3357 assm.GetCode(isolate, &desc);
3358 Handle<Code> code = isolate->factory()->NewCode( 3358 Handle<Code> code = isolate->factory()->NewCode(
3359 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3359 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3360 #ifdef DEBUG 3360 #ifdef DEBUG
3361 OFStream os(stdout); 3361 OFStream os(stdout);
3362 code->Print(os); 3362 code->Print(os);
3363 #endif 3363 #endif
3364 F4 f = FUNCTION_CAST<F4>(code->entry()); 3364 F4 f = FUNCTION_CAST<F4>(code->entry());
3365 Object* dummy = nullptr; 3365 Object* dummy = nullptr;
3366 USE(dummy); 3366 USE(dummy);
3367 3367
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
3429 __ vldr(s2, r0, offsetof(Inputs, right_)); 3429 __ vldr(s2, r0, offsetof(Inputs, right_));
3430 3430
3431 __ vminnm(s0, s1, s2); 3431 __ vminnm(s0, s1, s2);
3432 __ vstr(s0, r1, offsetof(Results, vminnm_)); 3432 __ vstr(s0, r1, offsetof(Results, vminnm_));
3433 __ vmaxnm(s0, s1, s2); 3433 __ vmaxnm(s0, s1, s2);
3434 __ vstr(s0, r1, offsetof(Results, vmaxnm_)); 3434 __ vstr(s0, r1, offsetof(Results, vmaxnm_));
3435 3435
3436 __ bx(lr); 3436 __ bx(lr);
3437 3437
3438 CodeDesc desc; 3438 CodeDesc desc;
3439 assm.GetCode(&desc); 3439 assm.GetCode(isolate, &desc);
3440 Handle<Code> code = isolate->factory()->NewCode( 3440 Handle<Code> code = isolate->factory()->NewCode(
3441 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3441 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3442 #ifdef DEBUG 3442 #ifdef DEBUG
3443 OFStream os(stdout); 3443 OFStream os(stdout);
3444 code->Print(os); 3444 code->Print(os);
3445 #endif 3445 #endif
3446 F4 f = FUNCTION_CAST<F4>(code->entry()); 3446 F4 f = FUNCTION_CAST<F4>(code->entry());
3447 Object* dummy = nullptr; 3447 Object* dummy = nullptr;
3448 USE(dummy); 3448 USE(dummy);
3449 3449
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3561 3561
3562 __ bind(&ool_max_aab); 3562 __ bind(&ool_max_aab);
3563 __ FloatMaxOutOfLine(a, a, b); 3563 __ FloatMaxOutOfLine(a, a, b);
3564 __ b(&done_max_aab); 3564 __ b(&done_max_aab);
3565 3565
3566 __ bind(&ool_max_aba); 3566 __ bind(&ool_max_aba);
3567 __ FloatMaxOutOfLine(a, b, a); 3567 __ FloatMaxOutOfLine(a, b, a);
3568 __ b(&done_max_aba); 3568 __ b(&done_max_aba);
3569 3569
3570 CodeDesc desc; 3570 CodeDesc desc;
3571 assm.GetCode(&desc); 3571 assm.GetCode(assm.isolate(), &desc);
3572 Handle<Code> code = assm.isolate()->factory()->NewCode( 3572 Handle<Code> code = assm.isolate()->factory()->NewCode(
3573 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3573 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3574 #ifdef DEBUG 3574 #ifdef DEBUG
3575 OFStream os(stdout); 3575 OFStream os(stdout);
3576 code->Print(os); 3576 code->Print(os);
3577 #endif 3577 #endif
3578 return FUNCTION_CAST<F4>(code->entry()); 3578 return FUNCTION_CAST<F4>(code->entry());
3579 } 3579 }
3580 3580
3581 TEST(macro_float_minmax_f64) { 3581 TEST(macro_float_minmax_f64) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3729 Assembler assm(isolate, NULL, 0); 3729 Assembler assm(isolate, NULL, 0);
3730 __ ldrh(ip, MemOperand(r1, r2)); 3730 __ ldrh(ip, MemOperand(r1, r2));
3731 __ str(ip, MemOperand(r0, offsetof(T, ldrh))); 3731 __ str(ip, MemOperand(r0, offsetof(T, ldrh)));
3732 __ ldrsh(ip, MemOperand(r1, r2)); 3732 __ ldrsh(ip, MemOperand(r1, r2));
3733 __ str(ip, MemOperand(r0, offsetof(T, ldrsh))); 3733 __ str(ip, MemOperand(r0, offsetof(T, ldrsh)));
3734 __ ldr(ip, MemOperand(r1, r2)); 3734 __ ldr(ip, MemOperand(r1, r2));
3735 __ str(ip, MemOperand(r0, offsetof(T, ldr))); 3735 __ str(ip, MemOperand(r0, offsetof(T, ldr)));
3736 __ bx(lr); 3736 __ bx(lr);
3737 3737
3738 CodeDesc desc; 3738 CodeDesc desc;
3739 assm.GetCode(&desc); 3739 assm.GetCode(isolate, &desc);
3740 Handle<Code> code = isolate->factory()->NewCode( 3740 Handle<Code> code = isolate->factory()->NewCode(
3741 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3741 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3742 #ifdef DEBUG 3742 #ifdef DEBUG
3743 OFStream os(stdout); 3743 OFStream os(stdout);
3744 code->Print(os); 3744 code->Print(os);
3745 #endif 3745 #endif
3746 F4 f = FUNCTION_CAST<F4>(code->entry()); 3746 F4 f = FUNCTION_CAST<F4>(code->entry());
3747 3747
3748 Object* dummy = nullptr; 3748 Object* dummy = nullptr;
3749 USE(dummy); 3749 USE(dummy);
(...skipping 25 matching lines...) Expand all
3775 CcTest::InitializeVM(); 3775 CcTest::InitializeVM();
3776 Isolate* isolate = CcTest::i_isolate(); 3776 Isolate* isolate = CcTest::i_isolate();
3777 HandleScope scope(isolate); 3777 HandleScope scope(isolate);
3778 3778
3779 Assembler assm(isolate, NULL, 0); 3779 Assembler assm(isolate, NULL, 0);
3780 __ strh(r3, MemOperand(r0, r2)); 3780 __ strh(r3, MemOperand(r0, r2));
3781 __ str(r3, MemOperand(r1, r2)); 3781 __ str(r3, MemOperand(r1, r2));
3782 __ bx(lr); 3782 __ bx(lr);
3783 3783
3784 CodeDesc desc; 3784 CodeDesc desc;
3785 assm.GetCode(&desc); 3785 assm.GetCode(isolate, &desc);
3786 Handle<Code> code = isolate->factory()->NewCode( 3786 Handle<Code> code = isolate->factory()->NewCode(
3787 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3787 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3788 #ifdef DEBUG 3788 #ifdef DEBUG
3789 OFStream os(stdout); 3789 OFStream os(stdout);
3790 code->Print(os); 3790 code->Print(os);
3791 #endif 3791 #endif
3792 F4 f = FUNCTION_CAST<F4>(code->entry()); 3792 F4 f = FUNCTION_CAST<F4>(code->entry());
3793 3793
3794 Object* dummy = nullptr; 3794 Object* dummy = nullptr;
3795 USE(dummy); 3795 USE(dummy);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
3878 __ vswp(q4, q5); 3878 __ vswp(q4, q5);
3879 __ add(r6, r0, Operand(static_cast<int32_t>(offsetof(T, vswp_q4)))); 3879 __ add(r6, r0, Operand(static_cast<int32_t>(offsetof(T, vswp_q4))));
3880 __ vst1(Neon8, NeonListOperand(q4), NeonMemOperand(r6)); 3880 __ vst1(Neon8, NeonListOperand(q4), NeonMemOperand(r6));
3881 __ add(r6, r0, Operand(static_cast<int32_t>(offsetof(T, vswp_q5)))); 3881 __ add(r6, r0, Operand(static_cast<int32_t>(offsetof(T, vswp_q5))));
3882 __ vst1(Neon8, NeonListOperand(q5), NeonMemOperand(r6)); 3882 __ vst1(Neon8, NeonListOperand(q5), NeonMemOperand(r6));
3883 3883
3884 __ ldm(ia_w, sp, r4.bit() | r5.bit() | r6.bit() | r7.bit() | pc.bit()); 3884 __ ldm(ia_w, sp, r4.bit() | r5.bit() | r6.bit() | r7.bit() | pc.bit());
3885 __ bx(lr); 3885 __ bx(lr);
3886 3886
3887 CodeDesc desc; 3887 CodeDesc desc;
3888 assm.GetCode(&desc); 3888 assm.GetCode(isolate, &desc);
3889 Handle<Code> code = isolate->factory()->NewCode( 3889 Handle<Code> code = isolate->factory()->NewCode(
3890 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3890 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3891 #ifdef DEBUG 3891 #ifdef DEBUG
3892 OFStream os(stdout); 3892 OFStream os(stdout);
3893 code->Print(os); 3893 code->Print(os);
3894 #endif 3894 #endif
3895 F3 f = FUNCTION_CAST<F3>(code->entry()); 3895 F3 f = FUNCTION_CAST<F3>(code->entry());
3896 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 3896 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
3897 USE(dummy); 3897 USE(dummy);
3898 CHECK_EQ(minus_one, t.vswp_d0); 3898 CHECK_EQ(minus_one, t.vswp_d0);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
3962 HandleScope scope(isolate); 3962 HandleScope scope(isolate);
3963 3963
3964 Assembler assm(isolate, NULL, 0); 3964 Assembler assm(isolate, NULL, 0);
3965 __ mov(r0, Operand(isolate->factory()->infinity_value())); 3965 __ mov(r0, Operand(isolate->factory()->infinity_value()));
3966 __ BlockConstPoolFor(1019); 3966 __ BlockConstPoolFor(1019);
3967 for (int i = 0; i < 1019; ++i) __ nop(); 3967 for (int i = 0; i < 1019; ++i) __ nop();
3968 __ vldr(d0, MemOperand(r0, 0)); 3968 __ vldr(d0, MemOperand(r0, 0));
3969 } 3969 }
3970 3970
3971 #undef __ 3971 #undef __
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698