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

Side by Side Diff: runtime/vm/assembler_arm_test.cc

Issue 297163012: Rename ShifterOperand to Operand on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/flow_graph_compiler_arm.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
11 #include "vm/unit_test.h" 11 #include "vm/unit_test.h"
12 #include "vm/virtual_memory.h" 12 #include "vm/virtual_memory.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 #define __ assembler-> 16 #define __ assembler->
17 17
18 18
19 ASSEMBLER_TEST_GENERATE(Simple, assembler) { 19 ASSEMBLER_TEST_GENERATE(Simple, assembler) {
20 __ mov(R0, ShifterOperand(42)); 20 __ mov(R0, Operand(42));
21 __ bx(LR); 21 __ bx(LR);
22 } 22 }
23 23
24 24
25 ASSEMBLER_TEST_RUN(Simple, test) { 25 ASSEMBLER_TEST_RUN(Simple, test) {
26 typedef int (*SimpleCode)(); 26 typedef int (*SimpleCode)();
27 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry())); 27 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
28 } 28 }
29 29
30 30
31 ASSEMBLER_TEST_GENERATE(MoveNegated, assembler) { 31 ASSEMBLER_TEST_GENERATE(MoveNegated, assembler) {
32 __ mvn(R0, ShifterOperand(42)); 32 __ mvn(R0, Operand(42));
33 __ bx(LR); 33 __ bx(LR);
34 } 34 }
35 35
36 36
37 ASSEMBLER_TEST_RUN(MoveNegated, test) { 37 ASSEMBLER_TEST_RUN(MoveNegated, test) {
38 EXPECT(test != NULL); 38 EXPECT(test != NULL);
39 typedef int (*MoveNegated)(); 39 typedef int (*MoveNegated)();
40 EXPECT_EQ(~42, EXECUTE_TEST_CODE_INT32(MoveNegated, test->entry())); 40 EXPECT_EQ(~42, EXECUTE_TEST_CODE_INT32(MoveNegated, test->entry()));
41 } 41 }
42 42
43 43
44 ASSEMBLER_TEST_GENERATE(MoveRotImm, assembler) { 44 ASSEMBLER_TEST_GENERATE(MoveRotImm, assembler) {
45 ShifterOperand shifter_op; 45 Operand o;
46 EXPECT(ShifterOperand::CanHold(0x00550000, &shifter_op)); 46 EXPECT(Operand::CanHold(0x00550000, &o));
47 __ mov(R0, shifter_op); 47 __ mov(R0, o);
48 EXPECT(ShifterOperand::CanHold(0x30000003, &shifter_op)); 48 EXPECT(Operand::CanHold(0x30000003, &o));
49 __ add(R0, R0, shifter_op); 49 __ add(R0, R0, o);
50 __ bx(LR); 50 __ bx(LR);
51 } 51 }
52 52
53 53
54 ASSEMBLER_TEST_RUN(MoveRotImm, test) { 54 ASSEMBLER_TEST_RUN(MoveRotImm, test) {
55 EXPECT(test != NULL); 55 EXPECT(test != NULL);
56 typedef int (*MoveRotImm)(); 56 typedef int (*MoveRotImm)();
57 EXPECT_EQ(0x30550003, EXECUTE_TEST_CODE_INT32(MoveRotImm, test->entry())); 57 EXPECT_EQ(0x30550003, EXECUTE_TEST_CODE_INT32(MoveRotImm, test->entry()));
58 } 58 }
59 59
60 60
61 ASSEMBLER_TEST_GENERATE(MovImm16, assembler) { 61 ASSEMBLER_TEST_GENERATE(MovImm16, assembler) {
62 #if defined(USING_SIMULATOR) 62 #if defined(USING_SIMULATOR)
63 // ARMv7 is the default. 63 // ARMv7 is the default.
64 HostCPUFeatures::set_arm_version(ARMv6); 64 HostCPUFeatures::set_arm_version(ARMv6);
65 __ LoadDecodableImmediate(R0, 0x12345678 << 1); 65 __ LoadDecodableImmediate(R0, 0x12345678 << 1);
66 HostCPUFeatures::set_arm_version(ARMv7); 66 HostCPUFeatures::set_arm_version(ARMv7);
67 __ LoadDecodableImmediate(R1, 0x12345678); 67 __ LoadDecodableImmediate(R1, 0x12345678);
68 __ sub(R0, R0, ShifterOperand(R1)); 68 __ sub(R0, R0, Operand(R1));
69 __ bx(LR); 69 __ bx(LR);
70 #else 70 #else
71 __ LoadDecodableImmediate(R0, 0x12345678); 71 __ LoadDecodableImmediate(R0, 0x12345678);
72 __ bx(LR); 72 __ bx(LR);
73 #endif 73 #endif
74 } 74 }
75 75
76 76
77 ASSEMBLER_TEST_RUN(MovImm16, test) { 77 ASSEMBLER_TEST_RUN(MovImm16, test) {
78 EXPECT(test != NULL); 78 EXPECT(test != NULL);
79 typedef int (*MovImm16)(); 79 typedef int (*MovImm16)();
80 EXPECT_EQ(0x12345678, EXECUTE_TEST_CODE_INT32(MovImm16, test->entry())); 80 EXPECT_EQ(0x12345678, EXECUTE_TEST_CODE_INT32(MovImm16, test->entry()));
81 } 81 }
82 82
83 83
84 ASSEMBLER_TEST_GENERATE(LoadImmediate, assembler) { 84 ASSEMBLER_TEST_GENERATE(LoadImmediate, assembler) {
85 __ mov(R0, ShifterOperand(0)); 85 __ mov(R0, Operand(0));
86 __ cmp(R0, ShifterOperand(0)); 86 __ cmp(R0, Operand(0));
87 __ LoadImmediate(R0, 0x12345678, EQ); 87 __ LoadImmediate(R0, 0x12345678, EQ);
88 __ LoadImmediate(R0, 0x87654321, NE); 88 __ LoadImmediate(R0, 0x87654321, NE);
89 __ bx(LR); 89 __ bx(LR);
90 } 90 }
91 91
92 92
93 ASSEMBLER_TEST_RUN(LoadImmediate, test) { 93 ASSEMBLER_TEST_RUN(LoadImmediate, test) {
94 EXPECT(test != NULL); 94 EXPECT(test != NULL);
95 typedef int (*LoadImmediate)(); 95 typedef int (*LoadImmediate)();
96 EXPECT_EQ(0x12345678, EXECUTE_TEST_CODE_INT32(LoadImmediate, test->entry())); 96 EXPECT_EQ(0x12345678, EXECUTE_TEST_CODE_INT32(LoadImmediate, test->entry()));
97 } 97 }
98 98
99 99
100 ASSEMBLER_TEST_GENERATE(Vmov, assembler) { 100 ASSEMBLER_TEST_GENERATE(Vmov, assembler) {
101 if (TargetCPUFeatures::vfp_supported()) { 101 if (TargetCPUFeatures::vfp_supported()) {
102 __ mov(R3, ShifterOperand(43)); 102 __ mov(R3, Operand(43));
103 __ mov(R1, ShifterOperand(41)); 103 __ mov(R1, Operand(41));
104 __ vmovsrr(S1, R1, R3); // S1:S2 = 41:43 104 __ vmovsrr(S1, R1, R3); // S1:S2 = 41:43
105 __ vmovs(S0, S2); // S0 = S2, S0:S1 == 43:41 105 __ vmovs(S0, S2); // S0 = S2, S0:S1 == 43:41
106 __ vmovd(D2, D0); // D2 = D0, S4:S5 == 43:41 106 __ vmovd(D2, D0); // D2 = D0, S4:S5 == 43:41
107 __ vmovrs(R3, S5); // R3 = S5, R3 == 41 107 __ vmovrs(R3, S5); // R3 = S5, R3 == 41
108 __ vmovrrs(R1, R2, S4); // R1:R2 = S4:S5, R1:R2 == 43:41 108 __ vmovrrs(R1, R2, S4); // R1:R2 = S4:S5, R1:R2 == 43:41
109 __ vmovdrr(D3, R3, R2); // D3 = R3:R2, S6:S7 == 41:41 109 __ vmovdrr(D3, R3, R2); // D3 = R3:R2, S6:S7 == 41:41
110 __ vmovsr(S7, R1); // S7 = R1, S6:S7 == 41:43 110 __ vmovsr(S7, R1); // S7 = R1, S6:S7 == 41:43
111 __ vmovrrd(R0, R1, D3); // R0:R1 = D3, R0:R1 == 41:43 111 __ vmovrrd(R0, R1, D3); // R0:R1 = D3, R0:R1 == 41:43
112 __ sub(R0, R1, ShifterOperand(R0)); // 43-41 112 __ sub(R0, R1, Operand(R0)); // 43-41
113 } else { 113 } else {
114 __ LoadImmediate(R0, 2); 114 __ LoadImmediate(R0, 2);
115 } 115 }
116 __ bx(LR); 116 __ bx(LR);
117 } 117 }
118 118
119 119
120 ASSEMBLER_TEST_RUN(Vmov, test) { 120 ASSEMBLER_TEST_RUN(Vmov, test) {
121 EXPECT(test != NULL); 121 EXPECT(test != NULL);
122 typedef int (*Vmov)(); 122 typedef int (*Vmov)();
123 EXPECT_EQ(2, EXECUTE_TEST_CODE_INT32(Vmov, test->entry())); 123 EXPECT_EQ(2, EXECUTE_TEST_CODE_INT32(Vmov, test->entry()));
124 } 124 }
125 125
126 126
127 ASSEMBLER_TEST_GENERATE(SingleVLoadStore, assembler) { 127 ASSEMBLER_TEST_GENERATE(SingleVLoadStore, assembler) {
128 if (TargetCPUFeatures::vfp_supported()) { 128 if (TargetCPUFeatures::vfp_supported()) {
129 __ LoadImmediate(R0, bit_cast<int32_t, float>(12.3f)); 129 __ LoadImmediate(R0, bit_cast<int32_t, float>(12.3f));
130 __ mov(R2, ShifterOperand(SP)); 130 __ mov(R2, Operand(SP));
131 __ str(R0, Address(SP, (-kWordSize * 30), Address::PreIndex)); 131 __ str(R0, Address(SP, (-kWordSize * 30), Address::PreIndex));
132 __ vldrs(S0, Address(R2, (-kWordSize * 30))); 132 __ vldrs(S0, Address(R2, (-kWordSize * 30)));
133 __ vadds(S0, S0, S0); 133 __ vadds(S0, S0, S0);
134 __ vstrs(S0, Address(R2, (-kWordSize * 30))); 134 __ vstrs(S0, Address(R2, (-kWordSize * 30)));
135 __ ldr(R0, Address(SP, (kWordSize * 30), Address::PostIndex)); 135 __ ldr(R0, Address(SP, (kWordSize * 30), Address::PostIndex));
136 } else { 136 } else {
137 __ LoadImmediate(R0, 0); 137 __ LoadImmediate(R0, 0);
138 } 138 }
139 __ bx(LR); 139 __ bx(LR);
140 } 140 }
141 141
142 142
143 ASSEMBLER_TEST_RUN(SingleVLoadStore, test) { 143 ASSEMBLER_TEST_RUN(SingleVLoadStore, test) {
144 EXPECT(test != NULL); 144 EXPECT(test != NULL);
145 if (TargetCPUFeatures::vfp_supported()) { 145 if (TargetCPUFeatures::vfp_supported()) {
146 typedef float (*SingleVLoadStore)(); 146 typedef float (*SingleVLoadStore)();
147 float res = EXECUTE_TEST_CODE_FLOAT(SingleVLoadStore, test->entry()); 147 float res = EXECUTE_TEST_CODE_FLOAT(SingleVLoadStore, test->entry());
148 EXPECT_FLOAT_EQ(2*12.3f, res, 0.001f); 148 EXPECT_FLOAT_EQ(2*12.3f, res, 0.001f);
149 } else { 149 } else {
150 typedef int (*SingleVLoadStore)(); 150 typedef int (*SingleVLoadStore)();
151 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(SingleVLoadStore, test->entry())); 151 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(SingleVLoadStore, test->entry()));
152 } 152 }
153 } 153 }
154 154
155 155
156 ASSEMBLER_TEST_GENERATE(SingleVShiftLoadStore, assembler) { 156 ASSEMBLER_TEST_GENERATE(SingleVShiftLoadStore, assembler) {
157 if (TargetCPUFeatures::vfp_supported()) { 157 if (TargetCPUFeatures::vfp_supported()) {
158 __ LoadImmediate(R0, bit_cast<int32_t, float>(12.3f)); 158 __ LoadImmediate(R0, bit_cast<int32_t, float>(12.3f));
159 __ mov(R2, ShifterOperand(SP)); 159 __ mov(R2, Operand(SP));
160 // Expressing __str(R0, Address(SP, (-kWordSize * 32), Address::PreIndex)); 160 // Expressing __str(R0, Address(SP, (-kWordSize * 32), Address::PreIndex));
161 // as: 161 // as:
162 __ mov(R1, ShifterOperand(kWordSize)); 162 __ mov(R1, Operand(kWordSize));
163 __ str(R0, Address(SP, R1, LSL, 5, Address::NegPreIndex)); 163 __ str(R0, Address(SP, R1, LSL, 5, Address::NegPreIndex));
164 __ vldrs(S0, Address(R2, (-kWordSize * 32))); 164 __ vldrs(S0, Address(R2, (-kWordSize * 32)));
165 __ vadds(S0, S0, S0); 165 __ vadds(S0, S0, S0);
166 __ vstrs(S0, Address(R2, (-kWordSize * 32))); 166 __ vstrs(S0, Address(R2, (-kWordSize * 32)));
167 // Expressing __ldr(R0, Address(SP, (kWordSize * 32), Address::PostIndex)); 167 // Expressing __ldr(R0, Address(SP, (kWordSize * 32), Address::PostIndex));
168 // as: 168 // as:
169 __ ldr(R0, Address(SP, R1, LSL, 5, Address::PostIndex)); 169 __ ldr(R0, Address(SP, R1, LSL, 5, Address::PostIndex));
170 } else { 170 } else {
171 __ LoadImmediate(R0, 0); 171 __ LoadImmediate(R0, 0);
172 } 172 }
(...skipping 12 matching lines...) Expand all
185 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(SingleVLoadStore, test->entry())); 185 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(SingleVLoadStore, test->entry()));
186 } 186 }
187 } 187 }
188 188
189 189
190 ASSEMBLER_TEST_GENERATE(DoubleVLoadStore, assembler) { 190 ASSEMBLER_TEST_GENERATE(DoubleVLoadStore, assembler) {
191 if (TargetCPUFeatures::vfp_supported()) { 191 if (TargetCPUFeatures::vfp_supported()) {
192 int64_t value = bit_cast<int64_t, double>(12.3); 192 int64_t value = bit_cast<int64_t, double>(12.3);
193 __ LoadImmediate(R0, Utils::Low32Bits(value)); 193 __ LoadImmediate(R0, Utils::Low32Bits(value));
194 __ LoadImmediate(R1, Utils::High32Bits(value)); 194 __ LoadImmediate(R1, Utils::High32Bits(value));
195 __ mov(R2, ShifterOperand(SP)); 195 __ mov(R2, Operand(SP));
196 __ str(R0, Address(SP, (-kWordSize * 30), Address::PreIndex)); 196 __ str(R0, Address(SP, (-kWordSize * 30), Address::PreIndex));
197 __ str(R1, Address(R2, (-kWordSize * 29))); 197 __ str(R1, Address(R2, (-kWordSize * 29)));
198 __ vldrd(D0, Address(R2, (-kWordSize * 30))); 198 __ vldrd(D0, Address(R2, (-kWordSize * 30)));
199 __ vaddd(D0, D0, D0); 199 __ vaddd(D0, D0, D0);
200 __ vstrd(D0, Address(R2, (-kWordSize * 30))); 200 __ vstrd(D0, Address(R2, (-kWordSize * 30)));
201 __ ldr(R1, Address(R2, (-kWordSize * 29))); 201 __ ldr(R1, Address(R2, (-kWordSize * 29)));
202 __ ldr(R0, Address(SP, (kWordSize * 30), Address::PostIndex)); 202 __ ldr(R0, Address(SP, (kWordSize * 30), Address::PostIndex));
203 } else { 203 } else {
204 __ LoadImmediate(R0, 0); 204 __ LoadImmediate(R0, 0);
205 } 205 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 282 }
283 283
284 284
285 ASSEMBLER_TEST_GENERATE(DoubleSqrtNeg, assembler) { 285 ASSEMBLER_TEST_GENERATE(DoubleSqrtNeg, assembler) {
286 if (TargetCPUFeatures::vfp_supported()) { 286 if (TargetCPUFeatures::vfp_supported()) {
287 // Check that sqrt of a negative double gives NaN. 287 // Check that sqrt of a negative double gives NaN.
288 __ LoadDImmediate(D1, -1.0, R0); 288 __ LoadDImmediate(D1, -1.0, R0);
289 __ vsqrtd(D0, D1); 289 __ vsqrtd(D0, D1);
290 __ vcmpd(D0, D0); 290 __ vcmpd(D0, D0);
291 __ vmstat(); 291 __ vmstat();
292 __ mov(R0, ShifterOperand(1), VS); 292 __ mov(R0, Operand(1), VS);
293 __ mov(R0, ShifterOperand(0), VC); 293 __ mov(R0, Operand(0), VC);
294 } else { 294 } else {
295 __ LoadImmediate(R0, 1); 295 __ LoadImmediate(R0, 1);
296 } 296 }
297 __ Ret(); 297 __ Ret();
298 } 298 }
299 299
300 300
301 ASSEMBLER_TEST_RUN(DoubleSqrtNeg, test) { 301 ASSEMBLER_TEST_RUN(DoubleSqrtNeg, test) {
302 EXPECT(test != NULL); 302 EXPECT(test != NULL);
303 typedef int (*DoubleSqrtNeg)(); 303 typedef int (*DoubleSqrtNeg)();
304 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(DoubleSqrtNeg, test->entry())); 304 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(DoubleSqrtNeg, test->entry()));
305 } 305 }
306 306
307 307
308 ASSEMBLER_TEST_GENERATE(IntToDoubleConversion, assembler) { 308 ASSEMBLER_TEST_GENERATE(IntToDoubleConversion, assembler) {
309 if (TargetCPUFeatures::vfp_supported()) { 309 if (TargetCPUFeatures::vfp_supported()) {
310 __ mov(R3, ShifterOperand(6)); 310 __ mov(R3, Operand(6));
311 __ vmovsr(S3, R3); 311 __ vmovsr(S3, R3);
312 __ vcvtdi(D0, S3); 312 __ vcvtdi(D0, S3);
313 } else { 313 } else {
314 __ LoadImmediate(R0, 0); 314 __ LoadImmediate(R0, 0);
315 } 315 }
316 __ bx(LR); 316 __ bx(LR);
317 } 317 }
318 318
319 319
320 ASSEMBLER_TEST_RUN(IntToDoubleConversion, test) { 320 ASSEMBLER_TEST_RUN(IntToDoubleConversion, test) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 } else { 360 } else {
361 typedef int (*LongToDoubleConversionCode)(); 361 typedef int (*LongToDoubleConversionCode)();
362 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(LongToDoubleConversionCode, 362 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(LongToDoubleConversionCode,
363 test->entry())); 363 test->entry()));
364 } 364 }
365 } 365 }
366 366
367 367
368 ASSEMBLER_TEST_GENERATE(IntToFloatConversion, assembler) { 368 ASSEMBLER_TEST_GENERATE(IntToFloatConversion, assembler) {
369 if (TargetCPUFeatures::vfp_supported()) { 369 if (TargetCPUFeatures::vfp_supported()) {
370 __ mov(R3, ShifterOperand(6)); 370 __ mov(R3, Operand(6));
371 __ vmovsr(S3, R3); 371 __ vmovsr(S3, R3);
372 __ vcvtsi(S0, S3); 372 __ vcvtsi(S0, S3);
373 } else { 373 } else {
374 __ LoadImmediate(R0, 0); 374 __ LoadImmediate(R0, 0);
375 } 375 }
376 __ bx(LR); 376 __ bx(LR);
377 } 377 }
378 378
379 379
380 ASSEMBLER_TEST_RUN(IntToFloatConversion, test) { 380 ASSEMBLER_TEST_RUN(IntToFloatConversion, test) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 } 496 }
497 497
498 498
499 ASSEMBLER_TEST_GENERATE(FloatCompare, assembler) { 499 ASSEMBLER_TEST_GENERATE(FloatCompare, assembler) {
500 if (TargetCPUFeatures::vfp_supported()) { 500 if (TargetCPUFeatures::vfp_supported()) {
501 // Test 12.3f vs 12.5f. 501 // Test 12.3f vs 12.5f.
502 __ LoadSImmediate(S0, 12.3f); 502 __ LoadSImmediate(S0, 12.3f);
503 __ LoadSImmediate(S1, 12.5f); 503 __ LoadSImmediate(S1, 12.5f);
504 504
505 // Count errors in R0. R0 is zero if no errors found. 505 // Count errors in R0. R0 is zero if no errors found.
506 __ mov(R0, ShifterOperand(0)); 506 __ mov(R0, Operand(0));
507 __ vcmps(S0, S1); 507 __ vcmps(S0, S1);
508 __ vmstat(); 508 __ vmstat();
509 __ add(R0, R0, ShifterOperand(1), VS); // Error if unordered (Nan). 509 __ add(R0, R0, Operand(1), VS); // Error if unordered (Nan).
510 __ add(R0, R0, ShifterOperand(2), GT); // Error if greater. 510 __ add(R0, R0, Operand(2), GT); // Error if greater.
511 __ add(R0, R0, ShifterOperand(4), EQ); // Error if equal. 511 __ add(R0, R0, Operand(4), EQ); // Error if equal.
512 __ add(R0, R0, ShifterOperand(8), PL); // Error if not less. 512 __ add(R0, R0, Operand(8), PL); // Error if not less.
513 513
514 // Test NaN. 514 // Test NaN.
515 // Create NaN by dividing 0.0f/0.0f. 515 // Create NaN by dividing 0.0f/0.0f.
516 __ LoadSImmediate(S1, 0.0f); 516 __ LoadSImmediate(S1, 0.0f);
517 __ vdivs(S1, S1, S1); 517 __ vdivs(S1, S1, S1);
518 __ vcmps(S1, S1); 518 __ vcmps(S1, S1);
519 __ vmstat(); 519 __ vmstat();
520 // Error if not unordered (not Nan). 520 // Error if not unordered (not Nan).
521 __ add(R0, R0, ShifterOperand(16), VC); 521 __ add(R0, R0, Operand(16), VC);
522 } else { 522 } else {
523 __ LoadImmediate(R0, 0); 523 __ LoadImmediate(R0, 0);
524 } 524 }
525 // R0 is 0 if all tests passed. 525 // R0 is 0 if all tests passed.
526 __ bx(LR); 526 __ bx(LR);
527 } 527 }
528 528
529 529
530 ASSEMBLER_TEST_RUN(FloatCompare, test) { 530 ASSEMBLER_TEST_RUN(FloatCompare, test) {
531 EXPECT(test != NULL); 531 EXPECT(test != NULL);
532 typedef int (*FloatCompare)(); 532 typedef int (*FloatCompare)();
533 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(FloatCompare, test->entry())); 533 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(FloatCompare, test->entry()));
534 } 534 }
535 535
536 536
537 ASSEMBLER_TEST_GENERATE(DoubleCompare, assembler) { 537 ASSEMBLER_TEST_GENERATE(DoubleCompare, assembler) {
538 if (TargetCPUFeatures::vfp_supported()) { 538 if (TargetCPUFeatures::vfp_supported()) {
539 // Test 12.3 vs 12.5. 539 // Test 12.3 vs 12.5.
540 __ LoadDImmediate(D0, 12.3, R1); 540 __ LoadDImmediate(D0, 12.3, R1);
541 __ LoadDImmediate(D1, 12.5, R1); 541 __ LoadDImmediate(D1, 12.5, R1);
542 542
543 // Count errors in R0. R0 is zero if no errors found. 543 // Count errors in R0. R0 is zero if no errors found.
544 __ mov(R0, ShifterOperand(0)); 544 __ mov(R0, Operand(0));
545 __ vcmpd(D0, D1); 545 __ vcmpd(D0, D1);
546 __ vmstat(); 546 __ vmstat();
547 __ add(R0, R0, ShifterOperand(1), VS); // Error if unordered (Nan). 547 __ add(R0, R0, Operand(1), VS); // Error if unordered (Nan).
548 __ add(R0, R0, ShifterOperand(2), GT); // Error if greater. 548 __ add(R0, R0, Operand(2), GT); // Error if greater.
549 __ add(R0, R0, ShifterOperand(4), EQ); // Error if equal. 549 __ add(R0, R0, Operand(4), EQ); // Error if equal.
550 __ add(R0, R0, ShifterOperand(8), PL); // Error if not less. 550 __ add(R0, R0, Operand(8), PL); // Error if not less.
551 551
552 // Test NaN. 552 // Test NaN.
553 // Create NaN by dividing 0.0/0.0. 553 // Create NaN by dividing 0.0/0.0.
554 __ LoadDImmediate(D1, 0.0, R1); 554 __ LoadDImmediate(D1, 0.0, R1);
555 __ vdivd(D1, D1, D1); 555 __ vdivd(D1, D1, D1);
556 __ vcmpd(D1, D1); 556 __ vcmpd(D1, D1);
557 __ vmstat(); 557 __ vmstat();
558 // Error if not unordered (not Nan). 558 // Error if not unordered (not Nan).
559 __ add(R0, R0, ShifterOperand(16), VC); 559 __ add(R0, R0, Operand(16), VC);
560 } else { 560 } else {
561 __ LoadImmediate(R0, 0); 561 __ LoadImmediate(R0, 0);
562 } 562 }
563 // R0 is 0 if all tests passed. 563 // R0 is 0 if all tests passed.
564 __ bx(LR); 564 __ bx(LR);
565 } 565 }
566 566
567 567
568 ASSEMBLER_TEST_RUN(DoubleCompare, test) { 568 ASSEMBLER_TEST_RUN(DoubleCompare, test) {
569 EXPECT(test != NULL); 569 EXPECT(test != NULL);
570 typedef int (*DoubleCompare)(); 570 typedef int (*DoubleCompare)();
571 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(DoubleCompare, test->entry())); 571 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(DoubleCompare, test->entry()));
572 } 572 }
573 573
574 574
575 ASSEMBLER_TEST_GENERATE(Loop, assembler) { 575 ASSEMBLER_TEST_GENERATE(Loop, assembler) {
576 Label loop_entry; 576 Label loop_entry;
577 __ mov(R0, ShifterOperand(1)); 577 __ mov(R0, Operand(1));
578 __ mov(R1, ShifterOperand(2)); 578 __ mov(R1, Operand(2));
579 __ Bind(&loop_entry); 579 __ Bind(&loop_entry);
580 __ mov(R0, ShifterOperand(R0, LSL, 1)); 580 __ mov(R0, Operand(R0, LSL, 1));
581 __ movs(R1, ShifterOperand(R1, LSR, 1)); 581 __ movs(R1, Operand(R1, LSR, 1));
582 __ b(&loop_entry, NE); 582 __ b(&loop_entry, NE);
583 __ bx(LR); 583 __ bx(LR);
584 } 584 }
585 585
586 586
587 ASSEMBLER_TEST_RUN(Loop, test) { 587 ASSEMBLER_TEST_RUN(Loop, test) {
588 EXPECT(test != NULL); 588 EXPECT(test != NULL);
589 typedef int (*Loop)(); 589 typedef int (*Loop)();
590 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Loop, test->entry())); 590 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Loop, test->entry()));
591 } 591 }
592 592
593 593
594 ASSEMBLER_TEST_GENERATE(ForwardBranch, assembler) { 594 ASSEMBLER_TEST_GENERATE(ForwardBranch, assembler) {
595 Label skip; 595 Label skip;
596 __ mov(R0, ShifterOperand(42)); 596 __ mov(R0, Operand(42));
597 __ b(&skip); 597 __ b(&skip);
598 __ mov(R0, ShifterOperand(11)); 598 __ mov(R0, Operand(11));
599 __ Bind(&skip); 599 __ Bind(&skip);
600 __ bx(LR); 600 __ bx(LR);
601 } 601 }
602 602
603 603
604 ASSEMBLER_TEST_RUN(ForwardBranch, test) { 604 ASSEMBLER_TEST_RUN(ForwardBranch, test) {
605 EXPECT(test != NULL); 605 EXPECT(test != NULL);
606 typedef int (*ForwardBranch)(); 606 typedef int (*ForwardBranch)();
607 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(ForwardBranch, test->entry())); 607 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(ForwardBranch, test->entry()));
608 } 608 }
609 609
610 610
611 ASSEMBLER_TEST_GENERATE(Loop2, assembler) { 611 ASSEMBLER_TEST_GENERATE(Loop2, assembler) {
612 Label loop_entry; 612 Label loop_entry;
613 __ set_use_far_branches(true); 613 __ set_use_far_branches(true);
614 __ mov(R0, ShifterOperand(1)); 614 __ mov(R0, Operand(1));
615 __ mov(R1, ShifterOperand(2)); 615 __ mov(R1, Operand(2));
616 __ Bind(&loop_entry); 616 __ Bind(&loop_entry);
617 __ mov(R0, ShifterOperand(R0, LSL, 1)); 617 __ mov(R0, Operand(R0, LSL, 1));
618 __ movs(R1, ShifterOperand(R1, LSR, 1)); 618 __ movs(R1, Operand(R1, LSR, 1));
619 __ b(&loop_entry, NE); 619 __ b(&loop_entry, NE);
620 __ bx(LR); 620 __ bx(LR);
621 } 621 }
622 622
623 623
624 ASSEMBLER_TEST_RUN(Loop2, test) { 624 ASSEMBLER_TEST_RUN(Loop2, test) {
625 EXPECT(test != NULL); 625 EXPECT(test != NULL);
626 typedef int (*Loop)(); 626 typedef int (*Loop)();
627 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Loop, test->entry())); 627 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Loop, test->entry()));
628 } 628 }
629 629
630 630
631 ASSEMBLER_TEST_GENERATE(Loop3, assembler) { 631 ASSEMBLER_TEST_GENERATE(Loop3, assembler) {
632 Label loop_entry; 632 Label loop_entry;
633 __ set_use_far_branches(true); 633 __ set_use_far_branches(true);
634 __ mov(R0, ShifterOperand(1)); 634 __ mov(R0, Operand(1));
635 __ mov(R1, ShifterOperand(2)); 635 __ mov(R1, Operand(2));
636 __ Bind(&loop_entry); 636 __ Bind(&loop_entry);
637 for (int i = 0; i < (1 << 22); i++) { 637 for (int i = 0; i < (1 << 22); i++) {
638 __ nop(); 638 __ nop();
639 } 639 }
640 __ mov(R0, ShifterOperand(R0, LSL, 1)); 640 __ mov(R0, Operand(R0, LSL, 1));
641 __ movs(R1, ShifterOperand(R1, LSR, 1)); 641 __ movs(R1, Operand(R1, LSR, 1));
642 __ b(&loop_entry, NE); 642 __ b(&loop_entry, NE);
643 __ bx(LR); 643 __ bx(LR);
644 } 644 }
645 645
646 646
647 ASSEMBLER_TEST_RUN(Loop3, test) { 647 ASSEMBLER_TEST_RUN(Loop3, test) {
648 EXPECT(test != NULL); 648 EXPECT(test != NULL);
649 typedef int (*Loop)(); 649 typedef int (*Loop)();
650 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Loop, test->entry())); 650 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Loop, test->entry()));
651 } 651 }
652 652
653 653
654 ASSEMBLER_TEST_GENERATE(LoadStore, assembler) { 654 ASSEMBLER_TEST_GENERATE(LoadStore, assembler) {
655 __ mov(R1, ShifterOperand(123)); 655 __ mov(R1, Operand(123));
656 __ Push(R1); 656 __ Push(R1);
657 __ Pop(R0); 657 __ Pop(R0);
658 __ bx(LR); 658 __ bx(LR);
659 } 659 }
660 660
661 661
662 ASSEMBLER_TEST_RUN(LoadStore, test) { 662 ASSEMBLER_TEST_RUN(LoadStore, test) {
663 EXPECT(test != NULL); 663 EXPECT(test != NULL);
664 typedef int (*LoadStore)(); 664 typedef int (*LoadStore)();
665 EXPECT_EQ(123, EXECUTE_TEST_CODE_INT32(LoadStore, test->entry())); 665 EXPECT_EQ(123, EXECUTE_TEST_CODE_INT32(LoadStore, test->entry()));
666 } 666 }
667 667
668 668
669 ASSEMBLER_TEST_GENERATE(AddSub, assembler) { 669 ASSEMBLER_TEST_GENERATE(AddSub, assembler) {
670 __ mov(R1, ShifterOperand(40)); 670 __ mov(R1, Operand(40));
671 __ sub(R1, R1, ShifterOperand(2)); 671 __ sub(R1, R1, Operand(2));
672 __ add(R0, R1, ShifterOperand(4)); 672 __ add(R0, R1, Operand(4));
673 __ rsbs(R0, R0, ShifterOperand(100)); 673 __ rsbs(R0, R0, Operand(100));
674 __ rsc(R0, R0, ShifterOperand(100)); 674 __ rsc(R0, R0, Operand(100));
675 __ bx(LR); 675 __ bx(LR);
676 } 676 }
677 677
678 678
679 ASSEMBLER_TEST_RUN(AddSub, test) { 679 ASSEMBLER_TEST_RUN(AddSub, test) {
680 EXPECT(test != NULL); 680 EXPECT(test != NULL);
681 typedef int (*AddSub)(); 681 typedef int (*AddSub)();
682 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(AddSub, test->entry())); 682 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(AddSub, test->entry()));
683 } 683 }
684 684
685 685
686 ASSEMBLER_TEST_GENERATE(AddCarry, assembler) { 686 ASSEMBLER_TEST_GENERATE(AddCarry, assembler) {
687 __ LoadImmediate(R2, 0xFFFFFFFF); 687 __ LoadImmediate(R2, 0xFFFFFFFF);
688 __ mov(R1, ShifterOperand(1)); 688 __ mov(R1, Operand(1));
689 __ mov(R0, ShifterOperand(0)); 689 __ mov(R0, Operand(0));
690 __ adds(R2, R2, ShifterOperand(R1)); 690 __ adds(R2, R2, Operand(R1));
691 __ adcs(R0, R0, ShifterOperand(R0)); 691 __ adcs(R0, R0, Operand(R0));
692 __ bx(LR); 692 __ bx(LR);
693 } 693 }
694 694
695 695
696 ASSEMBLER_TEST_RUN(AddCarry, test) { 696 ASSEMBLER_TEST_RUN(AddCarry, test) {
697 EXPECT(test != NULL); 697 EXPECT(test != NULL);
698 typedef int (*AddCarry)(); 698 typedef int (*AddCarry)();
699 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(AddCarry, test->entry())); 699 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(AddCarry, test->entry()));
700 } 700 }
701 701
702 702
703 ASSEMBLER_TEST_GENERATE(SubCarry, assembler) { 703 ASSEMBLER_TEST_GENERATE(SubCarry, assembler) {
704 __ LoadImmediate(R2, 0x0); 704 __ LoadImmediate(R2, 0x0);
705 __ mov(R1, ShifterOperand(1)); 705 __ mov(R1, Operand(1));
706 __ mov(R0, ShifterOperand(0)); 706 __ mov(R0, Operand(0));
707 __ subs(R2, R2, ShifterOperand(R1)); 707 __ subs(R2, R2, Operand(R1));
708 __ sbcs(R0, R0, ShifterOperand(R0)); 708 __ sbcs(R0, R0, Operand(R0));
709 __ bx(LR); 709 __ bx(LR);
710 } 710 }
711 711
712 712
713 ASSEMBLER_TEST_RUN(SubCarry, test) { 713 ASSEMBLER_TEST_RUN(SubCarry, test) {
714 EXPECT(test != NULL); 714 EXPECT(test != NULL);
715 typedef int (*SubCarry)(); 715 typedef int (*SubCarry)();
716 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT32(SubCarry, test->entry())); 716 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT32(SubCarry, test->entry()));
717 } 717 }
718 718
719 719
720 ASSEMBLER_TEST_GENERATE(AndOrr, assembler) { 720 ASSEMBLER_TEST_GENERATE(AndOrr, assembler) {
721 __ mov(R1, ShifterOperand(40)); 721 __ mov(R1, Operand(40));
722 __ mov(R2, ShifterOperand(0)); 722 __ mov(R2, Operand(0));
723 __ and_(R1, R2, ShifterOperand(R1)); 723 __ and_(R1, R2, Operand(R1));
724 __ mov(R3, ShifterOperand(42)); 724 __ mov(R3, Operand(42));
725 __ orr(R0, R1, ShifterOperand(R3)); 725 __ orr(R0, R1, Operand(R3));
726 __ bx(LR); 726 __ bx(LR);
727 } 727 }
728 728
729 729
730 ASSEMBLER_TEST_RUN(AndOrr, test) { 730 ASSEMBLER_TEST_RUN(AndOrr, test) {
731 EXPECT(test != NULL); 731 EXPECT(test != NULL);
732 typedef int (*AndOrr)(); 732 typedef int (*AndOrr)();
733 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(AndOrr, test->entry())); 733 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(AndOrr, test->entry()));
734 } 734 }
735 735
736 736
737 ASSEMBLER_TEST_GENERATE(Orrs, assembler) { 737 ASSEMBLER_TEST_GENERATE(Orrs, assembler) {
738 __ mov(R0, ShifterOperand(0)); 738 __ mov(R0, Operand(0));
739 __ tst(R0, ShifterOperand(R1)); // Set zero-flag. 739 __ tst(R0, Operand(R1)); // Set zero-flag.
740 __ orrs(R0, R0, ShifterOperand(1)); // Clear zero-flag. 740 __ orrs(R0, R0, Operand(1)); // Clear zero-flag.
741 __ bx(LR, EQ); 741 __ bx(LR, EQ);
742 __ mov(R0, ShifterOperand(42)); 742 __ mov(R0, Operand(42));
743 __ bx(LR, NE); // Only this return should fire. 743 __ bx(LR, NE); // Only this return should fire.
744 __ mov(R0, ShifterOperand(2)); 744 __ mov(R0, Operand(2));
745 __ bx(LR); 745 __ bx(LR);
746 } 746 }
747 747
748 748
749 ASSEMBLER_TEST_RUN(Orrs, test) { 749 ASSEMBLER_TEST_RUN(Orrs, test) {
750 EXPECT(test != NULL); 750 EXPECT(test != NULL);
751 typedef int (*Orrs)(); 751 typedef int (*Orrs)();
752 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Orrs, test->entry())); 752 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Orrs, test->entry()));
753 } 753 }
754 754
755 755
756 ASSEMBLER_TEST_GENERATE(Multiply, assembler) { 756 ASSEMBLER_TEST_GENERATE(Multiply, assembler) {
757 __ mov(R1, ShifterOperand(20)); 757 __ mov(R1, Operand(20));
758 __ mov(R2, ShifterOperand(40)); 758 __ mov(R2, Operand(40));
759 __ mul(R3, R2, R1); 759 __ mul(R3, R2, R1);
760 __ mov(R0, ShifterOperand(R3)); 760 __ mov(R0, Operand(R3));
761 __ bx(LR); 761 __ bx(LR);
762 } 762 }
763 763
764 764
765 ASSEMBLER_TEST_RUN(Multiply, test) { 765 ASSEMBLER_TEST_RUN(Multiply, test) {
766 EXPECT(test != NULL); 766 EXPECT(test != NULL);
767 typedef int (*Multiply)(); 767 typedef int (*Multiply)();
768 EXPECT_EQ(800, EXECUTE_TEST_CODE_INT32(Multiply, test->entry())); 768 EXPECT_EQ(800, EXECUTE_TEST_CODE_INT32(Multiply, test->entry()));
769 } 769 }
770 770
(...skipping 29 matching lines...) Expand all
800 } 800 }
801 801
802 802
803 ASSEMBLER_TEST_GENERATE(Multiply64To64, assembler) { 803 ASSEMBLER_TEST_GENERATE(Multiply64To64, assembler) {
804 #if defined(USING_SIMULATOR) 804 #if defined(USING_SIMULATOR)
805 const ARMVersion version = TargetCPUFeatures::arm_version(); 805 const ARMVersion version = TargetCPUFeatures::arm_version();
806 HostCPUFeatures::set_arm_version(ARMv7); 806 HostCPUFeatures::set_arm_version(ARMv7);
807 #endif 807 #endif
808 if (TargetCPUFeatures::arm_version() == ARMv7) { 808 if (TargetCPUFeatures::arm_version() == ARMv7) {
809 __ Push(R4); 809 __ Push(R4);
810 __ mov(IP, ShifterOperand(R0)); 810 __ mov(IP, Operand(R0));
811 __ mul(R4, R2, R1); 811 __ mul(R4, R2, R1);
812 __ umull(R0, R1, R2, IP); 812 __ umull(R0, R1, R2, IP);
813 __ mla(R2, IP, R3, R4); 813 __ mla(R2, IP, R3, R4);
814 __ add(R1, R2, ShifterOperand(R1)); 814 __ add(R1, R2, Operand(R1));
815 __ Pop(R4); 815 __ Pop(R4);
816 } else { 816 } else {
817 __ LoadImmediate(R0, 6); 817 __ LoadImmediate(R0, 6);
818 } 818 }
819 __ bx(LR); 819 __ bx(LR);
820 #if defined(USING_SIMULATOR) 820 #if defined(USING_SIMULATOR)
821 HostCPUFeatures::set_arm_version(version); 821 HostCPUFeatures::set_arm_version(version);
822 #endif 822 #endif
823 } 823 }
824 824
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 EXPECT(test != NULL); 877 EXPECT(test != NULL);
878 typedef int64_t (*Multiply32To64)(int64_t operand0, int64_t operand1); 878 typedef int64_t (*Multiply32To64)(int64_t operand0, int64_t operand1);
879 EXPECT_EQ(3, 879 EXPECT_EQ(3,
880 EXECUTE_TEST_CODE_INT64_LL(Multiply32To64, test->entry(), -3, -2)); 880 EXECUTE_TEST_CODE_INT64_LL(Multiply32To64, test->entry(), -3, -2));
881 } 881 }
882 882
883 883
884 ASSEMBLER_TEST_GENERATE(Clz, assembler) { 884 ASSEMBLER_TEST_GENERATE(Clz, assembler) {
885 Label error; 885 Label error;
886 886
887 __ mov(R0, ShifterOperand(0)); 887 __ mov(R0, Operand(0));
888 __ clz(R1, R0); 888 __ clz(R1, R0);
889 __ cmp(R1, ShifterOperand(32)); 889 __ cmp(R1, Operand(32));
890 __ b(&error, NE); 890 __ b(&error, NE);
891 __ mov(R2, ShifterOperand(42)); 891 __ mov(R2, Operand(42));
892 __ clz(R2, R2); 892 __ clz(R2, R2);
893 __ cmp(R2, ShifterOperand(26)); 893 __ cmp(R2, Operand(26));
894 __ b(&error, NE); 894 __ b(&error, NE);
895 __ mvn(R0, ShifterOperand(0)); 895 __ mvn(R0, Operand(0));
896 __ clz(R1, R0); 896 __ clz(R1, R0);
897 __ cmp(R1, ShifterOperand(0)); 897 __ cmp(R1, Operand(0));
898 __ b(&error, NE); 898 __ b(&error, NE);
899 __ Lsr(R0, R0, 3); 899 __ Lsr(R0, R0, 3);
900 __ clz(R1, R0); 900 __ clz(R1, R0);
901 __ cmp(R1, ShifterOperand(3)); 901 __ cmp(R1, Operand(3));
902 __ b(&error, NE); 902 __ b(&error, NE);
903 __ mov(R0, ShifterOperand(0)); 903 __ mov(R0, Operand(0));
904 __ bx(LR); 904 __ bx(LR);
905 __ Bind(&error); 905 __ Bind(&error);
906 __ mov(R0, ShifterOperand(1)); 906 __ mov(R0, Operand(1));
907 __ bx(LR); 907 __ bx(LR);
908 } 908 }
909 909
910 910
911 ASSEMBLER_TEST_RUN(Clz, test) { 911 ASSEMBLER_TEST_RUN(Clz, test) {
912 EXPECT(test != NULL); 912 EXPECT(test != NULL);
913 typedef int (*Clz)(); 913 typedef int (*Clz)();
914 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Clz, test->entry())); 914 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Clz, test->entry()));
915 } 915 }
916 916
917 917
918 ASSEMBLER_TEST_GENERATE(Tst, assembler) { 918 ASSEMBLER_TEST_GENERATE(Tst, assembler) {
919 Label skip; 919 Label skip;
920 920
921 __ mov(R0, ShifterOperand(42)); 921 __ mov(R0, Operand(42));
922 __ mov(R1, ShifterOperand(40)); 922 __ mov(R1, Operand(40));
923 __ tst(R1, ShifterOperand(0)); 923 __ tst(R1, Operand(0));
924 __ b(&skip, NE); 924 __ b(&skip, NE);
925 __ mov(R0, ShifterOperand(0)); 925 __ mov(R0, Operand(0));
926 __ Bind(&skip); 926 __ Bind(&skip);
927 __ bx(LR); 927 __ bx(LR);
928 } 928 }
929 929
930 930
931 ASSEMBLER_TEST_RUN(Tst, test) { 931 ASSEMBLER_TEST_RUN(Tst, test) {
932 EXPECT(test != NULL); 932 EXPECT(test != NULL);
933 typedef int (*Tst)(); 933 typedef int (*Tst)();
934 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 934 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
935 } 935 }
936 936
937 937
938 ASSEMBLER_TEST_GENERATE(Lsl, assembler) { 938 ASSEMBLER_TEST_GENERATE(Lsl, assembler) {
939 Label skip; 939 Label skip;
940 940
941 __ mov(R0, ShifterOperand(1)); 941 __ mov(R0, Operand(1));
942 __ mov(R0, ShifterOperand(R0, LSL, 1)); 942 __ mov(R0, Operand(R0, LSL, 1));
943 __ mov(R1, ShifterOperand(1)); 943 __ mov(R1, Operand(1));
944 __ mov(R0, ShifterOperand(R0, LSL, R1)); 944 __ mov(R0, Operand(R0, LSL, R1));
945 __ bx(LR); 945 __ bx(LR);
946 } 946 }
947 947
948 948
949 ASSEMBLER_TEST_RUN(Lsl, test) { 949 ASSEMBLER_TEST_RUN(Lsl, test) {
950 EXPECT(test != NULL); 950 EXPECT(test != NULL);
951 typedef int (*Tst)(); 951 typedef int (*Tst)();
952 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 952 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
953 } 953 }
954 954
955 955
956 ASSEMBLER_TEST_GENERATE(Lsr, assembler) { 956 ASSEMBLER_TEST_GENERATE(Lsr, assembler) {
957 Label skip; 957 Label skip;
958 958
959 __ mov(R0, ShifterOperand(4)); 959 __ mov(R0, Operand(4));
960 __ mov(R0, ShifterOperand(R0, LSR, 1)); 960 __ mov(R0, Operand(R0, LSR, 1));
961 __ mov(R1, ShifterOperand(1)); 961 __ mov(R1, Operand(1));
962 __ mov(R0, ShifterOperand(R0, LSR, R1)); 962 __ mov(R0, Operand(R0, LSR, R1));
963 __ bx(LR); 963 __ bx(LR);
964 } 964 }
965 965
966 966
967 ASSEMBLER_TEST_RUN(Lsr, test) { 967 ASSEMBLER_TEST_RUN(Lsr, test) {
968 EXPECT(test != NULL); 968 EXPECT(test != NULL);
969 typedef int (*Tst)(); 969 typedef int (*Tst)();
970 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 970 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
971 } 971 }
972 972
973 973
974 ASSEMBLER_TEST_GENERATE(Lsr1, assembler) { 974 ASSEMBLER_TEST_GENERATE(Lsr1, assembler) {
975 Label skip; 975 Label skip;
976 976
977 __ mov(R0, ShifterOperand(1)); 977 __ mov(R0, Operand(1));
978 __ Lsl(R0, R0, 31); 978 __ Lsl(R0, R0, 31);
979 __ Lsr(R0, R0, 31); 979 __ Lsr(R0, R0, 31);
980 __ bx(LR); 980 __ bx(LR);
981 } 981 }
982 982
983 983
984 ASSEMBLER_TEST_RUN(Lsr1, test) { 984 ASSEMBLER_TEST_RUN(Lsr1, test) {
985 EXPECT(test != NULL); 985 EXPECT(test != NULL);
986 typedef int (*Tst)(); 986 typedef int (*Tst)();
987 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 987 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
988 } 988 }
989 989
990 990
991 ASSEMBLER_TEST_GENERATE(Asr1, assembler) { 991 ASSEMBLER_TEST_GENERATE(Asr1, assembler) {
992 Label skip; 992 Label skip;
993 993
994 __ mov(R0, ShifterOperand(1)); 994 __ mov(R0, Operand(1));
995 __ Lsl(R0, R0, 31); 995 __ Lsl(R0, R0, 31);
996 __ Asr(R0, R0, 31); 996 __ Asr(R0, R0, 31);
997 __ bx(LR); 997 __ bx(LR);
998 } 998 }
999 999
1000 1000
1001 ASSEMBLER_TEST_RUN(Asr1, test) { 1001 ASSEMBLER_TEST_RUN(Asr1, test) {
1002 EXPECT(test != NULL); 1002 EXPECT(test != NULL);
1003 typedef int (*Tst)(); 1003 typedef int (*Tst)();
1004 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1004 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1005 } 1005 }
1006 1006
1007 1007
1008 ASSEMBLER_TEST_GENERATE(Rsb, assembler) { 1008 ASSEMBLER_TEST_GENERATE(Rsb, assembler) {
1009 __ mov(R3, ShifterOperand(10)); 1009 __ mov(R3, Operand(10));
1010 __ rsb(R0, R3, ShifterOperand(42)); 1010 __ rsb(R0, R3, Operand(42));
1011 __ bx(LR); 1011 __ bx(LR);
1012 } 1012 }
1013 1013
1014 1014
1015 ASSEMBLER_TEST_RUN(Rsb, test) { 1015 ASSEMBLER_TEST_RUN(Rsb, test) {
1016 EXPECT(test != NULL); 1016 EXPECT(test != NULL);
1017 typedef int (*Rsb)(); 1017 typedef int (*Rsb)();
1018 EXPECT_EQ(32, EXECUTE_TEST_CODE_INT32(Rsb, test->entry())); 1018 EXPECT_EQ(32, EXECUTE_TEST_CODE_INT32(Rsb, test->entry()));
1019 } 1019 }
1020 1020
1021 1021
1022 ASSEMBLER_TEST_GENERATE(Ldrh, assembler) { 1022 ASSEMBLER_TEST_GENERATE(Ldrh, assembler) {
1023 Label Test1, Test2, Test3, Done; 1023 Label Test1, Test2, Test3, Done;
1024 1024
1025 __ mov(R1, ShifterOperand(0x11)); 1025 __ mov(R1, Operand(0x11));
1026 __ mov(R2, ShifterOperand(SP)); 1026 __ mov(R2, Operand(SP));
1027 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex)); 1027 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex));
1028 __ ldrh(R0, Address(R2, (-kWordSize * 30))); 1028 __ ldrh(R0, Address(R2, (-kWordSize * 30)));
1029 __ cmp(R0, ShifterOperand(0x11)); 1029 __ cmp(R0, Operand(0x11));
1030 __ b(&Test1, EQ); 1030 __ b(&Test1, EQ);
1031 __ mov(R0, ShifterOperand(1)); 1031 __ mov(R0, Operand(1));
1032 __ b(&Done); 1032 __ b(&Done);
1033 __ Bind(&Test1); 1033 __ Bind(&Test1);
1034 1034
1035 __ mov(R0, ShifterOperand(0x22)); 1035 __ mov(R0, Operand(0x22));
1036 __ strh(R0, Address(R2, (-kWordSize * 30))); 1036 __ strh(R0, Address(R2, (-kWordSize * 30)));
1037 __ ldrh(R1, Address(R2, (-kWordSize * 30))); 1037 __ ldrh(R1, Address(R2, (-kWordSize * 30)));
1038 __ cmp(R1, ShifterOperand(0x22)); 1038 __ cmp(R1, Operand(0x22));
1039 __ b(&Test2, EQ); 1039 __ b(&Test2, EQ);
1040 __ mov(R0, ShifterOperand(1)); 1040 __ mov(R0, Operand(1));
1041 __ b(&Done); 1041 __ b(&Done);
1042 __ Bind(&Test2); 1042 __ Bind(&Test2);
1043 1043
1044 __ mov(R0, ShifterOperand(0)); 1044 __ mov(R0, Operand(0));
1045 __ AddImmediate(R2, (-kWordSize * 30)); 1045 __ AddImmediate(R2, (-kWordSize * 30));
1046 __ strh(R0, Address(R2)); 1046 __ strh(R0, Address(R2));
1047 __ ldrh(R1, Address(R2)); 1047 __ ldrh(R1, Address(R2));
1048 __ cmp(R1, ShifterOperand(0)); 1048 __ cmp(R1, Operand(0));
1049 __ b(&Test3, EQ); 1049 __ b(&Test3, EQ);
1050 __ mov(R0, ShifterOperand(1)); 1050 __ mov(R0, Operand(1));
1051 __ b(&Done); 1051 __ b(&Done);
1052 __ Bind(&Test3); 1052 __ Bind(&Test3);
1053 1053
1054 __ mov(R0, ShifterOperand(0)); 1054 __ mov(R0, Operand(0));
1055 __ Bind(&Done); 1055 __ Bind(&Done);
1056 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex)); 1056 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex));
1057 __ bx(LR); 1057 __ bx(LR);
1058 } 1058 }
1059 1059
1060 1060
1061 ASSEMBLER_TEST_RUN(Ldrh, test) { 1061 ASSEMBLER_TEST_RUN(Ldrh, test) {
1062 EXPECT(test != NULL); 1062 EXPECT(test != NULL);
1063 typedef int (*Tst)(); 1063 typedef int (*Tst)();
1064 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1064 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1065 } 1065 }
1066 1066
1067 1067
1068 ASSEMBLER_TEST_GENERATE(Ldrsb, assembler) { 1068 ASSEMBLER_TEST_GENERATE(Ldrsb, assembler) {
1069 __ mov(R1, ShifterOperand(0xFF)); 1069 __ mov(R1, Operand(0xFF));
1070 __ mov(R2, ShifterOperand(SP)); 1070 __ mov(R2, Operand(SP));
1071 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex)); 1071 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex));
1072 __ ldrsb(R0, Address(R2, (-kWordSize * 30))); 1072 __ ldrsb(R0, Address(R2, (-kWordSize * 30)));
1073 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex)); 1073 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex));
1074 __ bx(LR); 1074 __ bx(LR);
1075 } 1075 }
1076 1076
1077 1077
1078 ASSEMBLER_TEST_RUN(Ldrsb, test) { 1078 ASSEMBLER_TEST_RUN(Ldrsb, test) {
1079 EXPECT(test != NULL); 1079 EXPECT(test != NULL);
1080 typedef int (*Tst)(); 1080 typedef int (*Tst)();
1081 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1081 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1082 } 1082 }
1083 1083
1084 1084
1085 ASSEMBLER_TEST_GENERATE(Ldrb, assembler) { 1085 ASSEMBLER_TEST_GENERATE(Ldrb, assembler) {
1086 __ mov(R1, ShifterOperand(0xFF)); 1086 __ mov(R1, Operand(0xFF));
1087 __ mov(R2, ShifterOperand(SP)); 1087 __ mov(R2, Operand(SP));
1088 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex)); 1088 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex));
1089 __ ldrb(R0, Address(R2, (-kWordSize * 30))); 1089 __ ldrb(R0, Address(R2, (-kWordSize * 30)));
1090 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex)); 1090 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex));
1091 __ bx(LR); 1091 __ bx(LR);
1092 } 1092 }
1093 1093
1094 1094
1095 ASSEMBLER_TEST_RUN(Ldrb, test) { 1095 ASSEMBLER_TEST_RUN(Ldrb, test) {
1096 EXPECT(test != NULL); 1096 EXPECT(test != NULL);
1097 typedef int (*Tst)(); 1097 typedef int (*Tst)();
1098 EXPECT_EQ(0xff, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1098 EXPECT_EQ(0xff, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1099 } 1099 }
1100 1100
1101 1101
1102 ASSEMBLER_TEST_GENERATE(Ldrsh, assembler) { 1102 ASSEMBLER_TEST_GENERATE(Ldrsh, assembler) {
1103 __ mov(R1, ShifterOperand(0xFF)); 1103 __ mov(R1, Operand(0xFF));
1104 __ mov(R2, ShifterOperand(SP)); 1104 __ mov(R2, Operand(SP));
1105 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex)); 1105 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex));
1106 __ ldrsh(R0, Address(R2, (-kWordSize * 30))); 1106 __ ldrsh(R0, Address(R2, (-kWordSize * 30)));
1107 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex)); 1107 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex));
1108 __ bx(LR); 1108 __ bx(LR);
1109 } 1109 }
1110 1110
1111 1111
1112 ASSEMBLER_TEST_RUN(Ldrsh, test) { 1112 ASSEMBLER_TEST_RUN(Ldrsh, test) {
1113 EXPECT(test != NULL); 1113 EXPECT(test != NULL);
1114 typedef int (*Tst)(); 1114 typedef int (*Tst)();
1115 EXPECT_EQ(0xff, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1115 EXPECT_EQ(0xff, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1116 } 1116 }
1117 1117
1118 1118
1119 ASSEMBLER_TEST_GENERATE(Ldrh1, assembler) { 1119 ASSEMBLER_TEST_GENERATE(Ldrh1, assembler) {
1120 __ mov(R1, ShifterOperand(0xFF)); 1120 __ mov(R1, Operand(0xFF));
1121 __ mov(R2, ShifterOperand(SP)); 1121 __ mov(R2, Operand(SP));
1122 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex)); 1122 __ str(R1, Address(SP, (-kWordSize * 30), Address::PreIndex));
1123 __ ldrh(R0, Address(R2, (-kWordSize * 30))); 1123 __ ldrh(R0, Address(R2, (-kWordSize * 30)));
1124 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex)); 1124 __ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex));
1125 __ bx(LR); 1125 __ bx(LR);
1126 } 1126 }
1127 1127
1128 1128
1129 ASSEMBLER_TEST_RUN(Ldrh1, test) { 1129 ASSEMBLER_TEST_RUN(Ldrh1, test) {
1130 EXPECT(test != NULL); 1130 EXPECT(test != NULL);
1131 typedef int (*Tst)(); 1131 typedef int (*Tst)();
1132 EXPECT_EQ(0xff, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1132 EXPECT_EQ(0xff, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1133 } 1133 }
1134 1134
1135 1135
1136 ASSEMBLER_TEST_GENERATE(Ldrd, assembler) { 1136 ASSEMBLER_TEST_GENERATE(Ldrd, assembler) {
1137 __ mov(IP, ShifterOperand(SP)); 1137 __ mov(IP, Operand(SP));
1138 __ strd(R2, Address(SP, (-kWordSize * 30), Address::PreIndex)); 1138 __ strd(R2, Address(SP, (-kWordSize * 30), Address::PreIndex));
1139 __ strd(R0, Address(IP, (-kWordSize * 28))); 1139 __ strd(R0, Address(IP, (-kWordSize * 28)));
1140 __ ldrd(R2, Address(IP, (-kWordSize * 28))); 1140 __ ldrd(R2, Address(IP, (-kWordSize * 28)));
1141 __ ldrd(R0, Address(SP, (kWordSize * 30), Address::PostIndex)); 1141 __ ldrd(R0, Address(SP, (kWordSize * 30), Address::PostIndex));
1142 __ sub(R0, R0, ShifterOperand(R2)); 1142 __ sub(R0, R0, Operand(R2));
1143 __ add(R1, R1, ShifterOperand(R3)); 1143 __ add(R1, R1, Operand(R3));
1144 __ bx(LR); 1144 __ bx(LR);
1145 } 1145 }
1146 1146
1147 1147
1148 ASSEMBLER_TEST_RUN(Ldrd, test) { 1148 ASSEMBLER_TEST_RUN(Ldrd, test) {
1149 EXPECT(test != NULL); 1149 EXPECT(test != NULL);
1150 typedef int64_t (*Tst)(int64_t r0r1, int64_t r2r3); 1150 typedef int64_t (*Tst)(int64_t r0r1, int64_t r2r3);
1151 EXPECT_EQ(0x0000444400002222LL, EXECUTE_TEST_CODE_INT64_LL( 1151 EXPECT_EQ(0x0000444400002222LL, EXECUTE_TEST_CODE_INT64_LL(
1152 Tst, test->entry(), 0x0000111100000000LL, 0x0000333300002222LL)); 1152 Tst, test->entry(), 0x0000111100000000LL, 0x0000333300002222LL));
1153 } 1153 }
1154 1154
1155 1155
1156 ASSEMBLER_TEST_GENERATE(Ldm_stm_da, assembler) { 1156 ASSEMBLER_TEST_GENERATE(Ldm_stm_da, assembler) {
1157 __ mov(R0, ShifterOperand(1)); 1157 __ mov(R0, Operand(1));
1158 __ mov(R1, ShifterOperand(7)); 1158 __ mov(R1, Operand(7));
1159 __ mov(R2, ShifterOperand(11)); 1159 __ mov(R2, Operand(11));
1160 __ mov(R3, ShifterOperand(31)); 1160 __ mov(R3, Operand(31));
1161 __ Push(R5); // We use R5 as accumulator. 1161 __ Push(R5); // We use R5 as accumulator.
1162 __ Push(R5); 1162 __ Push(R5);
1163 __ Push(R5); 1163 __ Push(R5);
1164 __ Push(R5); 1164 __ Push(R5);
1165 __ Push(R5); 1165 __ Push(R5);
1166 __ Push(R0); // Make room, so we can decrement after. 1166 __ Push(R0); // Make room, so we can decrement after.
1167 __ stm(DA_W, SP, (1 << R0 | 1 << R1 | 1 << R2 | 1 << R3)); 1167 __ stm(DA_W, SP, (1 << R0 | 1 << R1 | 1 << R2 | 1 << R3));
1168 __ str(R2, Address(SP)); // Should be a free slot. 1168 __ str(R2, Address(SP)); // Should be a free slot.
1169 __ ldr(R5, Address(SP, 1 * kWordSize)); // R0. R5 = +1. 1169 __ ldr(R5, Address(SP, 1 * kWordSize)); // R0. R5 = +1.
1170 __ ldr(IP, Address(SP, 2 * kWordSize)); // R1. 1170 __ ldr(IP, Address(SP, 2 * kWordSize)); // R1.
1171 __ sub(R5, R5, ShifterOperand(IP)); // -R1. R5 = -6. 1171 __ sub(R5, R5, Operand(IP)); // -R1. R5 = -6.
1172 __ ldr(IP, Address(SP, 3 * kWordSize)); // R2. 1172 __ ldr(IP, Address(SP, 3 * kWordSize)); // R2.
1173 __ add(R5, R5, ShifterOperand(IP)); // +R2. R5 = +5. 1173 __ add(R5, R5, Operand(IP)); // +R2. R5 = +5.
1174 __ ldr(IP, Address(SP, 4 * kWordSize)); // R3. 1174 __ ldr(IP, Address(SP, 4 * kWordSize)); // R3.
1175 __ sub(R5, R5, ShifterOperand(IP)); // -R3. R5 = -26. 1175 __ sub(R5, R5, Operand(IP)); // -R3. R5 = -26.
1176 __ ldm(IB_W, SP, (1 << R0 | 1 << R1 | 1 << R2 | 1 << R3)); 1176 __ ldm(IB_W, SP, (1 << R0 | 1 << R1 | 1 << R2 | 1 << R3));
1177 // Same operations again. But this time from the restore registers. 1177 // Same operations again. But this time from the restore registers.
1178 __ add(R5, R5, ShifterOperand(R0)); 1178 __ add(R5, R5, Operand(R0));
1179 __ sub(R5, R5, ShifterOperand(R1)); 1179 __ sub(R5, R5, Operand(R1));
1180 __ add(R5, R5, ShifterOperand(R2)); 1180 __ add(R5, R5, Operand(R2));
1181 __ sub(R0, R5, ShifterOperand(R3)); // R0 = result = -52. 1181 __ sub(R0, R5, Operand(R3)); // R0 = result = -52.
1182 __ Pop(R1); // Remove storage slot. 1182 __ Pop(R1); // Remove storage slot.
1183 __ Pop(R5); // Restore R5. 1183 __ Pop(R5); // Restore R5.
1184 __ Pop(R5); // Restore R5. 1184 __ Pop(R5); // Restore R5.
1185 __ Pop(R5); // Restore R5. 1185 __ Pop(R5); // Restore R5.
1186 __ Pop(R5); // Restore R5. 1186 __ Pop(R5); // Restore R5.
1187 __ Pop(R5); // Restore R5. 1187 __ Pop(R5); // Restore R5.
1188 __ bx(LR); 1188 __ bx(LR);
1189 } 1189 }
1190 1190
1191 1191
1192 ASSEMBLER_TEST_RUN(Ldm_stm_da, test) { 1192 ASSEMBLER_TEST_RUN(Ldm_stm_da, test) {
1193 EXPECT(test != NULL); 1193 EXPECT(test != NULL);
1194 typedef int (*Tst)(); 1194 typedef int (*Tst)();
1195 EXPECT_EQ(-52, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1195 EXPECT_EQ(-52, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1196 } 1196 }
1197 1197
1198 1198
1199 ASSEMBLER_TEST_GENERATE(AddressShiftStrLSL1NegOffset, assembler) { 1199 ASSEMBLER_TEST_GENERATE(AddressShiftStrLSL1NegOffset, assembler) {
1200 __ mov(R2, ShifterOperand(42)); 1200 __ mov(R2, Operand(42));
1201 __ mov(R1, ShifterOperand(kWordSize)); 1201 __ mov(R1, Operand(kWordSize));
1202 __ str(R2, Address(SP, R1, LSL, 1, Address::NegOffset)); 1202 __ str(R2, Address(SP, R1, LSL, 1, Address::NegOffset));
1203 __ ldr(R0, Address(SP, (-kWordSize * 2), Address::Offset)); 1203 __ ldr(R0, Address(SP, (-kWordSize * 2), Address::Offset));
1204 __ bx(LR); 1204 __ bx(LR);
1205 } 1205 }
1206 1206
1207 1207
1208 ASSEMBLER_TEST_RUN(AddressShiftStrLSL1NegOffset, test) { 1208 ASSEMBLER_TEST_RUN(AddressShiftStrLSL1NegOffset, test) {
1209 EXPECT(test != NULL); 1209 EXPECT(test != NULL);
1210 typedef int (*Tst)(); 1210 typedef int (*Tst)();
1211 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1211 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1212 } 1212 }
1213 1213
1214 1214
1215 ASSEMBLER_TEST_GENERATE(AddressShiftLdrLSL5NegOffset, assembler) { 1215 ASSEMBLER_TEST_GENERATE(AddressShiftLdrLSL5NegOffset, assembler) {
1216 __ mov(R2, ShifterOperand(42)); 1216 __ mov(R2, Operand(42));
1217 __ mov(R1, ShifterOperand(kWordSize)); 1217 __ mov(R1, Operand(kWordSize));
1218 __ str(R2, Address(SP, (-kWordSize * 32), Address::Offset)); 1218 __ str(R2, Address(SP, (-kWordSize * 32), Address::Offset));
1219 __ ldr(R0, Address(SP, R1, LSL, 5, Address::NegOffset)); 1219 __ ldr(R0, Address(SP, R1, LSL, 5, Address::NegOffset));
1220 __ bx(LR); 1220 __ bx(LR);
1221 } 1221 }
1222 1222
1223 1223
1224 ASSEMBLER_TEST_RUN(AddressShiftLdrLSL5NegOffset, test) { 1224 ASSEMBLER_TEST_RUN(AddressShiftLdrLSL5NegOffset, test) {
1225 EXPECT(test != NULL); 1225 EXPECT(test != NULL);
1226 typedef int (*Tst)(); 1226 typedef int (*Tst)();
1227 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1227 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1228 } 1228 }
1229 1229
1230 1230
1231 ASSEMBLER_TEST_GENERATE(AddressShiftStrLRS1NegOffset, assembler) { 1231 ASSEMBLER_TEST_GENERATE(AddressShiftStrLRS1NegOffset, assembler) {
1232 __ mov(R2, ShifterOperand(42)); 1232 __ mov(R2, Operand(42));
1233 __ mov(R1, ShifterOperand(kWordSize * 2)); 1233 __ mov(R1, Operand(kWordSize * 2));
1234 __ str(R2, Address(SP, R1, LSR, 1, Address::NegOffset)); 1234 __ str(R2, Address(SP, R1, LSR, 1, Address::NegOffset));
1235 __ ldr(R0, Address(SP, -kWordSize, Address::Offset)); 1235 __ ldr(R0, Address(SP, -kWordSize, Address::Offset));
1236 __ bx(LR); 1236 __ bx(LR);
1237 } 1237 }
1238 1238
1239 1239
1240 ASSEMBLER_TEST_RUN(AddressShiftStrLRS1NegOffset, test) { 1240 ASSEMBLER_TEST_RUN(AddressShiftStrLRS1NegOffset, test) {
1241 EXPECT(test != NULL); 1241 EXPECT(test != NULL);
1242 typedef int (*Tst)(); 1242 typedef int (*Tst)();
1243 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1243 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1244 } 1244 }
1245 1245
1246 1246
1247 ASSEMBLER_TEST_GENERATE(AddressShiftLdrLRS1NegOffset, assembler) { 1247 ASSEMBLER_TEST_GENERATE(AddressShiftLdrLRS1NegOffset, assembler) {
1248 __ mov(R2, ShifterOperand(42)); 1248 __ mov(R2, Operand(42));
1249 __ mov(R1, ShifterOperand(kWordSize * 2)); 1249 __ mov(R1, Operand(kWordSize * 2));
1250 __ str(R2, Address(SP, -kWordSize, Address::Offset)); 1250 __ str(R2, Address(SP, -kWordSize, Address::Offset));
1251 __ ldr(R0, Address(SP, R1, LSR, 1, Address::NegOffset)); 1251 __ ldr(R0, Address(SP, R1, LSR, 1, Address::NegOffset));
1252 __ bx(LR); 1252 __ bx(LR);
1253 } 1253 }
1254 1254
1255 1255
1256 ASSEMBLER_TEST_RUN(AddressShiftLdrLRS1NegOffset, test) { 1256 ASSEMBLER_TEST_RUN(AddressShiftLdrLRS1NegOffset, test) {
1257 EXPECT(test != NULL); 1257 EXPECT(test != NULL);
1258 typedef int (*Tst)(); 1258 typedef int (*Tst)();
1259 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1259 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1260 } 1260 }
1261 1261
1262 1262
1263 ASSEMBLER_TEST_GENERATE(AddressShiftStrLSLNegPreIndex, assembler) { 1263 ASSEMBLER_TEST_GENERATE(AddressShiftStrLSLNegPreIndex, assembler) {
1264 __ mov(R2, ShifterOperand(42)); 1264 __ mov(R2, Operand(42));
1265 __ mov(R1, ShifterOperand(kWordSize)); 1265 __ mov(R1, Operand(kWordSize));
1266 __ mov(R3, ShifterOperand(SP)); 1266 __ mov(R3, Operand(SP));
1267 __ str(R2, Address(SP, R1, LSL, 5, Address::NegPreIndex)); 1267 __ str(R2, Address(SP, R1, LSL, 5, Address::NegPreIndex));
1268 __ ldr(R0, Address(R3, (-kWordSize * 32), Address::Offset)); 1268 __ ldr(R0, Address(R3, (-kWordSize * 32), Address::Offset));
1269 __ mov(SP, ShifterOperand(R3)); 1269 __ mov(SP, Operand(R3));
1270 __ bx(LR); 1270 __ bx(LR);
1271 } 1271 }
1272 1272
1273 1273
1274 ASSEMBLER_TEST_RUN(AddressShiftStrLSLNegPreIndex, test) { 1274 ASSEMBLER_TEST_RUN(AddressShiftStrLSLNegPreIndex, test) {
1275 EXPECT(test != NULL); 1275 EXPECT(test != NULL);
1276 typedef int (*Tst)(); 1276 typedef int (*Tst)();
1277 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1277 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1278 } 1278 }
1279 1279
1280 1280
1281 ASSEMBLER_TEST_GENERATE(AddressShiftLdrLSLNegPreIndex, assembler) { 1281 ASSEMBLER_TEST_GENERATE(AddressShiftLdrLSLNegPreIndex, assembler) {
1282 __ mov(R2, ShifterOperand(42)); 1282 __ mov(R2, Operand(42));
1283 __ mov(R1, ShifterOperand(kWordSize)); 1283 __ mov(R1, Operand(kWordSize));
1284 __ str(R2, Address(SP, (-kWordSize * 32), Address::PreIndex)); 1284 __ str(R2, Address(SP, (-kWordSize * 32), Address::PreIndex));
1285 __ ldr(R0, Address(SP, R1, LSL, 5, Address::PostIndex)); 1285 __ ldr(R0, Address(SP, R1, LSL, 5, Address::PostIndex));
1286 __ bx(LR); 1286 __ bx(LR);
1287 } 1287 }
1288 1288
1289 1289
1290 ASSEMBLER_TEST_RUN(AddressShiftLdrLSLNegPreIndex, test) { 1290 ASSEMBLER_TEST_RUN(AddressShiftLdrLSLNegPreIndex, test) {
1291 EXPECT(test != NULL); 1291 EXPECT(test != NULL);
1292 typedef int (*Tst)(); 1292 typedef int (*Tst)();
1293 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1293 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
(...skipping 10 matching lines...) Expand all
1304 __ LoadDImmediate(D4, 4.0, R0); 1304 __ LoadDImmediate(D4, 4.0, R0);
1305 __ vstmd(DB_W, SP, D0, 5); // Push D0 - D4 onto the stack, dec SP 1305 __ vstmd(DB_W, SP, D0, 5); // Push D0 - D4 onto the stack, dec SP
1306 __ LoadDImmediate(D0, 0.0, R0); 1306 __ LoadDImmediate(D0, 0.0, R0);
1307 __ LoadDImmediate(D1, 0.0, R0); 1307 __ LoadDImmediate(D1, 0.0, R0);
1308 __ LoadDImmediate(D2, 0.0, R0); 1308 __ LoadDImmediate(D2, 0.0, R0);
1309 __ LoadDImmediate(D3, 0.0, R0); 1309 __ LoadDImmediate(D3, 0.0, R0);
1310 __ LoadDImmediate(D4, 0.0, R0); 1310 __ LoadDImmediate(D4, 0.0, R0);
1311 __ vldmd(IA_W, SP, D0, 5); // Pop stack into D0 - D4, inc SP 1311 __ vldmd(IA_W, SP, D0, 5); // Pop stack into D0 - D4, inc SP
1312 1312
1313 // Load success value into R0 1313 // Load success value into R0
1314 __ mov(R0, ShifterOperand(42)); 1314 __ mov(R0, Operand(42));
1315 1315
1316 // Check that 4.0 is back in D4 1316 // Check that 4.0 is back in D4
1317 __ LoadDImmediate(D5, 4.0, R1); 1317 __ LoadDImmediate(D5, 4.0, R1);
1318 __ vcmpd(D4, D5); 1318 __ vcmpd(D4, D5);
1319 __ vmstat(); 1319 __ vmstat();
1320 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1320 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1321 1321
1322 // Check that 3.0 is back in D3 1322 // Check that 3.0 is back in D3
1323 __ LoadDImmediate(D5, 3.0, R1); 1323 __ LoadDImmediate(D5, 3.0, R1);
1324 __ vcmpd(D3, D5); 1324 __ vcmpd(D3, D5);
1325 __ vmstat(); 1325 __ vmstat();
1326 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1326 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1327 1327
1328 1328
1329 // Check that 2.0 is back in D2 1329 // Check that 2.0 is back in D2
1330 __ LoadDImmediate(D5, 2.0, R1); 1330 __ LoadDImmediate(D5, 2.0, R1);
1331 __ vcmpd(D2, D5); 1331 __ vcmpd(D2, D5);
1332 __ vmstat(); 1332 __ vmstat();
1333 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1333 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1334 1334
1335 // Check that 1.0 is back in D1 1335 // Check that 1.0 is back in D1
1336 __ LoadDImmediate(D5, 1.0, R1); 1336 __ LoadDImmediate(D5, 1.0, R1);
1337 __ vcmpd(D1, D5); 1337 __ vcmpd(D1, D5);
1338 __ vmstat(); 1338 __ vmstat();
1339 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1339 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1340 } else { 1340 } else {
1341 __ LoadImmediate(R0, 42); 1341 __ LoadImmediate(R0, 42);
1342 } 1342 }
1343 __ bx(LR); 1343 __ bx(LR);
1344 } 1344 }
1345 1345
1346 1346
1347 ASSEMBLER_TEST_RUN(VstmdVldmd, test) { 1347 ASSEMBLER_TEST_RUN(VstmdVldmd, test) {
1348 EXPECT(test != NULL); 1348 EXPECT(test != NULL);
1349 typedef int (*Tst)(); 1349 typedef int (*Tst)();
(...skipping 11 matching lines...) Expand all
1361 __ LoadSImmediate(S4, 4.0); 1361 __ LoadSImmediate(S4, 4.0);
1362 __ vstms(DB_W, SP, S0, S4); // Push S0 - S4 onto the stack, dec SP 1362 __ vstms(DB_W, SP, S0, S4); // Push S0 - S4 onto the stack, dec SP
1363 __ LoadSImmediate(S0, 0.0); 1363 __ LoadSImmediate(S0, 0.0);
1364 __ LoadSImmediate(S1, 0.0); 1364 __ LoadSImmediate(S1, 0.0);
1365 __ LoadSImmediate(S2, 0.0); 1365 __ LoadSImmediate(S2, 0.0);
1366 __ LoadSImmediate(S3, 0.0); 1366 __ LoadSImmediate(S3, 0.0);
1367 __ LoadSImmediate(S4, 0.0); 1367 __ LoadSImmediate(S4, 0.0);
1368 __ vldms(IA_W, SP, S0, S4); // Pop stack into S0 - S4, inc SP 1368 __ vldms(IA_W, SP, S0, S4); // Pop stack into S0 - S4, inc SP
1369 1369
1370 // Load success value into R0 1370 // Load success value into R0
1371 __ mov(R0, ShifterOperand(42)); 1371 __ mov(R0, Operand(42));
1372 1372
1373 // Check that 4.0 is back in S4 1373 // Check that 4.0 is back in S4
1374 __ LoadSImmediate(S5, 4.0); 1374 __ LoadSImmediate(S5, 4.0);
1375 __ vcmps(S4, S5); 1375 __ vcmps(S4, S5);
1376 __ vmstat(); 1376 __ vmstat();
1377 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1377 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1378 1378
1379 // Check that 3.0 is back in S3 1379 // Check that 3.0 is back in S3
1380 __ LoadSImmediate(S5, 3.0); 1380 __ LoadSImmediate(S5, 3.0);
1381 __ vcmps(S3, S5); 1381 __ vcmps(S3, S5);
1382 __ vmstat(); 1382 __ vmstat();
1383 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1383 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1384 1384
1385 // Check that 2.0 is back in S2 1385 // Check that 2.0 is back in S2
1386 __ LoadSImmediate(S5, 2.0); 1386 __ LoadSImmediate(S5, 2.0);
1387 __ vcmps(S2, S5); 1387 __ vcmps(S2, S5);
1388 __ vmstat(); 1388 __ vmstat();
1389 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1389 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1390 1390
1391 // Check that 1.0 is back in S1 1391 // Check that 1.0 is back in S1
1392 __ LoadSImmediate(S5, 1.0); 1392 __ LoadSImmediate(S5, 1.0);
1393 __ vcmps(S1, S5); 1393 __ vcmps(S1, S5);
1394 __ vmstat(); 1394 __ vmstat();
1395 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1395 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1396 } else { 1396 } else {
1397 __ LoadImmediate(R0, 42); 1397 __ LoadImmediate(R0, 42);
1398 } 1398 }
1399 __ bx(LR); 1399 __ bx(LR);
1400 } 1400 }
1401 1401
1402 1402
1403 ASSEMBLER_TEST_RUN(VstmsVldms, test) { 1403 ASSEMBLER_TEST_RUN(VstmsVldms, test) {
1404 EXPECT(test != NULL); 1404 EXPECT(test != NULL);
1405 typedef int (*Tst)(); 1405 typedef int (*Tst)();
1406 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1406 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1407 } 1407 }
1408 1408
1409 1409
1410 // Make sure we can start somewhere other than D0 1410 // Make sure we can start somewhere other than D0
1411 ASSEMBLER_TEST_GENERATE(VstmdVldmd1, assembler) { 1411 ASSEMBLER_TEST_GENERATE(VstmdVldmd1, assembler) {
1412 if (TargetCPUFeatures::vfp_supported()) { 1412 if (TargetCPUFeatures::vfp_supported()) {
1413 __ LoadDImmediate(D1, 1.0, R0); 1413 __ LoadDImmediate(D1, 1.0, R0);
1414 __ LoadDImmediate(D2, 2.0, R0); 1414 __ LoadDImmediate(D2, 2.0, R0);
1415 __ LoadDImmediate(D3, 3.0, R0); 1415 __ LoadDImmediate(D3, 3.0, R0);
1416 __ LoadDImmediate(D4, 4.0, R0); 1416 __ LoadDImmediate(D4, 4.0, R0);
1417 __ vstmd(DB_W, SP, D1, 4); // Push D1 - D4 onto the stack, dec SP 1417 __ vstmd(DB_W, SP, D1, 4); // Push D1 - D4 onto the stack, dec SP
1418 __ LoadDImmediate(D1, 0.0, R0); 1418 __ LoadDImmediate(D1, 0.0, R0);
1419 __ LoadDImmediate(D2, 0.0, R0); 1419 __ LoadDImmediate(D2, 0.0, R0);
1420 __ LoadDImmediate(D3, 0.0, R0); 1420 __ LoadDImmediate(D3, 0.0, R0);
1421 __ LoadDImmediate(D4, 0.0, R0); 1421 __ LoadDImmediate(D4, 0.0, R0);
1422 __ vldmd(IA_W, SP, D1, 4); // Pop stack into D1 - D4, inc SP 1422 __ vldmd(IA_W, SP, D1, 4); // Pop stack into D1 - D4, inc SP
1423 1423
1424 // Load success value into R0 1424 // Load success value into R0
1425 __ mov(R0, ShifterOperand(42)); 1425 __ mov(R0, Operand(42));
1426 1426
1427 // Check that 4.0 is back in D4 1427 // Check that 4.0 is back in D4
1428 __ LoadDImmediate(D5, 4.0, R1); 1428 __ LoadDImmediate(D5, 4.0, R1);
1429 __ vcmpd(D4, D5); 1429 __ vcmpd(D4, D5);
1430 __ vmstat(); 1430 __ vmstat();
1431 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1431 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1432 1432
1433 // Check that 3.0 is back in D3 1433 // Check that 3.0 is back in D3
1434 __ LoadDImmediate(D5, 3.0, R1); 1434 __ LoadDImmediate(D5, 3.0, R1);
1435 __ vcmpd(D3, D5); 1435 __ vcmpd(D3, D5);
1436 __ vmstat(); 1436 __ vmstat();
1437 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1437 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1438 1438
1439 1439
1440 // Check that 2.0 is back in D2 1440 // Check that 2.0 is back in D2
1441 __ LoadDImmediate(D5, 2.0, R1); 1441 __ LoadDImmediate(D5, 2.0, R1);
1442 __ vcmpd(D2, D5); 1442 __ vcmpd(D2, D5);
1443 __ vmstat(); 1443 __ vmstat();
1444 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1444 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1445 1445
1446 // Check that 1.0 is back in D1 1446 // Check that 1.0 is back in D1
1447 __ LoadDImmediate(D5, 1.0, R1); 1447 __ LoadDImmediate(D5, 1.0, R1);
1448 __ vcmpd(D1, D5); 1448 __ vcmpd(D1, D5);
1449 __ vmstat(); 1449 __ vmstat();
1450 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1450 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1451 } else { 1451 } else {
1452 __ LoadImmediate(R0, 42); 1452 __ LoadImmediate(R0, 42);
1453 } 1453 }
1454 __ bx(LR); 1454 __ bx(LR);
1455 } 1455 }
1456 1456
1457 1457
1458 ASSEMBLER_TEST_RUN(VstmdVldmd1, test) { 1458 ASSEMBLER_TEST_RUN(VstmdVldmd1, test) {
1459 EXPECT(test != NULL); 1459 EXPECT(test != NULL);
1460 typedef int (*Tst)(); 1460 typedef int (*Tst)();
1461 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1461 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1462 } 1462 }
1463 1463
1464 1464
1465 // Make sure we can start somewhere other than S0 1465 // Make sure we can start somewhere other than S0
1466 ASSEMBLER_TEST_GENERATE(VstmsVldms1, assembler) { 1466 ASSEMBLER_TEST_GENERATE(VstmsVldms1, assembler) {
1467 if (TargetCPUFeatures::vfp_supported()) { 1467 if (TargetCPUFeatures::vfp_supported()) {
1468 __ LoadSImmediate(S1, 1.0); 1468 __ LoadSImmediate(S1, 1.0);
1469 __ LoadSImmediate(S2, 2.0); 1469 __ LoadSImmediate(S2, 2.0);
1470 __ LoadSImmediate(S3, 3.0); 1470 __ LoadSImmediate(S3, 3.0);
1471 __ LoadSImmediate(S4, 4.0); 1471 __ LoadSImmediate(S4, 4.0);
1472 __ vstms(DB_W, SP, S1, S4); // Push S0 - S4 onto the stack, dec SP 1472 __ vstms(DB_W, SP, S1, S4); // Push S0 - S4 onto the stack, dec SP
1473 __ LoadSImmediate(S1, 0.0); 1473 __ LoadSImmediate(S1, 0.0);
1474 __ LoadSImmediate(S2, 0.0); 1474 __ LoadSImmediate(S2, 0.0);
1475 __ LoadSImmediate(S3, 0.0); 1475 __ LoadSImmediate(S3, 0.0);
1476 __ LoadSImmediate(S4, 0.0); 1476 __ LoadSImmediate(S4, 0.0);
1477 __ vldms(IA_W, SP, S1, S4); // Pop stack into S0 - S4, inc SP 1477 __ vldms(IA_W, SP, S1, S4); // Pop stack into S0 - S4, inc SP
1478 1478
1479 // Load success value into R0 1479 // Load success value into R0
1480 __ mov(R0, ShifterOperand(42)); 1480 __ mov(R0, Operand(42));
1481 1481
1482 // Check that 4.0 is back in S4 1482 // Check that 4.0 is back in S4
1483 __ LoadSImmediate(S5, 4.0); 1483 __ LoadSImmediate(S5, 4.0);
1484 __ vcmps(S4, S5); 1484 __ vcmps(S4, S5);
1485 __ vmstat(); 1485 __ vmstat();
1486 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1486 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1487 1487
1488 // Check that 3.0 is back in S3 1488 // Check that 3.0 is back in S3
1489 __ LoadSImmediate(S5, 3.0); 1489 __ LoadSImmediate(S5, 3.0);
1490 __ vcmps(S3, S5); 1490 __ vcmps(S3, S5);
1491 __ vmstat(); 1491 __ vmstat();
1492 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1492 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1493 1493
1494 // Check that 2.0 is back in S2 1494 // Check that 2.0 is back in S2
1495 __ LoadSImmediate(S5, 2.0); 1495 __ LoadSImmediate(S5, 2.0);
1496 __ vcmps(S2, S5); 1496 __ vcmps(S2, S5);
1497 __ vmstat(); 1497 __ vmstat();
1498 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1498 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1499 1499
1500 // Check that 1.0 is back in S1 1500 // Check that 1.0 is back in S1
1501 __ LoadSImmediate(S5, 1.0); 1501 __ LoadSImmediate(S5, 1.0);
1502 __ vcmps(S1, S5); 1502 __ vcmps(S1, S5);
1503 __ vmstat(); 1503 __ vmstat();
1504 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1504 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1505 } else { 1505 } else {
1506 __ LoadImmediate(R0, 42); 1506 __ LoadImmediate(R0, 42);
1507 } 1507 }
1508 __ bx(LR); 1508 __ bx(LR);
1509 } 1509 }
1510 1510
1511 1511
1512 ASSEMBLER_TEST_RUN(VstmsVldms1, test) { 1512 ASSEMBLER_TEST_RUN(VstmsVldms1, test) {
1513 EXPECT(test != NULL); 1513 EXPECT(test != NULL);
1514 typedef int (*Tst)(); 1514 typedef int (*Tst)();
(...skipping 10 matching lines...) Expand all
1525 __ LoadDImmediate(D0, 0.0, R0); 1525 __ LoadDImmediate(D0, 0.0, R0);
1526 __ LoadDImmediate(D1, 1.0, R0); 1526 __ LoadDImmediate(D1, 1.0, R0);
1527 __ LoadDImmediate(D2, 2.0, R0); 1527 __ LoadDImmediate(D2, 2.0, R0);
1528 __ LoadDImmediate(D3, 3.0, R0); 1528 __ LoadDImmediate(D3, 3.0, R0);
1529 __ LoadDImmediate(D4, 4.0, R0); 1529 __ LoadDImmediate(D4, 4.0, R0);
1530 __ LoadDImmediate(D5, 5.0, R0); 1530 __ LoadDImmediate(D5, 5.0, R0);
1531 __ vstmd(DB_W, SP, D0, 5); // Push D0 - D4 onto the stack, dec SP 1531 __ vstmd(DB_W, SP, D0, 5); // Push D0 - D4 onto the stack, dec SP
1532 __ vldmd(IA_W, SP, D5, 5); // Pop stack into D5 - D9, inc SP 1532 __ vldmd(IA_W, SP, D5, 5); // Pop stack into D5 - D9, inc SP
1533 1533
1534 // Load success value into R0 1534 // Load success value into R0
1535 __ mov(R0, ShifterOperand(42)); 1535 __ mov(R0, Operand(42));
1536 1536
1537 // Check that 4.0 is in D9 1537 // Check that 4.0 is in D9
1538 __ LoadDImmediate(D10, 4.0, R1); 1538 __ LoadDImmediate(D10, 4.0, R1);
1539 __ vcmpd(D9, D10); 1539 __ vcmpd(D9, D10);
1540 __ vmstat(); 1540 __ vmstat();
1541 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1541 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1542 1542
1543 // Check that 3.0 is in D8 1543 // Check that 3.0 is in D8
1544 __ LoadDImmediate(D10, 3.0, R1); 1544 __ LoadDImmediate(D10, 3.0, R1);
1545 __ vcmpd(D8, D10); 1545 __ vcmpd(D8, D10);
1546 __ vmstat(); 1546 __ vmstat();
1547 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1547 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1548 1548
1549 1549
1550 // Check that 2.0 is in D7 1550 // Check that 2.0 is in D7
1551 __ LoadDImmediate(D10, 2.0, R1); 1551 __ LoadDImmediate(D10, 2.0, R1);
1552 __ vcmpd(D7, D10); 1552 __ vcmpd(D7, D10);
1553 __ vmstat(); 1553 __ vmstat();
1554 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1554 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1555 1555
1556 // Check that 1.0 is in D6 1556 // Check that 1.0 is in D6
1557 __ LoadDImmediate(D10, 1.0, R1); 1557 __ LoadDImmediate(D10, 1.0, R1);
1558 __ vcmpd(D6, D10); 1558 __ vcmpd(D6, D10);
1559 __ vmstat(); 1559 __ vmstat();
1560 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1560 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1561 1561
1562 // Check that 0.0 is in D5 1562 // Check that 0.0 is in D5
1563 __ LoadDImmediate(D10, 0.0, R1); 1563 __ LoadDImmediate(D10, 0.0, R1);
1564 __ vcmpd(D5, D10); 1564 __ vcmpd(D5, D10);
1565 __ vmstat(); 1565 __ vmstat();
1566 __ mov(R0, ShifterOperand(0), NE); // Put failure into R0 if NE 1566 __ mov(R0, Operand(0), NE); // Put failure into R0 if NE
1567 1567
1568 // Restore used callee-saved FPU registers. 1568 // Restore used callee-saved FPU registers.
1569 __ vldmd(IA_W, SP, D8, 3); 1569 __ vldmd(IA_W, SP, D8, 3);
1570 } else { 1570 } else {
1571 __ LoadImmediate(R0, 42); 1571 __ LoadImmediate(R0, 42);
1572 } 1572 }
1573 __ bx(LR); 1573 __ bx(LR);
1574 } 1574 }
1575 1575
1576 1576
(...skipping 10 matching lines...) Expand all
1587 __ LoadSImmediate(S0, 0.0); 1587 __ LoadSImmediate(S0, 0.0);
1588 __ LoadSImmediate(S1, 1.0); 1588 __ LoadSImmediate(S1, 1.0);
1589 __ LoadSImmediate(S2, 2.0); 1589 __ LoadSImmediate(S2, 2.0);
1590 __ LoadSImmediate(S3, 3.0); 1590 __ LoadSImmediate(S3, 3.0);
1591 __ LoadSImmediate(S4, 4.0); 1591 __ LoadSImmediate(S4, 4.0);
1592 __ LoadSImmediate(S5, 5.0); 1592 __ LoadSImmediate(S5, 5.0);
1593 __ vstms(DB_W, SP, S0, S4); // Push S0 - S4 onto the stack, dec SP 1593 __ vstms(DB_W, SP, S0, S4); // Push S0 - S4 onto the stack, dec SP
1594 __ vldms(IA_W, SP, S5, S9); // Pop stack into S5 - S9, inc SP 1594 __ vldms(IA_W, SP, S5, S9); // Pop stack into S5 - S9, inc SP
1595 1595
1596 // Load success value into R0 1596 // Load success value into R0
1597 __ mov(R0, ShifterOperand(42)); 1597 __ mov(R0, Operand(42));
1598 1598
1599 // Check that 4.0 is in S9 1599 // Check that 4.0 is in S9
1600 __ LoadSImmediate(S10, 4.0); 1600 __ LoadSImmediate(S10, 4.0);
1601 __ vcmps(S9, S10); 1601 __ vcmps(S9, S10);
1602 __ vmstat(); 1602 __ vmstat();
1603 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1603 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1604 1604
1605 // Check that 3.0 is in S8 1605 // Check that 3.0 is in S8
1606 __ LoadSImmediate(S10, 3.0); 1606 __ LoadSImmediate(S10, 3.0);
1607 __ vcmps(S8, S10); 1607 __ vcmps(S8, S10);
1608 __ vmstat(); 1608 __ vmstat();
1609 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1609 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1610 1610
1611 // Check that 2.0 is in S7 1611 // Check that 2.0 is in S7
1612 __ LoadSImmediate(S10, 2.0); 1612 __ LoadSImmediate(S10, 2.0);
1613 __ vcmps(S7, S10); 1613 __ vcmps(S7, S10);
1614 __ vmstat(); 1614 __ vmstat();
1615 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1615 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1616 1616
1617 // Check that 1.0 is back in S6 1617 // Check that 1.0 is back in S6
1618 __ LoadSImmediate(S10, 1.0); 1618 __ LoadSImmediate(S10, 1.0);
1619 __ vcmps(S6, S10); 1619 __ vcmps(S6, S10);
1620 __ vmstat(); 1620 __ vmstat();
1621 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1621 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1622 1622
1623 // Check that 0.0 is back in S5 1623 // Check that 0.0 is back in S5
1624 __ LoadSImmediate(S10, 0.0); 1624 __ LoadSImmediate(S10, 0.0);
1625 __ vcmps(S5, S10); 1625 __ vcmps(S5, S10);
1626 __ vmstat(); 1626 __ vmstat();
1627 __ mov(R0, ShifterOperand(0), NE); // Put failure value into R0 if NE 1627 __ mov(R0, Operand(0), NE); // Put failure value into R0 if NE
1628 } else { 1628 } else {
1629 __ LoadImmediate(R0, 42); 1629 __ LoadImmediate(R0, 42);
1630 } 1630 }
1631 __ bx(LR); 1631 __ bx(LR);
1632 } 1632 }
1633 1633
1634 1634
1635 ASSEMBLER_TEST_RUN(VstmsVldms_off, test) { 1635 ASSEMBLER_TEST_RUN(VstmsVldms_off, test) {
1636 EXPECT(test != NULL); 1636 EXPECT(test != NULL);
1637 typedef int (*Tst)(); 1637 typedef int (*Tst)();
1638 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1638 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1639 } 1639 }
1640 1640
1641 1641
1642 ASSEMBLER_TEST_GENERATE(Udiv, assembler) { 1642 ASSEMBLER_TEST_GENERATE(Udiv, assembler) {
1643 if (TargetCPUFeatures::integer_division_supported()) { 1643 if (TargetCPUFeatures::integer_division_supported()) {
1644 __ mov(R0, ShifterOperand(27)); 1644 __ mov(R0, Operand(27));
1645 __ mov(R1, ShifterOperand(9)); 1645 __ mov(R1, Operand(9));
1646 __ udiv(R2, R0, R1); 1646 __ udiv(R2, R0, R1);
1647 __ mov(R0, ShifterOperand(R2)); 1647 __ mov(R0, Operand(R2));
1648 } else { 1648 } else {
1649 __ mov(R0, ShifterOperand(3)); 1649 __ mov(R0, Operand(3));
1650 } 1650 }
1651 __ bx(LR); 1651 __ bx(LR);
1652 } 1652 }
1653 1653
1654 1654
1655 ASSEMBLER_TEST_RUN(Udiv, test) { 1655 ASSEMBLER_TEST_RUN(Udiv, test) {
1656 EXPECT(test != NULL); 1656 EXPECT(test != NULL);
1657 typedef int (*Tst)(); 1657 typedef int (*Tst)();
1658 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1658 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1659 } 1659 }
1660 1660
1661 1661
1662 ASSEMBLER_TEST_GENERATE(Sdiv, assembler) { 1662 ASSEMBLER_TEST_GENERATE(Sdiv, assembler) {
1663 if (TargetCPUFeatures::integer_division_supported()) { 1663 if (TargetCPUFeatures::integer_division_supported()) {
1664 __ mov(R0, ShifterOperand(27)); 1664 __ mov(R0, Operand(27));
1665 __ LoadImmediate(R1, -9); 1665 __ LoadImmediate(R1, -9);
1666 __ sdiv(R2, R0, R1); 1666 __ sdiv(R2, R0, R1);
1667 __ mov(R0, ShifterOperand(R2)); 1667 __ mov(R0, Operand(R2));
1668 } else { 1668 } else {
1669 __ LoadImmediate(R0, -3); 1669 __ LoadImmediate(R0, -3);
1670 } 1670 }
1671 __ bx(LR); 1671 __ bx(LR);
1672 } 1672 }
1673 1673
1674 1674
1675 ASSEMBLER_TEST_RUN(Sdiv, test) { 1675 ASSEMBLER_TEST_RUN(Sdiv, test) {
1676 EXPECT(test != NULL); 1676 EXPECT(test != NULL);
1677 typedef int (*Tst)(); 1677 typedef int (*Tst)();
1678 EXPECT_EQ(-3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1678 EXPECT_EQ(-3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1679 } 1679 }
1680 1680
1681 1681
1682 ASSEMBLER_TEST_GENERATE(Udiv_zero, assembler) { 1682 ASSEMBLER_TEST_GENERATE(Udiv_zero, assembler) {
1683 if (TargetCPUFeatures::integer_division_supported()) { 1683 if (TargetCPUFeatures::integer_division_supported()) {
1684 __ mov(R0, ShifterOperand(27)); 1684 __ mov(R0, Operand(27));
1685 __ mov(R1, ShifterOperand(0)); 1685 __ mov(R1, Operand(0));
1686 __ udiv(R2, R0, R1); 1686 __ udiv(R2, R0, R1);
1687 __ mov(R0, ShifterOperand(R2)); 1687 __ mov(R0, Operand(R2));
1688 } else { 1688 } else {
1689 __ LoadImmediate(R0, 0); 1689 __ LoadImmediate(R0, 0);
1690 } 1690 }
1691 __ bx(LR); 1691 __ bx(LR);
1692 } 1692 }
1693 1693
1694 1694
1695 ASSEMBLER_TEST_RUN(Udiv_zero, test) { 1695 ASSEMBLER_TEST_RUN(Udiv_zero, test) {
1696 EXPECT(test != NULL); 1696 EXPECT(test != NULL);
1697 typedef int (*Tst)(); 1697 typedef int (*Tst)();
1698 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1698 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1699 } 1699 }
1700 1700
1701 1701
1702 ASSEMBLER_TEST_GENERATE(Sdiv_zero, assembler) { 1702 ASSEMBLER_TEST_GENERATE(Sdiv_zero, assembler) {
1703 if (TargetCPUFeatures::integer_division_supported()) { 1703 if (TargetCPUFeatures::integer_division_supported()) {
1704 __ mov(R0, ShifterOperand(27)); 1704 __ mov(R0, Operand(27));
1705 __ mov(R1, ShifterOperand(0)); 1705 __ mov(R1, Operand(0));
1706 __ sdiv(R2, R0, R1); 1706 __ sdiv(R2, R0, R1);
1707 __ mov(R0, ShifterOperand(R2)); 1707 __ mov(R0, Operand(R2));
1708 } else { 1708 } else {
1709 __ LoadImmediate(R0, 0); 1709 __ LoadImmediate(R0, 0);
1710 } 1710 }
1711 __ bx(LR); 1711 __ bx(LR);
1712 } 1712 }
1713 1713
1714 1714
1715 ASSEMBLER_TEST_RUN(Sdiv_zero, test) { 1715 ASSEMBLER_TEST_RUN(Sdiv_zero, test) {
1716 EXPECT(test != NULL); 1716 EXPECT(test != NULL);
1717 typedef int (*Tst)(); 1717 typedef int (*Tst)();
1718 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1718 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1719 } 1719 }
1720 1720
1721 1721
1722 ASSEMBLER_TEST_GENERATE(Udiv_corner, assembler) { 1722 ASSEMBLER_TEST_GENERATE(Udiv_corner, assembler) {
1723 if (TargetCPUFeatures::integer_division_supported()) { 1723 if (TargetCPUFeatures::integer_division_supported()) {
1724 __ LoadImmediate(R0, 0x80000000); 1724 __ LoadImmediate(R0, 0x80000000);
1725 __ LoadImmediate(R1, 0xffffffff); 1725 __ LoadImmediate(R1, 0xffffffff);
1726 __ udiv(R2, R0, R1); 1726 __ udiv(R2, R0, R1);
1727 __ mov(R0, ShifterOperand(R2)); 1727 __ mov(R0, Operand(R2));
1728 } else { 1728 } else {
1729 __ LoadImmediate(R0, 0); 1729 __ LoadImmediate(R0, 0);
1730 } 1730 }
1731 __ bx(LR); 1731 __ bx(LR);
1732 } 1732 }
1733 1733
1734 1734
1735 ASSEMBLER_TEST_RUN(Udiv_corner, test) { 1735 ASSEMBLER_TEST_RUN(Udiv_corner, test) {
1736 EXPECT(test != NULL); 1736 EXPECT(test != NULL);
1737 typedef int (*Tst)(); 1737 typedef int (*Tst)();
1738 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1738 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1739 } 1739 }
1740 1740
1741 1741
1742 ASSEMBLER_TEST_GENERATE(Sdiv_corner, assembler) { 1742 ASSEMBLER_TEST_GENERATE(Sdiv_corner, assembler) {
1743 if (TargetCPUFeatures::integer_division_supported()) { 1743 if (TargetCPUFeatures::integer_division_supported()) {
1744 __ LoadImmediate(R0, 0x80000000); 1744 __ LoadImmediate(R0, 0x80000000);
1745 __ LoadImmediate(R1, 0xffffffff); 1745 __ LoadImmediate(R1, 0xffffffff);
1746 __ sdiv(R2, R0, R1); 1746 __ sdiv(R2, R0, R1);
1747 __ mov(R0, ShifterOperand(R2)); 1747 __ mov(R0, Operand(R2));
1748 } else { 1748 } else {
1749 __ LoadImmediate(R0, 0x80000000); 1749 __ LoadImmediate(R0, 0x80000000);
1750 } 1750 }
1751 __ bx(LR); 1751 __ bx(LR);
1752 } 1752 }
1753 1753
1754 1754
1755 ASSEMBLER_TEST_RUN(Sdiv_corner, test) { 1755 ASSEMBLER_TEST_RUN(Sdiv_corner, test) {
1756 EXPECT(test != NULL); 1756 EXPECT(test != NULL);
1757 typedef int (*Tst)(); 1757 typedef int (*Tst)();
1758 EXPECT_EQ(static_cast<int32_t>(0x80000000), 1758 EXPECT_EQ(static_cast<int32_t>(0x80000000),
1759 EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1759 EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1760 } 1760 }
1761 1761
1762 1762
1763 ASSEMBLER_TEST_GENERATE(IntDiv_supported, assembler) { 1763 ASSEMBLER_TEST_GENERATE(IntDiv_supported, assembler) {
1764 #if defined(USING_SIMULATOR) 1764 #if defined(USING_SIMULATOR)
1765 bool orig = TargetCPUFeatures::integer_division_supported(); 1765 bool orig = TargetCPUFeatures::integer_division_supported();
1766 HostCPUFeatures::set_integer_division_supported(true); 1766 HostCPUFeatures::set_integer_division_supported(true);
1767 __ mov(R0, ShifterOperand(27)); 1767 __ mov(R0, Operand(27));
1768 __ mov(R1, ShifterOperand(9)); 1768 __ mov(R1, Operand(9));
1769 __ IntegerDivide(R0, R0, R1, D0, D1); 1769 __ IntegerDivide(R0, R0, R1, D0, D1);
1770 HostCPUFeatures::set_integer_division_supported(orig); 1770 HostCPUFeatures::set_integer_division_supported(orig);
1771 __ bx(LR); 1771 __ bx(LR);
1772 #else 1772 #else
1773 __ mov(R0, ShifterOperand(27)); 1773 __ mov(R0, Operand(27));
1774 __ mov(R1, ShifterOperand(9)); 1774 __ mov(R1, Operand(9));
1775 __ IntegerDivide(R0, R0, R1, D0, D1); 1775 __ IntegerDivide(R0, R0, R1, D0, D1);
1776 __ bx(LR); 1776 __ bx(LR);
1777 #endif 1777 #endif
1778 } 1778 }
1779 1779
1780 1780
1781 ASSEMBLER_TEST_RUN(IntDiv_supported, test) { 1781 ASSEMBLER_TEST_RUN(IntDiv_supported, test) {
1782 EXPECT(test != NULL); 1782 EXPECT(test != NULL);
1783 typedef int (*Tst)(); 1783 typedef int (*Tst)();
1784 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1784 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1785 } 1785 }
1786 1786
1787 1787
1788 ASSEMBLER_TEST_GENERATE(IntDiv_unsupported, assembler) { 1788 ASSEMBLER_TEST_GENERATE(IntDiv_unsupported, assembler) {
1789 #if defined(USING_SIMULATOR) 1789 #if defined(USING_SIMULATOR)
1790 bool orig = TargetCPUFeatures::integer_division_supported(); 1790 bool orig = TargetCPUFeatures::integer_division_supported();
1791 HostCPUFeatures::set_integer_division_supported(false); 1791 HostCPUFeatures::set_integer_division_supported(false);
1792 __ mov(R0, ShifterOperand(27)); 1792 __ mov(R0, Operand(27));
1793 __ mov(R1, ShifterOperand(9)); 1793 __ mov(R1, Operand(9));
1794 __ IntegerDivide(R0, R0, R1, D0, D1); 1794 __ IntegerDivide(R0, R0, R1, D0, D1);
1795 HostCPUFeatures::set_integer_division_supported(orig); 1795 HostCPUFeatures::set_integer_division_supported(orig);
1796 __ bx(LR); 1796 __ bx(LR);
1797 #else 1797 #else
1798 __ mov(R0, ShifterOperand(27)); 1798 __ mov(R0, Operand(27));
1799 __ mov(R1, ShifterOperand(9)); 1799 __ mov(R1, Operand(9));
1800 __ IntegerDivide(R0, R0, R1, D0, D1); 1800 __ IntegerDivide(R0, R0, R1, D0, D1);
1801 __ bx(LR); 1801 __ bx(LR);
1802 #endif 1802 #endif
1803 } 1803 }
1804 1804
1805 1805
1806 ASSEMBLER_TEST_RUN(IntDiv_unsupported, test) { 1806 ASSEMBLER_TEST_RUN(IntDiv_unsupported, test) {
1807 EXPECT(test != NULL); 1807 EXPECT(test != NULL);
1808 typedef int (*Tst)(); 1808 typedef int (*Tst)();
1809 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1809 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1810 } 1810 }
1811 1811
1812 1812
1813 ASSEMBLER_TEST_GENERATE(Muls, assembler) { 1813 ASSEMBLER_TEST_GENERATE(Muls, assembler) {
1814 __ mov(R0, ShifterOperand(3)); 1814 __ mov(R0, Operand(3));
1815 __ LoadImmediate(R1, -9); 1815 __ LoadImmediate(R1, -9);
1816 __ muls(R2, R0, R1); 1816 __ muls(R2, R0, R1);
1817 __ mov(R0, ShifterOperand(42), MI); 1817 __ mov(R0, Operand(42), MI);
1818 __ bx(LR); 1818 __ bx(LR);
1819 } 1819 }
1820 1820
1821 1821
1822 ASSEMBLER_TEST_RUN(Muls, test) { 1822 ASSEMBLER_TEST_RUN(Muls, test) {
1823 EXPECT(test != NULL); 1823 EXPECT(test != NULL);
1824 typedef int (*Tst)(); 1824 typedef int (*Tst)();
1825 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1825 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1826 } 1826 }
1827 1827
1828 1828
1829 ASSEMBLER_TEST_GENERATE(Vaddqi8, assembler) { 1829 ASSEMBLER_TEST_GENERATE(Vaddqi8, assembler) {
1830 if (TargetCPUFeatures::neon_supported()) { 1830 if (TargetCPUFeatures::neon_supported()) {
1831 __ mov(R0, ShifterOperand(1)); 1831 __ mov(R0, Operand(1));
1832 __ vmovsr(S0, R0); 1832 __ vmovsr(S0, R0);
1833 __ mov(R0, ShifterOperand(2)); 1833 __ mov(R0, Operand(2));
1834 __ vmovsr(S1, R0); 1834 __ vmovsr(S1, R0);
1835 __ mov(R0, ShifterOperand(3)); 1835 __ mov(R0, Operand(3));
1836 __ vmovsr(S2, R0); 1836 __ vmovsr(S2, R0);
1837 __ mov(R0, ShifterOperand(4)); 1837 __ mov(R0, Operand(4));
1838 __ vmovsr(S3, R0); 1838 __ vmovsr(S3, R0);
1839 __ mov(R0, ShifterOperand(5)); 1839 __ mov(R0, Operand(5));
1840 __ vmovsr(S4, R0); 1840 __ vmovsr(S4, R0);
1841 __ mov(R0, ShifterOperand(6)); 1841 __ mov(R0, Operand(6));
1842 __ vmovsr(S5, R0); 1842 __ vmovsr(S5, R0);
1843 __ mov(R0, ShifterOperand(7)); 1843 __ mov(R0, Operand(7));
1844 __ vmovsr(S6, R0); 1844 __ vmovsr(S6, R0);
1845 __ mov(R0, ShifterOperand(8)); 1845 __ mov(R0, Operand(8));
1846 __ vmovsr(S7, R0); 1846 __ vmovsr(S7, R0);
1847 1847
1848 __ vaddqi(kByte, Q2, Q0, Q1); 1848 __ vaddqi(kByte, Q2, Q0, Q1);
1849 1849
1850 __ vmovrs(R0, S8); 1850 __ vmovrs(R0, S8);
1851 __ vmovrs(R1, S9); 1851 __ vmovrs(R1, S9);
1852 __ vmovrs(R2, S10); 1852 __ vmovrs(R2, S10);
1853 __ vmovrs(R3, S11); 1853 __ vmovrs(R3, S11);
1854 1854
1855 __ add(R0, R0, ShifterOperand(R1)); 1855 __ add(R0, R0, Operand(R1));
1856 __ add(R0, R0, ShifterOperand(R2)); 1856 __ add(R0, R0, Operand(R2));
1857 __ add(R0, R0, ShifterOperand(R3)); 1857 __ add(R0, R0, Operand(R3));
1858 __ bx(LR); 1858 __ bx(LR);
1859 } else { 1859 } else {
1860 __ LoadImmediate(R0, 36); 1860 __ LoadImmediate(R0, 36);
1861 __ bx(LR); 1861 __ bx(LR);
1862 } 1862 }
1863 } 1863 }
1864 1864
1865 1865
1866 ASSEMBLER_TEST_RUN(Vaddqi8, test) { 1866 ASSEMBLER_TEST_RUN(Vaddqi8, test) {
1867 EXPECT(test != NULL); 1867 EXPECT(test != NULL);
1868 typedef int (*Tst)(); 1868 typedef int (*Tst)();
1869 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1869 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1870 } 1870 }
1871 1871
1872 1872
1873 ASSEMBLER_TEST_GENERATE(Vaddqi16, assembler) { 1873 ASSEMBLER_TEST_GENERATE(Vaddqi16, assembler) {
1874 if (TargetCPUFeatures::neon_supported()) { 1874 if (TargetCPUFeatures::neon_supported()) {
1875 __ mov(R0, ShifterOperand(1)); 1875 __ mov(R0, Operand(1));
1876 __ vmovsr(S0, R0); 1876 __ vmovsr(S0, R0);
1877 __ mov(R0, ShifterOperand(2)); 1877 __ mov(R0, Operand(2));
1878 __ vmovsr(S1, R0); 1878 __ vmovsr(S1, R0);
1879 __ mov(R0, ShifterOperand(3)); 1879 __ mov(R0, Operand(3));
1880 __ vmovsr(S2, R0); 1880 __ vmovsr(S2, R0);
1881 __ mov(R0, ShifterOperand(4)); 1881 __ mov(R0, Operand(4));
1882 __ vmovsr(S3, R0); 1882 __ vmovsr(S3, R0);
1883 __ mov(R0, ShifterOperand(5)); 1883 __ mov(R0, Operand(5));
1884 __ vmovsr(S4, R0); 1884 __ vmovsr(S4, R0);
1885 __ mov(R0, ShifterOperand(6)); 1885 __ mov(R0, Operand(6));
1886 __ vmovsr(S5, R0); 1886 __ vmovsr(S5, R0);
1887 __ mov(R0, ShifterOperand(7)); 1887 __ mov(R0, Operand(7));
1888 __ vmovsr(S6, R0); 1888 __ vmovsr(S6, R0);
1889 __ mov(R0, ShifterOperand(8)); 1889 __ mov(R0, Operand(8));
1890 __ vmovsr(S7, R0); 1890 __ vmovsr(S7, R0);
1891 1891
1892 __ vaddqi(kHalfword, Q2, Q0, Q1); 1892 __ vaddqi(kHalfword, Q2, Q0, Q1);
1893 1893
1894 __ vmovrs(R0, S8); 1894 __ vmovrs(R0, S8);
1895 __ vmovrs(R1, S9); 1895 __ vmovrs(R1, S9);
1896 __ vmovrs(R2, S10); 1896 __ vmovrs(R2, S10);
1897 __ vmovrs(R3, S11); 1897 __ vmovrs(R3, S11);
1898 1898
1899 __ add(R0, R0, ShifterOperand(R1)); 1899 __ add(R0, R0, Operand(R1));
1900 __ add(R0, R0, ShifterOperand(R2)); 1900 __ add(R0, R0, Operand(R2));
1901 __ add(R0, R0, ShifterOperand(R3)); 1901 __ add(R0, R0, Operand(R3));
1902 __ bx(LR); 1902 __ bx(LR);
1903 } else { 1903 } else {
1904 __ LoadImmediate(R0, 36); 1904 __ LoadImmediate(R0, 36);
1905 __ bx(LR); 1905 __ bx(LR);
1906 } 1906 }
1907 } 1907 }
1908 1908
1909 1909
1910 ASSEMBLER_TEST_RUN(Vaddqi16, test) { 1910 ASSEMBLER_TEST_RUN(Vaddqi16, test) {
1911 EXPECT(test != NULL); 1911 EXPECT(test != NULL);
1912 typedef int (*Tst)(); 1912 typedef int (*Tst)();
1913 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1913 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1914 } 1914 }
1915 1915
1916 1916
1917 ASSEMBLER_TEST_GENERATE(Vaddqi32, assembler) { 1917 ASSEMBLER_TEST_GENERATE(Vaddqi32, assembler) {
1918 if (TargetCPUFeatures::neon_supported()) { 1918 if (TargetCPUFeatures::neon_supported()) {
1919 __ mov(R0, ShifterOperand(1)); 1919 __ mov(R0, Operand(1));
1920 __ vmovsr(S0, R0); 1920 __ vmovsr(S0, R0);
1921 __ mov(R0, ShifterOperand(2)); 1921 __ mov(R0, Operand(2));
1922 __ vmovsr(S1, R0); 1922 __ vmovsr(S1, R0);
1923 __ mov(R0, ShifterOperand(3)); 1923 __ mov(R0, Operand(3));
1924 __ vmovsr(S2, R0); 1924 __ vmovsr(S2, R0);
1925 __ mov(R0, ShifterOperand(4)); 1925 __ mov(R0, Operand(4));
1926 __ vmovsr(S3, R0); 1926 __ vmovsr(S3, R0);
1927 __ mov(R0, ShifterOperand(5)); 1927 __ mov(R0, Operand(5));
1928 __ vmovsr(S4, R0); 1928 __ vmovsr(S4, R0);
1929 __ mov(R0, ShifterOperand(6)); 1929 __ mov(R0, Operand(6));
1930 __ vmovsr(S5, R0); 1930 __ vmovsr(S5, R0);
1931 __ mov(R0, ShifterOperand(7)); 1931 __ mov(R0, Operand(7));
1932 __ vmovsr(S6, R0); 1932 __ vmovsr(S6, R0);
1933 __ mov(R0, ShifterOperand(8)); 1933 __ mov(R0, Operand(8));
1934 __ vmovsr(S7, R0); 1934 __ vmovsr(S7, R0);
1935 1935
1936 __ vaddqi(kWord, Q2, Q0, Q1); 1936 __ vaddqi(kWord, Q2, Q0, Q1);
1937 1937
1938 __ vmovrs(R0, S8); 1938 __ vmovrs(R0, S8);
1939 __ vmovrs(R1, S9); 1939 __ vmovrs(R1, S9);
1940 __ vmovrs(R2, S10); 1940 __ vmovrs(R2, S10);
1941 __ vmovrs(R3, S11); 1941 __ vmovrs(R3, S11);
1942 1942
1943 __ add(R0, R0, ShifterOperand(R1)); 1943 __ add(R0, R0, Operand(R1));
1944 __ add(R0, R0, ShifterOperand(R2)); 1944 __ add(R0, R0, Operand(R2));
1945 __ add(R0, R0, ShifterOperand(R3)); 1945 __ add(R0, R0, Operand(R3));
1946 __ bx(LR); 1946 __ bx(LR);
1947 } else { 1947 } else {
1948 __ LoadImmediate(R0, 36); 1948 __ LoadImmediate(R0, 36);
1949 __ bx(LR); 1949 __ bx(LR);
1950 } 1950 }
1951 } 1951 }
1952 1952
1953 1953
1954 ASSEMBLER_TEST_RUN(Vaddqi32, test) { 1954 ASSEMBLER_TEST_RUN(Vaddqi32, test) {
1955 EXPECT(test != NULL); 1955 EXPECT(test != NULL);
1956 typedef int (*Tst)(); 1956 typedef int (*Tst)();
1957 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1957 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1958 } 1958 }
1959 1959
1960 1960
1961 ASSEMBLER_TEST_GENERATE(Vaddqi64, assembler) { 1961 ASSEMBLER_TEST_GENERATE(Vaddqi64, assembler) {
1962 if (TargetCPUFeatures::neon_supported()) { 1962 if (TargetCPUFeatures::neon_supported()) {
1963 __ mov(R0, ShifterOperand(1)); 1963 __ mov(R0, Operand(1));
1964 __ vmovsr(S0, R0); 1964 __ vmovsr(S0, R0);
1965 __ mov(R0, ShifterOperand(2)); 1965 __ mov(R0, Operand(2));
1966 __ vmovsr(S2, R0); 1966 __ vmovsr(S2, R0);
1967 __ mov(R0, ShifterOperand(3)); 1967 __ mov(R0, Operand(3));
1968 __ vmovsr(S4, R0); 1968 __ vmovsr(S4, R0);
1969 __ mov(R0, ShifterOperand(4)); 1969 __ mov(R0, Operand(4));
1970 __ vmovsr(S6, R0); 1970 __ vmovsr(S6, R0);
1971 1971
1972 __ vaddqi(kWordPair, Q2, Q0, Q1); 1972 __ vaddqi(kWordPair, Q2, Q0, Q1);
1973 1973
1974 __ vmovrs(R0, S8); 1974 __ vmovrs(R0, S8);
1975 __ vmovrs(R2, S10); 1975 __ vmovrs(R2, S10);
1976 1976
1977 __ add(R0, R0, ShifterOperand(R2)); 1977 __ add(R0, R0, Operand(R2));
1978 __ bx(LR); 1978 __ bx(LR);
1979 } else { 1979 } else {
1980 __ LoadImmediate(R0, 10); 1980 __ LoadImmediate(R0, 10);
1981 __ bx(LR); 1981 __ bx(LR);
1982 } 1982 }
1983 } 1983 }
1984 1984
1985 1985
1986 ASSEMBLER_TEST_RUN(Vaddqi64, test) { 1986 ASSEMBLER_TEST_RUN(Vaddqi64, test) {
1987 EXPECT(test != NULL); 1987 EXPECT(test != NULL);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 __ veorq(temp, temp, temp); 2084 __ veorq(temp, temp, temp);
2085 __ veorq(out, out, out); 2085 __ veorq(out, out, out);
2086 __ LoadImmediate(shift, 32); 2086 __ LoadImmediate(shift, 32);
2087 __ LoadImmediate(R2, 1 << 7); 2087 __ LoadImmediate(R2, 1 << 7);
2088 __ vmovsr(S0, R2); 2088 __ vmovsr(S0, R2);
2089 2089
2090 __ vmovsr(stemp0, shift); // Move the shift into the low S register. 2090 __ vmovsr(stemp0, shift); // Move the shift into the low S register.
2091 __ vshlqu(kWordPair, out, value, temp); 2091 __ vshlqu(kWordPair, out, value, temp);
2092 2092
2093 // check for overflow by shifting back and comparing. 2093 // check for overflow by shifting back and comparing.
2094 __ rsb(shift, shift, ShifterOperand(0)); 2094 __ rsb(shift, shift, Operand(0));
2095 __ vmovsr(stemp0, shift); 2095 __ vmovsr(stemp0, shift);
2096 __ vshlqi(kWordPair, temp, out, temp); 2096 __ vshlqi(kWordPair, temp, out, temp);
2097 __ vceqqi(kWord, out, temp, value); 2097 __ vceqqi(kWord, out, temp, value);
2098 // Low 64 bits of temp should be all 1's, otherwise temp != value and 2098 // Low 64 bits of temp should be all 1's, otherwise temp != value and
2099 // we deopt. 2099 // we deopt.
2100 __ vmovrs(shift, sout0); 2100 __ vmovrs(shift, sout0);
2101 __ CompareImmediate(shift, -1); 2101 __ CompareImmediate(shift, -1);
2102 __ b(&fail, NE); 2102 __ b(&fail, NE);
2103 __ vmovrs(shift, sout1); 2103 __ vmovrs(shift, sout1);
2104 __ CompareImmediate(shift, -1); 2104 __ CompareImmediate(shift, -1);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 __ veorq(temp, temp, temp); 2141 __ veorq(temp, temp, temp);
2142 __ veorq(out, out, out); 2142 __ veorq(out, out, out);
2143 __ LoadImmediate(shift, 60); 2143 __ LoadImmediate(shift, 60);
2144 __ LoadImmediate(R2, 1 << 7); 2144 __ LoadImmediate(R2, 1 << 7);
2145 __ vmovsr(S0, R2); 2145 __ vmovsr(S0, R2);
2146 2146
2147 __ vmovsr(stemp0, shift); // Move the shift into the low S register. 2147 __ vmovsr(stemp0, shift); // Move the shift into the low S register.
2148 __ vshlqu(kWordPair, out, value, temp); 2148 __ vshlqu(kWordPair, out, value, temp);
2149 2149
2150 // check for overflow by shifting back and comparing. 2150 // check for overflow by shifting back and comparing.
2151 __ rsb(shift, shift, ShifterOperand(0)); 2151 __ rsb(shift, shift, Operand(0));
2152 __ vmovsr(stemp0, shift); 2152 __ vmovsr(stemp0, shift);
2153 __ vshlqi(kWordPair, temp, out, temp); 2153 __ vshlqi(kWordPair, temp, out, temp);
2154 __ vceqqi(kWord, out, temp, value); 2154 __ vceqqi(kWord, out, temp, value);
2155 // Low 64 bits of temp should be all 1's, otherwise temp != value and 2155 // Low 64 bits of temp should be all 1's, otherwise temp != value and
2156 // we deopt. 2156 // we deopt.
2157 __ vmovrs(shift, sout0); 2157 __ vmovrs(shift, sout0);
2158 __ CompareImmediate(shift, -1); 2158 __ CompareImmediate(shift, -1);
2159 __ b(&fail, NE); 2159 __ b(&fail, NE);
2160 __ vmovrs(shift, sout1); 2160 __ vmovrs(shift, sout1);
2161 __ CompareImmediate(shift, -1); 2161 __ CompareImmediate(shift, -1);
(...skipping 13 matching lines...) Expand all
2175 2175
2176 ASSEMBLER_TEST_RUN(Mint_shl_overflow, test) { 2176 ASSEMBLER_TEST_RUN(Mint_shl_overflow, test) {
2177 EXPECT(test != NULL); 2177 EXPECT(test != NULL);
2178 typedef int (*Tst)(); 2178 typedef int (*Tst)();
2179 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2179 EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2180 } 2180 }
2181 2181
2182 2182
2183 ASSEMBLER_TEST_GENERATE(Vsubqi8, assembler) { 2183 ASSEMBLER_TEST_GENERATE(Vsubqi8, assembler) {
2184 if (TargetCPUFeatures::neon_supported()) { 2184 if (TargetCPUFeatures::neon_supported()) {
2185 __ mov(R0, ShifterOperand(1)); 2185 __ mov(R0, Operand(1));
2186 __ vmovsr(S0, R0); 2186 __ vmovsr(S0, R0);
2187 __ mov(R0, ShifterOperand(2)); 2187 __ mov(R0, Operand(2));
2188 __ vmovsr(S1, R0); 2188 __ vmovsr(S1, R0);
2189 __ mov(R0, ShifterOperand(3)); 2189 __ mov(R0, Operand(3));
2190 __ vmovsr(S2, R0); 2190 __ vmovsr(S2, R0);
2191 __ mov(R0, ShifterOperand(4)); 2191 __ mov(R0, Operand(4));
2192 __ vmovsr(S3, R0); 2192 __ vmovsr(S3, R0);
2193 __ mov(R0, ShifterOperand(2)); 2193 __ mov(R0, Operand(2));
2194 __ vmovsr(S4, R0); 2194 __ vmovsr(S4, R0);
2195 __ mov(R0, ShifterOperand(4)); 2195 __ mov(R0, Operand(4));
2196 __ vmovsr(S5, R0); 2196 __ vmovsr(S5, R0);
2197 __ mov(R0, ShifterOperand(6)); 2197 __ mov(R0, Operand(6));
2198 __ vmovsr(S6, R0); 2198 __ vmovsr(S6, R0);
2199 __ mov(R0, ShifterOperand(8)); 2199 __ mov(R0, Operand(8));
2200 __ vmovsr(S7, R0); 2200 __ vmovsr(S7, R0);
2201 2201
2202 __ vsubqi(kByte, Q2, Q1, Q0); 2202 __ vsubqi(kByte, Q2, Q1, Q0);
2203 2203
2204 __ vmovrs(R0, S8); 2204 __ vmovrs(R0, S8);
2205 __ vmovrs(R1, S9); 2205 __ vmovrs(R1, S9);
2206 __ vmovrs(R2, S10); 2206 __ vmovrs(R2, S10);
2207 __ vmovrs(R3, S11); 2207 __ vmovrs(R3, S11);
2208 2208
2209 __ add(R0, R0, ShifterOperand(R1)); 2209 __ add(R0, R0, Operand(R1));
2210 __ add(R0, R0, ShifterOperand(R2)); 2210 __ add(R0, R0, Operand(R2));
2211 __ add(R0, R0, ShifterOperand(R3)); 2211 __ add(R0, R0, Operand(R3));
2212 __ bx(LR); 2212 __ bx(LR);
2213 } else { 2213 } else {
2214 __ LoadImmediate(R0, 10); 2214 __ LoadImmediate(R0, 10);
2215 __ bx(LR); 2215 __ bx(LR);
2216 } 2216 }
2217 } 2217 }
2218 2218
2219 2219
2220 ASSEMBLER_TEST_RUN(Vsubqi8, test) { 2220 ASSEMBLER_TEST_RUN(Vsubqi8, test) {
2221 EXPECT(test != NULL); 2221 EXPECT(test != NULL);
2222 typedef int (*Tst)(); 2222 typedef int (*Tst)();
2223 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2223 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2224 } 2224 }
2225 2225
2226 2226
2227 ASSEMBLER_TEST_GENERATE(Vsubqi16, assembler) { 2227 ASSEMBLER_TEST_GENERATE(Vsubqi16, assembler) {
2228 if (TargetCPUFeatures::neon_supported()) { 2228 if (TargetCPUFeatures::neon_supported()) {
2229 __ mov(R0, ShifterOperand(1)); 2229 __ mov(R0, Operand(1));
2230 __ vmovsr(S0, R0); 2230 __ vmovsr(S0, R0);
2231 __ mov(R0, ShifterOperand(2)); 2231 __ mov(R0, Operand(2));
2232 __ vmovsr(S1, R0); 2232 __ vmovsr(S1, R0);
2233 __ mov(R0, ShifterOperand(3)); 2233 __ mov(R0, Operand(3));
2234 __ vmovsr(S2, R0); 2234 __ vmovsr(S2, R0);
2235 __ mov(R0, ShifterOperand(4)); 2235 __ mov(R0, Operand(4));
2236 __ vmovsr(S3, R0); 2236 __ vmovsr(S3, R0);
2237 __ mov(R0, ShifterOperand(2)); 2237 __ mov(R0, Operand(2));
2238 __ vmovsr(S4, R0); 2238 __ vmovsr(S4, R0);
2239 __ mov(R0, ShifterOperand(4)); 2239 __ mov(R0, Operand(4));
2240 __ vmovsr(S5, R0); 2240 __ vmovsr(S5, R0);
2241 __ mov(R0, ShifterOperand(6)); 2241 __ mov(R0, Operand(6));
2242 __ vmovsr(S6, R0); 2242 __ vmovsr(S6, R0);
2243 __ mov(R0, ShifterOperand(8)); 2243 __ mov(R0, Operand(8));
2244 __ vmovsr(S7, R0); 2244 __ vmovsr(S7, R0);
2245 2245
2246 __ vsubqi(kHalfword, Q2, Q1, Q0); 2246 __ vsubqi(kHalfword, Q2, Q1, Q0);
2247 2247
2248 __ vmovrs(R0, S8); 2248 __ vmovrs(R0, S8);
2249 __ vmovrs(R1, S9); 2249 __ vmovrs(R1, S9);
2250 __ vmovrs(R2, S10); 2250 __ vmovrs(R2, S10);
2251 __ vmovrs(R3, S11); 2251 __ vmovrs(R3, S11);
2252 2252
2253 __ add(R0, R0, ShifterOperand(R1)); 2253 __ add(R0, R0, Operand(R1));
2254 __ add(R0, R0, ShifterOperand(R2)); 2254 __ add(R0, R0, Operand(R2));
2255 __ add(R0, R0, ShifterOperand(R3)); 2255 __ add(R0, R0, Operand(R3));
2256 __ bx(LR); 2256 __ bx(LR);
2257 } else { 2257 } else {
2258 __ LoadImmediate(R0, 10); 2258 __ LoadImmediate(R0, 10);
2259 __ bx(LR); 2259 __ bx(LR);
2260 } 2260 }
2261 } 2261 }
2262 2262
2263 2263
2264 ASSEMBLER_TEST_RUN(Vsubqi16, test) { 2264 ASSEMBLER_TEST_RUN(Vsubqi16, test) {
2265 EXPECT(test != NULL); 2265 EXPECT(test != NULL);
2266 typedef int (*Tst)(); 2266 typedef int (*Tst)();
2267 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2267 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2268 } 2268 }
2269 2269
2270 2270
2271 ASSEMBLER_TEST_GENERATE(Vsubqi32, assembler) { 2271 ASSEMBLER_TEST_GENERATE(Vsubqi32, assembler) {
2272 if (TargetCPUFeatures::neon_supported()) { 2272 if (TargetCPUFeatures::neon_supported()) {
2273 __ mov(R0, ShifterOperand(1)); 2273 __ mov(R0, Operand(1));
2274 __ vmovsr(S0, R0); 2274 __ vmovsr(S0, R0);
2275 __ mov(R0, ShifterOperand(2)); 2275 __ mov(R0, Operand(2));
2276 __ vmovsr(S1, R0); 2276 __ vmovsr(S1, R0);
2277 __ mov(R0, ShifterOperand(3)); 2277 __ mov(R0, Operand(3));
2278 __ vmovsr(S2, R0); 2278 __ vmovsr(S2, R0);
2279 __ mov(R0, ShifterOperand(4)); 2279 __ mov(R0, Operand(4));
2280 __ vmovsr(S3, R0); 2280 __ vmovsr(S3, R0);
2281 __ mov(R0, ShifterOperand(2)); 2281 __ mov(R0, Operand(2));
2282 __ vmovsr(S4, R0); 2282 __ vmovsr(S4, R0);
2283 __ mov(R0, ShifterOperand(4)); 2283 __ mov(R0, Operand(4));
2284 __ vmovsr(S5, R0); 2284 __ vmovsr(S5, R0);
2285 __ mov(R0, ShifterOperand(6)); 2285 __ mov(R0, Operand(6));
2286 __ vmovsr(S6, R0); 2286 __ vmovsr(S6, R0);
2287 __ mov(R0, ShifterOperand(8)); 2287 __ mov(R0, Operand(8));
2288 __ vmovsr(S7, R0); 2288 __ vmovsr(S7, R0);
2289 2289
2290 __ vsubqi(kWord, Q2, Q1, Q0); 2290 __ vsubqi(kWord, Q2, Q1, Q0);
2291 2291
2292 __ vmovrs(R0, S8); 2292 __ vmovrs(R0, S8);
2293 __ vmovrs(R1, S9); 2293 __ vmovrs(R1, S9);
2294 __ vmovrs(R2, S10); 2294 __ vmovrs(R2, S10);
2295 __ vmovrs(R3, S11); 2295 __ vmovrs(R3, S11);
2296 2296
2297 __ add(R0, R0, ShifterOperand(R1)); 2297 __ add(R0, R0, Operand(R1));
2298 __ add(R0, R0, ShifterOperand(R2)); 2298 __ add(R0, R0, Operand(R2));
2299 __ add(R0, R0, ShifterOperand(R3)); 2299 __ add(R0, R0, Operand(R3));
2300 __ bx(LR); 2300 __ bx(LR);
2301 } else { 2301 } else {
2302 __ LoadImmediate(R0, 10); 2302 __ LoadImmediate(R0, 10);
2303 __ bx(LR); 2303 __ bx(LR);
2304 } 2304 }
2305 } 2305 }
2306 2306
2307 2307
2308 ASSEMBLER_TEST_RUN(Vsubqi32, test) { 2308 ASSEMBLER_TEST_RUN(Vsubqi32, test) {
2309 EXPECT(test != NULL); 2309 EXPECT(test != NULL);
2310 typedef int (*Tst)(); 2310 typedef int (*Tst)();
2311 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2311 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2312 } 2312 }
2313 2313
2314 2314
2315 ASSEMBLER_TEST_GENERATE(Vsubqi64, assembler) { 2315 ASSEMBLER_TEST_GENERATE(Vsubqi64, assembler) {
2316 if (TargetCPUFeatures::neon_supported()) { 2316 if (TargetCPUFeatures::neon_supported()) {
2317 __ mov(R0, ShifterOperand(1)); 2317 __ mov(R0, Operand(1));
2318 __ vmovsr(S0, R0); 2318 __ vmovsr(S0, R0);
2319 __ mov(R0, ShifterOperand(2)); 2319 __ mov(R0, Operand(2));
2320 __ vmovsr(S2, R0); 2320 __ vmovsr(S2, R0);
2321 __ mov(R0, ShifterOperand(2)); 2321 __ mov(R0, Operand(2));
2322 __ vmovsr(S4, R0); 2322 __ vmovsr(S4, R0);
2323 __ mov(R0, ShifterOperand(4)); 2323 __ mov(R0, Operand(4));
2324 __ vmovsr(S6, R0); 2324 __ vmovsr(S6, R0);
2325 2325
2326 __ vsubqi(kWordPair, Q2, Q1, Q0); 2326 __ vsubqi(kWordPair, Q2, Q1, Q0);
2327 2327
2328 __ vmovrs(R0, S8); 2328 __ vmovrs(R0, S8);
2329 __ vmovrs(R2, S10); 2329 __ vmovrs(R2, S10);
2330 2330
2331 __ add(R0, R0, ShifterOperand(R2)); 2331 __ add(R0, R0, Operand(R2));
2332 __ bx(LR); 2332 __ bx(LR);
2333 } else { 2333 } else {
2334 __ LoadImmediate(R0, 3); 2334 __ LoadImmediate(R0, 3);
2335 __ bx(LR); 2335 __ bx(LR);
2336 } 2336 }
2337 } 2337 }
2338 2338
2339 2339
2340 ASSEMBLER_TEST_RUN(Vsubqi64, test) { 2340 ASSEMBLER_TEST_RUN(Vsubqi64, test) {
2341 EXPECT(test != NULL); 2341 EXPECT(test != NULL);
2342 typedef int (*Tst)(); 2342 typedef int (*Tst)();
2343 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2343 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2344 } 2344 }
2345 2345
2346 2346
2347 ASSEMBLER_TEST_GENERATE(Vmulqi8, assembler) { 2347 ASSEMBLER_TEST_GENERATE(Vmulqi8, assembler) {
2348 if (TargetCPUFeatures::neon_supported()) { 2348 if (TargetCPUFeatures::neon_supported()) {
2349 __ mov(R0, ShifterOperand(1)); 2349 __ mov(R0, Operand(1));
2350 __ vmovsr(S0, R0); 2350 __ vmovsr(S0, R0);
2351 __ mov(R0, ShifterOperand(2)); 2351 __ mov(R0, Operand(2));
2352 __ vmovsr(S1, R0); 2352 __ vmovsr(S1, R0);
2353 __ mov(R0, ShifterOperand(3)); 2353 __ mov(R0, Operand(3));
2354 __ vmovsr(S2, R0); 2354 __ vmovsr(S2, R0);
2355 __ mov(R0, ShifterOperand(4)); 2355 __ mov(R0, Operand(4));
2356 __ vmovsr(S3, R0); 2356 __ vmovsr(S3, R0);
2357 __ mov(R0, ShifterOperand(5)); 2357 __ mov(R0, Operand(5));
2358 __ vmovsr(S4, R0); 2358 __ vmovsr(S4, R0);
2359 __ mov(R0, ShifterOperand(6)); 2359 __ mov(R0, Operand(6));
2360 __ vmovsr(S5, R0); 2360 __ vmovsr(S5, R0);
2361 __ mov(R0, ShifterOperand(7)); 2361 __ mov(R0, Operand(7));
2362 __ vmovsr(S6, R0); 2362 __ vmovsr(S6, R0);
2363 __ mov(R0, ShifterOperand(8)); 2363 __ mov(R0, Operand(8));
2364 __ vmovsr(S7, R0); 2364 __ vmovsr(S7, R0);
2365 2365
2366 __ vmulqi(kByte, Q2, Q1, Q0); 2366 __ vmulqi(kByte, Q2, Q1, Q0);
2367 2367
2368 __ vmovrs(R0, S8); 2368 __ vmovrs(R0, S8);
2369 __ vmovrs(R1, S9); 2369 __ vmovrs(R1, S9);
2370 __ vmovrs(R2, S10); 2370 __ vmovrs(R2, S10);
2371 __ vmovrs(R3, S11); 2371 __ vmovrs(R3, S11);
2372 2372
2373 __ add(R0, R0, ShifterOperand(R1)); 2373 __ add(R0, R0, Operand(R1));
2374 __ add(R0, R0, ShifterOperand(R2)); 2374 __ add(R0, R0, Operand(R2));
2375 __ add(R0, R0, ShifterOperand(R3)); 2375 __ add(R0, R0, Operand(R3));
2376 __ bx(LR); 2376 __ bx(LR);
2377 } else { 2377 } else {
2378 __ LoadImmediate(R0, 70); 2378 __ LoadImmediate(R0, 70);
2379 __ bx(LR); 2379 __ bx(LR);
2380 } 2380 }
2381 } 2381 }
2382 2382
2383 2383
2384 ASSEMBLER_TEST_RUN(Vmulqi8, test) { 2384 ASSEMBLER_TEST_RUN(Vmulqi8, test) {
2385 EXPECT(test != NULL); 2385 EXPECT(test != NULL);
2386 typedef int (*Tst)(); 2386 typedef int (*Tst)();
2387 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2387 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2388 } 2388 }
2389 2389
2390 2390
2391 ASSEMBLER_TEST_GENERATE(Vmulqi16, assembler) { 2391 ASSEMBLER_TEST_GENERATE(Vmulqi16, assembler) {
2392 if (TargetCPUFeatures::neon_supported()) { 2392 if (TargetCPUFeatures::neon_supported()) {
2393 __ mov(R0, ShifterOperand(1)); 2393 __ mov(R0, Operand(1));
2394 __ vmovsr(S0, R0); 2394 __ vmovsr(S0, R0);
2395 __ mov(R0, ShifterOperand(2)); 2395 __ mov(R0, Operand(2));
2396 __ vmovsr(S1, R0); 2396 __ vmovsr(S1, R0);
2397 __ mov(R0, ShifterOperand(3)); 2397 __ mov(R0, Operand(3));
2398 __ vmovsr(S2, R0); 2398 __ vmovsr(S2, R0);
2399 __ mov(R0, ShifterOperand(4)); 2399 __ mov(R0, Operand(4));
2400 __ vmovsr(S3, R0); 2400 __ vmovsr(S3, R0);
2401 __ mov(R0, ShifterOperand(5)); 2401 __ mov(R0, Operand(5));
2402 __ vmovsr(S4, R0); 2402 __ vmovsr(S4, R0);
2403 __ mov(R0, ShifterOperand(6)); 2403 __ mov(R0, Operand(6));
2404 __ vmovsr(S5, R0); 2404 __ vmovsr(S5, R0);
2405 __ mov(R0, ShifterOperand(7)); 2405 __ mov(R0, Operand(7));
2406 __ vmovsr(S6, R0); 2406 __ vmovsr(S6, R0);
2407 __ mov(R0, ShifterOperand(8)); 2407 __ mov(R0, Operand(8));
2408 __ vmovsr(S7, R0); 2408 __ vmovsr(S7, R0);
2409 2409
2410 __ vmulqi(kHalfword, Q2, Q1, Q0); 2410 __ vmulqi(kHalfword, Q2, Q1, Q0);
2411 2411
2412 __ vmovrs(R0, S8); 2412 __ vmovrs(R0, S8);
2413 __ vmovrs(R1, S9); 2413 __ vmovrs(R1, S9);
2414 __ vmovrs(R2, S10); 2414 __ vmovrs(R2, S10);
2415 __ vmovrs(R3, S11); 2415 __ vmovrs(R3, S11);
2416 2416
2417 __ add(R0, R0, ShifterOperand(R1)); 2417 __ add(R0, R0, Operand(R1));
2418 __ add(R0, R0, ShifterOperand(R2)); 2418 __ add(R0, R0, Operand(R2));
2419 __ add(R0, R0, ShifterOperand(R3)); 2419 __ add(R0, R0, Operand(R3));
2420 __ bx(LR); 2420 __ bx(LR);
2421 } else { 2421 } else {
2422 __ LoadImmediate(R0, 70); 2422 __ LoadImmediate(R0, 70);
2423 __ bx(LR); 2423 __ bx(LR);
2424 } 2424 }
2425 } 2425 }
2426 2426
2427 2427
2428 ASSEMBLER_TEST_RUN(Vmulqi16, test) { 2428 ASSEMBLER_TEST_RUN(Vmulqi16, test) {
2429 EXPECT(test != NULL); 2429 EXPECT(test != NULL);
2430 typedef int (*Tst)(); 2430 typedef int (*Tst)();
2431 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2431 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2432 } 2432 }
2433 2433
2434 2434
2435 ASSEMBLER_TEST_GENERATE(Vmulqi32, assembler) { 2435 ASSEMBLER_TEST_GENERATE(Vmulqi32, assembler) {
2436 if (TargetCPUFeatures::neon_supported()) { 2436 if (TargetCPUFeatures::neon_supported()) {
2437 __ mov(R0, ShifterOperand(1)); 2437 __ mov(R0, Operand(1));
2438 __ vmovsr(S0, R0); 2438 __ vmovsr(S0, R0);
2439 __ mov(R0, ShifterOperand(2)); 2439 __ mov(R0, Operand(2));
2440 __ vmovsr(S1, R0); 2440 __ vmovsr(S1, R0);
2441 __ mov(R0, ShifterOperand(3)); 2441 __ mov(R0, Operand(3));
2442 __ vmovsr(S2, R0); 2442 __ vmovsr(S2, R0);
2443 __ mov(R0, ShifterOperand(4)); 2443 __ mov(R0, Operand(4));
2444 __ vmovsr(S3, R0); 2444 __ vmovsr(S3, R0);
2445 __ mov(R0, ShifterOperand(5)); 2445 __ mov(R0, Operand(5));
2446 __ vmovsr(S4, R0); 2446 __ vmovsr(S4, R0);
2447 __ mov(R0, ShifterOperand(6)); 2447 __ mov(R0, Operand(6));
2448 __ vmovsr(S5, R0); 2448 __ vmovsr(S5, R0);
2449 __ mov(R0, ShifterOperand(7)); 2449 __ mov(R0, Operand(7));
2450 __ vmovsr(S6, R0); 2450 __ vmovsr(S6, R0);
2451 __ mov(R0, ShifterOperand(8)); 2451 __ mov(R0, Operand(8));
2452 __ vmovsr(S7, R0); 2452 __ vmovsr(S7, R0);
2453 2453
2454 __ vmulqi(kWord, Q2, Q1, Q0); 2454 __ vmulqi(kWord, Q2, Q1, Q0);
2455 2455
2456 __ vmovrs(R0, S8); 2456 __ vmovrs(R0, S8);
2457 __ vmovrs(R1, S9); 2457 __ vmovrs(R1, S9);
2458 __ vmovrs(R2, S10); 2458 __ vmovrs(R2, S10);
2459 __ vmovrs(R3, S11); 2459 __ vmovrs(R3, S11);
2460 2460
2461 __ add(R0, R0, ShifterOperand(R1)); 2461 __ add(R0, R0, Operand(R1));
2462 __ add(R0, R0, ShifterOperand(R2)); 2462 __ add(R0, R0, Operand(R2));
2463 __ add(R0, R0, ShifterOperand(R3)); 2463 __ add(R0, R0, Operand(R3));
2464 __ bx(LR); 2464 __ bx(LR);
2465 } else { 2465 } else {
2466 __ LoadImmediate(R0, 70); 2466 __ LoadImmediate(R0, 70);
2467 __ bx(LR); 2467 __ bx(LR);
2468 } 2468 }
2469 } 2469 }
2470 2470
2471 2471
2472 ASSEMBLER_TEST_RUN(Vmulqi32, test) { 2472 ASSEMBLER_TEST_RUN(Vmulqi32, test) {
2473 EXPECT(test != NULL); 2473 EXPECT(test != NULL);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2770 __ vmovsr(S7, R0); 2770 __ vmovsr(S7, R0);
2771 2771
2772 // Q2 = -2 -2 -2 -2 2772 // Q2 = -2 -2 -2 -2
2773 __ veorq(Q2, Q1, Q0); 2773 __ veorq(Q2, Q1, Q0);
2774 2774
2775 __ vmovrs(R0, S8); 2775 __ vmovrs(R0, S8);
2776 __ vmovrs(R1, S9); 2776 __ vmovrs(R1, S9);
2777 __ vmovrs(R2, S10); 2777 __ vmovrs(R2, S10);
2778 __ vmovrs(R3, S11); 2778 __ vmovrs(R3, S11);
2779 2779
2780 __ add(R0, R0, ShifterOperand(R1)); 2780 __ add(R0, R0, Operand(R1));
2781 __ add(R0, R0, ShifterOperand(R2)); 2781 __ add(R0, R0, Operand(R2));
2782 __ add(R0, R0, ShifterOperand(R3)); 2782 __ add(R0, R0, Operand(R3));
2783 __ bx(LR); 2783 __ bx(LR);
2784 } else { 2784 } else {
2785 __ LoadImmediate(R0, -8); 2785 __ LoadImmediate(R0, -8);
2786 __ bx(LR); 2786 __ bx(LR);
2787 } 2787 }
2788 } 2788 }
2789 2789
2790 2790
2791 ASSEMBLER_TEST_RUN(Veorq, test) { 2791 ASSEMBLER_TEST_RUN(Veorq, test) {
2792 EXPECT(test != NULL); 2792 EXPECT(test != NULL);
(...skipping 19 matching lines...) Expand all
2812 __ vmovsr(S7, R0); 2812 __ vmovsr(S7, R0);
2813 2813
2814 // Q2 = 15 15 15 15 2814 // Q2 = 15 15 15 15
2815 __ vornq(Q2, Q1, Q0); 2815 __ vornq(Q2, Q1, Q0);
2816 2816
2817 __ vmovrs(R0, S8); 2817 __ vmovrs(R0, S8);
2818 __ vmovrs(R1, S9); 2818 __ vmovrs(R1, S9);
2819 __ vmovrs(R2, S10); 2819 __ vmovrs(R2, S10);
2820 __ vmovrs(R3, S11); 2820 __ vmovrs(R3, S11);
2821 2821
2822 __ add(R0, R0, ShifterOperand(R1)); 2822 __ add(R0, R0, Operand(R1));
2823 __ add(R0, R0, ShifterOperand(R2)); 2823 __ add(R0, R0, Operand(R2));
2824 __ add(R0, R0, ShifterOperand(R3)); 2824 __ add(R0, R0, Operand(R3));
2825 __ bx(LR); 2825 __ bx(LR);
2826 } else { 2826 } else {
2827 __ LoadImmediate(R0, 60); 2827 __ LoadImmediate(R0, 60);
2828 __ bx(LR); 2828 __ bx(LR);
2829 } 2829 }
2830 } 2830 }
2831 2831
2832 2832
2833 ASSEMBLER_TEST_RUN(Vornq, test) { 2833 ASSEMBLER_TEST_RUN(Vornq, test) {
2834 EXPECT(test != NULL); 2834 EXPECT(test != NULL);
(...skipping 19 matching lines...) Expand all
2854 __ vmovsr(S7, R0); 2854 __ vmovsr(S7, R0);
2855 2855
2856 // Q2 = -1 -1 -1 -1 2856 // Q2 = -1 -1 -1 -1
2857 __ vorrq(Q2, Q1, Q0); 2857 __ vorrq(Q2, Q1, Q0);
2858 2858
2859 __ vmovrs(R0, S8); 2859 __ vmovrs(R0, S8);
2860 __ vmovrs(R1, S9); 2860 __ vmovrs(R1, S9);
2861 __ vmovrs(R2, S10); 2861 __ vmovrs(R2, S10);
2862 __ vmovrs(R3, S11); 2862 __ vmovrs(R3, S11);
2863 2863
2864 __ add(R0, R0, ShifterOperand(R1)); 2864 __ add(R0, R0, Operand(R1));
2865 __ add(R0, R0, ShifterOperand(R2)); 2865 __ add(R0, R0, Operand(R2));
2866 __ add(R0, R0, ShifterOperand(R3)); 2866 __ add(R0, R0, Operand(R3));
2867 __ bx(LR); 2867 __ bx(LR);
2868 } else { 2868 } else {
2869 __ LoadImmediate(R0, -4); 2869 __ LoadImmediate(R0, -4);
2870 __ bx(LR); 2870 __ bx(LR);
2871 } 2871 }
2872 } 2872 }
2873 2873
2874 2874
2875 ASSEMBLER_TEST_RUN(Vorrq, test) { 2875 ASSEMBLER_TEST_RUN(Vorrq, test) {
2876 EXPECT(test != NULL); 2876 EXPECT(test != NULL);
(...skipping 19 matching lines...) Expand all
2896 __ vmovsr(S7, R0); 2896 __ vmovsr(S7, R0);
2897 2897
2898 // Q2 = 1 1 1 1 2898 // Q2 = 1 1 1 1
2899 __ vandq(Q2, Q1, Q0); 2899 __ vandq(Q2, Q1, Q0);
2900 2900
2901 __ vmovrs(R0, S8); 2901 __ vmovrs(R0, S8);
2902 __ vmovrs(R1, S9); 2902 __ vmovrs(R1, S9);
2903 __ vmovrs(R2, S10); 2903 __ vmovrs(R2, S10);
2904 __ vmovrs(R3, S11); 2904 __ vmovrs(R3, S11);
2905 2905
2906 __ add(R0, R0, ShifterOperand(R1)); 2906 __ add(R0, R0, Operand(R1));
2907 __ add(R0, R0, ShifterOperand(R2)); 2907 __ add(R0, R0, Operand(R2));
2908 __ add(R0, R0, ShifterOperand(R3)); 2908 __ add(R0, R0, Operand(R3));
2909 __ bx(LR); 2909 __ bx(LR);
2910 } else { 2910 } else {
2911 __ LoadImmediate(R0, 4); 2911 __ LoadImmediate(R0, 4);
2912 __ bx(LR); 2912 __ bx(LR);
2913 } 2913 }
2914 } 2914 }
2915 2915
2916 2916
2917 ASSEMBLER_TEST_RUN(Vandq, test) { 2917 ASSEMBLER_TEST_RUN(Vandq, test) {
2918 EXPECT(test != NULL); 2918 EXPECT(test != NULL);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 __ vmovsr(S5, R1); 2989 __ vmovsr(S5, R1);
2990 2990
2991 // Should copy 0xff to each byte of Q0. 2991 // Should copy 0xff to each byte of Q0.
2992 __ vdup(kByte, Q0, D2, 6); 2992 __ vdup(kByte, Q0, D2, 6);
2993 2993
2994 __ vmovrs(R0, S0); 2994 __ vmovrs(R0, S0);
2995 __ vmovrs(R1, S1); 2995 __ vmovrs(R1, S1);
2996 __ vmovrs(R2, S2); 2996 __ vmovrs(R2, S2);
2997 __ vmovrs(R3, S3); 2997 __ vmovrs(R3, S3);
2998 2998
2999 __ add(R0, R0, ShifterOperand(R1)); 2999 __ add(R0, R0, Operand(R1));
3000 __ add(R0, R0, ShifterOperand(R2)); 3000 __ add(R0, R0, Operand(R2));
3001 __ add(R0, R0, ShifterOperand(R3)); 3001 __ add(R0, R0, Operand(R3));
3002 __ bx(LR); 3002 __ bx(LR);
3003 } else { 3003 } else {
3004 __ LoadImmediate(R0, -4); 3004 __ LoadImmediate(R0, -4);
3005 __ bx(LR); 3005 __ bx(LR);
3006 } 3006 }
3007 } 3007 }
3008 3008
3009 3009
3010 ASSEMBLER_TEST_RUN(Vdupb, test) { 3010 ASSEMBLER_TEST_RUN(Vdupb, test) {
3011 EXPECT(test != NULL); 3011 EXPECT(test != NULL);
(...skipping 10 matching lines...) Expand all
3022 __ vmovsr(S5, R1); 3022 __ vmovsr(S5, R1);
3023 3023
3024 // Should copy 0xff to each byte of Q0. 3024 // Should copy 0xff to each byte of Q0.
3025 __ vdup(kHalfword, Q0, D2, 1); 3025 __ vdup(kHalfword, Q0, D2, 1);
3026 3026
3027 __ vmovrs(R0, S0); 3027 __ vmovrs(R0, S0);
3028 __ vmovrs(R1, S1); 3028 __ vmovrs(R1, S1);
3029 __ vmovrs(R2, S2); 3029 __ vmovrs(R2, S2);
3030 __ vmovrs(R3, S3); 3030 __ vmovrs(R3, S3);
3031 3031
3032 __ add(R0, R0, ShifterOperand(R1)); 3032 __ add(R0, R0, Operand(R1));
3033 __ add(R0, R0, ShifterOperand(R2)); 3033 __ add(R0, R0, Operand(R2));
3034 __ add(R0, R0, ShifterOperand(R3)); 3034 __ add(R0, R0, Operand(R3));
3035 __ bx(LR); 3035 __ bx(LR);
3036 } else { 3036 } else {
3037 __ LoadImmediate(R0, -4); 3037 __ LoadImmediate(R0, -4);
3038 __ bx(LR); 3038 __ bx(LR);
3039 } 3039 }
3040 } 3040 }
3041 3041
3042 3042
3043 ASSEMBLER_TEST_RUN(Vduph, test) { 3043 ASSEMBLER_TEST_RUN(Vduph, test) {
3044 EXPECT(test != NULL); 3044 EXPECT(test != NULL);
(...skipping 10 matching lines...) Expand all
3055 __ vmovsr(S5, R1); 3055 __ vmovsr(S5, R1);
3056 3056
3057 // Should copy 0xff to each byte of Q0. 3057 // Should copy 0xff to each byte of Q0.
3058 __ vdup(kWord, Q0, D2, 1); 3058 __ vdup(kWord, Q0, D2, 1);
3059 3059
3060 __ vmovrs(R0, S0); 3060 __ vmovrs(R0, S0);
3061 __ vmovrs(R1, S1); 3061 __ vmovrs(R1, S1);
3062 __ vmovrs(R2, S2); 3062 __ vmovrs(R2, S2);
3063 __ vmovrs(R3, S3); 3063 __ vmovrs(R3, S3);
3064 3064
3065 __ add(R0, R0, ShifterOperand(R1)); 3065 __ add(R0, R0, Operand(R1));
3066 __ add(R0, R0, ShifterOperand(R2)); 3066 __ add(R0, R0, Operand(R2));
3067 __ add(R0, R0, ShifterOperand(R3)); 3067 __ add(R0, R0, Operand(R3));
3068 __ bx(LR); 3068 __ bx(LR);
3069 } else { 3069 } else {
3070 __ LoadImmediate(R0, -4); 3070 __ LoadImmediate(R0, -4);
3071 __ bx(LR); 3071 __ bx(LR);
3072 } 3072 }
3073 } 3073 }
3074 3074
3075 3075
3076 ASSEMBLER_TEST_RUN(Vdupw, test) { 3076 ASSEMBLER_TEST_RUN(Vdupw, test) {
3077 EXPECT(test != NULL); 3077 EXPECT(test != NULL);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3109 ASSEMBLER_TEST_RUN(Vzipqw, test) { 3109 ASSEMBLER_TEST_RUN(Vzipqw, test) {
3110 EXPECT(test != NULL); 3110 EXPECT(test != NULL);
3111 typedef float (*Vzipqw)(); 3111 typedef float (*Vzipqw)();
3112 float res = EXECUTE_TEST_CODE_FLOAT(Vzipqw, test->entry()); 3112 float res = EXECUTE_TEST_CODE_FLOAT(Vzipqw, test->entry());
3113 EXPECT_FLOAT_EQ(8.0, res, 0.0001f); 3113 EXPECT_FLOAT_EQ(8.0, res, 0.0001f);
3114 } 3114 }
3115 3115
3116 3116
3117 ASSEMBLER_TEST_GENERATE(Vceqqi32, assembler) { 3117 ASSEMBLER_TEST_GENERATE(Vceqqi32, assembler) {
3118 if (TargetCPUFeatures::neon_supported()) { 3118 if (TargetCPUFeatures::neon_supported()) {
3119 __ mov(R0, ShifterOperand(1)); 3119 __ mov(R0, Operand(1));
3120 __ vmovsr(S0, R0); 3120 __ vmovsr(S0, R0);
3121 __ mov(R0, ShifterOperand(2)); 3121 __ mov(R0, Operand(2));
3122 __ vmovsr(S1, R0); 3122 __ vmovsr(S1, R0);
3123 __ mov(R0, ShifterOperand(3)); 3123 __ mov(R0, Operand(3));
3124 __ vmovsr(S2, R0); 3124 __ vmovsr(S2, R0);
3125 __ mov(R0, ShifterOperand(4)); 3125 __ mov(R0, Operand(4));
3126 __ vmovsr(S3, R0); 3126 __ vmovsr(S3, R0);
3127 __ mov(R0, ShifterOperand(1)); 3127 __ mov(R0, Operand(1));
3128 __ vmovsr(S4, R0); 3128 __ vmovsr(S4, R0);
3129 __ mov(R0, ShifterOperand(20)); 3129 __ mov(R0, Operand(20));
3130 __ vmovsr(S5, R0); 3130 __ vmovsr(S5, R0);
3131 __ mov(R0, ShifterOperand(3)); 3131 __ mov(R0, Operand(3));
3132 __ vmovsr(S6, R0); 3132 __ vmovsr(S6, R0);
3133 __ mov(R0, ShifterOperand(40)); 3133 __ mov(R0, Operand(40));
3134 __ vmovsr(S7, R0); 3134 __ vmovsr(S7, R0);
3135 3135
3136 __ vceqqi(kWord, Q2, Q1, Q0); 3136 __ vceqqi(kWord, Q2, Q1, Q0);
3137 3137
3138 __ vmovrs(R0, S8); 3138 __ vmovrs(R0, S8);
3139 __ vmovrs(R1, S9); 3139 __ vmovrs(R1, S9);
3140 __ vmovrs(R2, S10); 3140 __ vmovrs(R2, S10);
3141 __ vmovrs(R3, S11); 3141 __ vmovrs(R3, S11);
3142 3142
3143 __ add(R0, R0, ShifterOperand(R1)); 3143 __ add(R0, R0, Operand(R1));
3144 __ add(R0, R0, ShifterOperand(R2)); 3144 __ add(R0, R0, Operand(R2));
3145 __ add(R0, R0, ShifterOperand(R3)); 3145 __ add(R0, R0, Operand(R3));
3146 __ bx(LR); 3146 __ bx(LR);
3147 } else { 3147 } else {
3148 __ LoadImmediate(R0, -2); 3148 __ LoadImmediate(R0, -2);
3149 __ bx(LR); 3149 __ bx(LR);
3150 } 3150 }
3151 } 3151 }
3152 3152
3153 3153
3154 ASSEMBLER_TEST_RUN(Vceqqi32, test) { 3154 ASSEMBLER_TEST_RUN(Vceqqi32, test) {
3155 EXPECT(test != NULL); 3155 EXPECT(test != NULL);
(...skipping 13 matching lines...) Expand all
3169 __ LoadSImmediate(S6, 3.0); 3169 __ LoadSImmediate(S6, 3.0);
3170 __ LoadSImmediate(S7, 8.0); 3170 __ LoadSImmediate(S7, 8.0);
3171 3171
3172 __ vceqqs(Q2, Q1, Q0); 3172 __ vceqqs(Q2, Q1, Q0);
3173 3173
3174 __ vmovrs(R0, S8); 3174 __ vmovrs(R0, S8);
3175 __ vmovrs(R1, S9); 3175 __ vmovrs(R1, S9);
3176 __ vmovrs(R2, S10); 3176 __ vmovrs(R2, S10);
3177 __ vmovrs(R3, S11); 3177 __ vmovrs(R3, S11);
3178 3178
3179 __ add(R0, R0, ShifterOperand(R1)); 3179 __ add(R0, R0, Operand(R1));
3180 __ add(R0, R0, ShifterOperand(R2)); 3180 __ add(R0, R0, Operand(R2));
3181 __ add(R0, R0, ShifterOperand(R3)); 3181 __ add(R0, R0, Operand(R3));
3182 __ bx(LR); 3182 __ bx(LR);
3183 } else { 3183 } else {
3184 __ LoadImmediate(R0, -2); 3184 __ LoadImmediate(R0, -2);
3185 __ bx(LR); 3185 __ bx(LR);
3186 } 3186 }
3187 } 3187 }
3188 3188
3189 3189
3190 ASSEMBLER_TEST_RUN(Vceqqs, test) { 3190 ASSEMBLER_TEST_RUN(Vceqqs, test) {
3191 EXPECT(test != NULL); 3191 EXPECT(test != NULL);
3192 typedef int (*Tst)(); 3192 typedef int (*Tst)();
3193 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 3193 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
3194 } 3194 }
3195 3195
3196 3196
3197 ASSEMBLER_TEST_GENERATE(Vcgeqi32, assembler) { 3197 ASSEMBLER_TEST_GENERATE(Vcgeqi32, assembler) {
3198 if (TargetCPUFeatures::neon_supported()) { 3198 if (TargetCPUFeatures::neon_supported()) {
3199 __ mov(R0, ShifterOperand(1)); 3199 __ mov(R0, Operand(1));
3200 __ vmovsr(S0, R0); 3200 __ vmovsr(S0, R0);
3201 __ mov(R0, ShifterOperand(2)); 3201 __ mov(R0, Operand(2));
3202 __ vmovsr(S1, R0); 3202 __ vmovsr(S1, R0);
3203 __ mov(R0, ShifterOperand(3)); 3203 __ mov(R0, Operand(3));
3204 __ vmovsr(S2, R0); 3204 __ vmovsr(S2, R0);
3205 __ mov(R0, ShifterOperand(4)); 3205 __ mov(R0, Operand(4));
3206 __ vmovsr(S3, R0); 3206 __ vmovsr(S3, R0);
3207 __ mov(R0, ShifterOperand(1)); 3207 __ mov(R0, Operand(1));
3208 __ vmovsr(S4, R0); 3208 __ vmovsr(S4, R0);
3209 __ mov(R0, ShifterOperand(1)); 3209 __ mov(R0, Operand(1));
3210 __ vmovsr(S5, R0); 3210 __ vmovsr(S5, R0);
3211 __ mov(R0, ShifterOperand(3)); 3211 __ mov(R0, Operand(3));
3212 __ vmovsr(S6, R0); 3212 __ vmovsr(S6, R0);
3213 __ mov(R0, ShifterOperand(1)); 3213 __ mov(R0, Operand(1));
3214 __ vmovsr(S7, R0); 3214 __ vmovsr(S7, R0);
3215 3215
3216 __ vcgeqi(kWord, Q2, Q1, Q0); 3216 __ vcgeqi(kWord, Q2, Q1, Q0);
3217 3217
3218 __ vmovrs(R0, S8); 3218 __ vmovrs(R0, S8);
3219 __ vmovrs(R1, S9); 3219 __ vmovrs(R1, S9);
3220 __ vmovrs(R2, S10); 3220 __ vmovrs(R2, S10);
3221 __ vmovrs(R3, S11); 3221 __ vmovrs(R3, S11);
3222 3222
3223 __ add(R0, R0, ShifterOperand(R1)); 3223 __ add(R0, R0, Operand(R1));
3224 __ add(R0, R0, ShifterOperand(R2)); 3224 __ add(R0, R0, Operand(R2));
3225 __ add(R0, R0, ShifterOperand(R3)); 3225 __ add(R0, R0, Operand(R3));
3226 __ bx(LR); 3226 __ bx(LR);
3227 } else { 3227 } else {
3228 __ LoadImmediate(R0, -2); 3228 __ LoadImmediate(R0, -2);
3229 __ bx(LR); 3229 __ bx(LR);
3230 } 3230 }
3231 } 3231 }
3232 3232
3233 3233
3234 ASSEMBLER_TEST_RUN(Vcgeqi32, test) { 3234 ASSEMBLER_TEST_RUN(Vcgeqi32, test) {
3235 EXPECT(test != NULL); 3235 EXPECT(test != NULL);
3236 typedef int (*Tst)(); 3236 typedef int (*Tst)();
3237 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 3237 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
3238 } 3238 }
3239 3239
3240 3240
3241 ASSEMBLER_TEST_GENERATE(Vcugeqi32, assembler) { 3241 ASSEMBLER_TEST_GENERATE(Vcugeqi32, assembler) {
3242 if (TargetCPUFeatures::neon_supported()) { 3242 if (TargetCPUFeatures::neon_supported()) {
3243 __ mov(R0, ShifterOperand(1)); 3243 __ mov(R0, Operand(1));
3244 __ vmovsr(S0, R0); 3244 __ vmovsr(S0, R0);
3245 __ mov(R0, ShifterOperand(2)); 3245 __ mov(R0, Operand(2));
3246 __ vmovsr(S1, R0); 3246 __ vmovsr(S1, R0);
3247 __ mov(R0, ShifterOperand(3)); 3247 __ mov(R0, Operand(3));
3248 __ vmovsr(S2, R0); 3248 __ vmovsr(S2, R0);
3249 __ mov(R0, ShifterOperand(4)); 3249 __ mov(R0, Operand(4));
3250 __ vmovsr(S3, R0); 3250 __ vmovsr(S3, R0);
3251 __ LoadImmediate(R0, -1); 3251 __ LoadImmediate(R0, -1);
3252 __ vmovsr(S4, R0); 3252 __ vmovsr(S4, R0);
3253 __ mov(R0, ShifterOperand(1)); 3253 __ mov(R0, Operand(1));
3254 __ vmovsr(S5, R0); 3254 __ vmovsr(S5, R0);
3255 __ LoadImmediate(R0, -3); 3255 __ LoadImmediate(R0, -3);
3256 __ vmovsr(S6, R0); 3256 __ vmovsr(S6, R0);
3257 __ mov(R0, ShifterOperand(1)); 3257 __ mov(R0, Operand(1));
3258 __ vmovsr(S7, R0); 3258 __ vmovsr(S7, R0);
3259 3259
3260 __ vcugeqi(kWord, Q2, Q1, Q0); 3260 __ vcugeqi(kWord, Q2, Q1, Q0);
3261 3261
3262 __ vmovrs(R0, S8); 3262 __ vmovrs(R0, S8);
3263 __ vmovrs(R1, S9); 3263 __ vmovrs(R1, S9);
3264 __ vmovrs(R2, S10); 3264 __ vmovrs(R2, S10);
3265 __ vmovrs(R3, S11); 3265 __ vmovrs(R3, S11);
3266 3266
3267 __ add(R0, R0, ShifterOperand(R1)); 3267 __ add(R0, R0, Operand(R1));
3268 __ add(R0, R0, ShifterOperand(R2)); 3268 __ add(R0, R0, Operand(R2));
3269 __ add(R0, R0, ShifterOperand(R3)); 3269 __ add(R0, R0, Operand(R3));
3270 __ bx(LR); 3270 __ bx(LR);
3271 } else { 3271 } else {
3272 __ LoadImmediate(R0, -2); 3272 __ LoadImmediate(R0, -2);
3273 __ bx(LR); 3273 __ bx(LR);
3274 } 3274 }
3275 } 3275 }
3276 3276
3277 3277
3278 ASSEMBLER_TEST_RUN(Vcugeqi32, test) { 3278 ASSEMBLER_TEST_RUN(Vcugeqi32, test) {
3279 EXPECT(test != NULL); 3279 EXPECT(test != NULL);
(...skipping 13 matching lines...) Expand all
3293 __ LoadSImmediate(S6, 3.0); 3293 __ LoadSImmediate(S6, 3.0);
3294 __ LoadSImmediate(S7, 1.0); 3294 __ LoadSImmediate(S7, 1.0);
3295 3295
3296 __ vcgeqs(Q2, Q1, Q0); 3296 __ vcgeqs(Q2, Q1, Q0);
3297 3297
3298 __ vmovrs(R0, S8); 3298 __ vmovrs(R0, S8);
3299 __ vmovrs(R1, S9); 3299 __ vmovrs(R1, S9);
3300 __ vmovrs(R2, S10); 3300 __ vmovrs(R2, S10);
3301 __ vmovrs(R3, S11); 3301 __ vmovrs(R3, S11);
3302 3302
3303 __ add(R0, R0, ShifterOperand(R1)); 3303 __ add(R0, R0, Operand(R1));
3304 __ add(R0, R0, ShifterOperand(R2)); 3304 __ add(R0, R0, Operand(R2));
3305 __ add(R0, R0, ShifterOperand(R3)); 3305 __ add(R0, R0, Operand(R3));
3306 __ bx(LR); 3306 __ bx(LR);
3307 } else { 3307 } else {
3308 __ LoadImmediate(R0, -2); 3308 __ LoadImmediate(R0, -2);
3309 __ bx(LR); 3309 __ bx(LR);
3310 } 3310 }
3311 } 3311 }
3312 3312
3313 3313
3314 ASSEMBLER_TEST_RUN(Vcgeqs, test) { 3314 ASSEMBLER_TEST_RUN(Vcgeqs, test) {
3315 EXPECT(test != NULL); 3315 EXPECT(test != NULL);
3316 typedef int (*Tst)(); 3316 typedef int (*Tst)();
3317 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 3317 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
3318 } 3318 }
3319 3319
3320 3320
3321 ASSEMBLER_TEST_GENERATE(Vcgtqi32, assembler) { 3321 ASSEMBLER_TEST_GENERATE(Vcgtqi32, assembler) {
3322 if (TargetCPUFeatures::neon_supported()) { 3322 if (TargetCPUFeatures::neon_supported()) {
3323 __ mov(R0, ShifterOperand(1)); 3323 __ mov(R0, Operand(1));
3324 __ vmovsr(S0, R0); 3324 __ vmovsr(S0, R0);
3325 __ mov(R0, ShifterOperand(2)); 3325 __ mov(R0, Operand(2));
3326 __ vmovsr(S1, R0); 3326 __ vmovsr(S1, R0);
3327 __ mov(R0, ShifterOperand(3)); 3327 __ mov(R0, Operand(3));
3328 __ vmovsr(S2, R0); 3328 __ vmovsr(S2, R0);
3329 __ mov(R0, ShifterOperand(4)); 3329 __ mov(R0, Operand(4));
3330 __ vmovsr(S3, R0); 3330 __ vmovsr(S3, R0);
3331 __ mov(R0, ShifterOperand(2)); 3331 __ mov(R0, Operand(2));
3332 __ vmovsr(S4, R0); 3332 __ vmovsr(S4, R0);
3333 __ mov(R0, ShifterOperand(1)); 3333 __ mov(R0, Operand(1));
3334 __ vmovsr(S5, R0); 3334 __ vmovsr(S5, R0);
3335 __ mov(R0, ShifterOperand(4)); 3335 __ mov(R0, Operand(4));
3336 __ vmovsr(S6, R0); 3336 __ vmovsr(S6, R0);
3337 __ mov(R0, ShifterOperand(1)); 3337 __ mov(R0, Operand(1));
3338 __ vmovsr(S7, R0); 3338 __ vmovsr(S7, R0);
3339 3339
3340 __ vcgtqi(kWord, Q2, Q1, Q0); 3340 __ vcgtqi(kWord, Q2, Q1, Q0);
3341 3341
3342 __ vmovrs(R0, S8); 3342 __ vmovrs(R0, S8);
3343 __ vmovrs(R1, S9); 3343 __ vmovrs(R1, S9);
3344 __ vmovrs(R2, S10); 3344 __ vmovrs(R2, S10);
3345 __ vmovrs(R3, S11); 3345 __ vmovrs(R3, S11);
3346 3346
3347 __ add(R0, R0, ShifterOperand(R1)); 3347 __ add(R0, R0, Operand(R1));
3348 __ add(R0, R0, ShifterOperand(R2)); 3348 __ add(R0, R0, Operand(R2));
3349 __ add(R0, R0, ShifterOperand(R3)); 3349 __ add(R0, R0, Operand(R3));
3350 __ bx(LR); 3350 __ bx(LR);
3351 } else { 3351 } else {
3352 __ LoadImmediate(R0, -2); 3352 __ LoadImmediate(R0, -2);
3353 __ bx(LR); 3353 __ bx(LR);
3354 } 3354 }
3355 } 3355 }
3356 3356
3357 3357
3358 ASSEMBLER_TEST_RUN(Vcgtqi32, test) { 3358 ASSEMBLER_TEST_RUN(Vcgtqi32, test) {
3359 EXPECT(test != NULL); 3359 EXPECT(test != NULL);
3360 typedef int (*Tst)(); 3360 typedef int (*Tst)();
3361 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 3361 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
3362 } 3362 }
3363 3363
3364 3364
3365 ASSEMBLER_TEST_GENERATE(Vcugtqi32, assembler) { 3365 ASSEMBLER_TEST_GENERATE(Vcugtqi32, assembler) {
3366 if (TargetCPUFeatures::neon_supported()) { 3366 if (TargetCPUFeatures::neon_supported()) {
3367 __ mov(R0, ShifterOperand(1)); 3367 __ mov(R0, Operand(1));
3368 __ vmovsr(S0, R0); 3368 __ vmovsr(S0, R0);
3369 __ mov(R0, ShifterOperand(2)); 3369 __ mov(R0, Operand(2));
3370 __ vmovsr(S1, R0); 3370 __ vmovsr(S1, R0);
3371 __ mov(R0, ShifterOperand(3)); 3371 __ mov(R0, Operand(3));
3372 __ vmovsr(S2, R0); 3372 __ vmovsr(S2, R0);
3373 __ mov(R0, ShifterOperand(4)); 3373 __ mov(R0, Operand(4));
3374 __ vmovsr(S3, R0); 3374 __ vmovsr(S3, R0);
3375 __ LoadImmediate(R0, -1); 3375 __ LoadImmediate(R0, -1);
3376 __ vmovsr(S4, R0); 3376 __ vmovsr(S4, R0);
3377 __ mov(R0, ShifterOperand(1)); 3377 __ mov(R0, Operand(1));
3378 __ vmovsr(S5, R0); 3378 __ vmovsr(S5, R0);
3379 __ LoadImmediate(R0, -3); 3379 __ LoadImmediate(R0, -3);
3380 __ vmovsr(S6, R0); 3380 __ vmovsr(S6, R0);
3381 __ mov(R0, ShifterOperand(1)); 3381 __ mov(R0, Operand(1));
3382 __ vmovsr(S7, R0); 3382 __ vmovsr(S7, R0);
3383 3383
3384 __ vcugtqi(kWord, Q2, Q1, Q0); 3384 __ vcugtqi(kWord, Q2, Q1, Q0);
3385 3385
3386 __ vmovrs(R0, S8); 3386 __ vmovrs(R0, S8);
3387 __ vmovrs(R1, S9); 3387 __ vmovrs(R1, S9);
3388 __ vmovrs(R2, S10); 3388 __ vmovrs(R2, S10);
3389 __ vmovrs(R3, S11); 3389 __ vmovrs(R3, S11);
3390 3390
3391 __ add(R0, R0, ShifterOperand(R1)); 3391 __ add(R0, R0, Operand(R1));
3392 __ add(R0, R0, ShifterOperand(R2)); 3392 __ add(R0, R0, Operand(R2));
3393 __ add(R0, R0, ShifterOperand(R3)); 3393 __ add(R0, R0, Operand(R3));
3394 __ bx(LR); 3394 __ bx(LR);
3395 } else { 3395 } else {
3396 __ LoadImmediate(R0, -2); 3396 __ LoadImmediate(R0, -2);
3397 __ bx(LR); 3397 __ bx(LR);
3398 } 3398 }
3399 } 3399 }
3400 3400
3401 3401
3402 ASSEMBLER_TEST_RUN(Vcugtqi32, test) { 3402 ASSEMBLER_TEST_RUN(Vcugtqi32, test) {
3403 EXPECT(test != NULL); 3403 EXPECT(test != NULL);
(...skipping 13 matching lines...) Expand all
3417 __ LoadSImmediate(S6, 4.0); 3417 __ LoadSImmediate(S6, 4.0);
3418 __ LoadSImmediate(S7, 1.0); 3418 __ LoadSImmediate(S7, 1.0);
3419 3419
3420 __ vcgtqs(Q2, Q1, Q0); 3420 __ vcgtqs(Q2, Q1, Q0);
3421 3421
3422 __ vmovrs(R0, S8); 3422 __ vmovrs(R0, S8);
3423 __ vmovrs(R1, S9); 3423 __ vmovrs(R1, S9);
3424 __ vmovrs(R2, S10); 3424 __ vmovrs(R2, S10);
3425 __ vmovrs(R3, S11); 3425 __ vmovrs(R3, S11);
3426 3426
3427 __ add(R0, R0, ShifterOperand(R1)); 3427 __ add(R0, R0, Operand(R1));
3428 __ add(R0, R0, ShifterOperand(R2)); 3428 __ add(R0, R0, Operand(R2));
3429 __ add(R0, R0, ShifterOperand(R3)); 3429 __ add(R0, R0, Operand(R3));
3430 __ bx(LR); 3430 __ bx(LR);
3431 } else { 3431 } else {
3432 __ LoadImmediate(R0, -2); 3432 __ LoadImmediate(R0, -2);
3433 __ bx(LR); 3433 __ bx(LR);
3434 } 3434 }
3435 } 3435 }
3436 3436
3437 3437
3438 ASSEMBLER_TEST_RUN(Vcgtqs, test) { 3438 ASSEMBLER_TEST_RUN(Vcgtqs, test) {
3439 EXPECT(test != NULL); 3439 EXPECT(test != NULL);
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
4061 } 4061 }
4062 4062
4063 4063
4064 // Called from assembler_test.cc. 4064 // Called from assembler_test.cc.
4065 // LR: return address. 4065 // LR: return address.
4066 // R0: context. 4066 // R0: context.
4067 // R1: value. 4067 // R1: value.
4068 // R2: growable array. 4068 // R2: growable array.
4069 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { 4069 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
4070 __ PushList((1 << CTX) | (1 << LR)); 4070 __ PushList((1 << CTX) | (1 << LR));
4071 __ mov(CTX, ShifterOperand(R0)); 4071 __ mov(CTX, Operand(R0));
4072 __ StoreIntoObject(R2, 4072 __ StoreIntoObject(R2,
4073 FieldAddress(R2, GrowableObjectArray::data_offset()), 4073 FieldAddress(R2, GrowableObjectArray::data_offset()),
4074 R1); 4074 R1);
4075 __ PopList((1 << CTX) | (1 << LR)); 4075 __ PopList((1 << CTX) | (1 << LR));
4076 __ Ret(); 4076 __ Ret();
4077 } 4077 }
4078 4078
4079 } // namespace dart 4079 } // namespace dart
4080 4080
4081 #endif // defined TARGET_ARCH_ARM 4081 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698