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

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

Issue 12319113: Emit VMLS for multiply-subtract on ARM. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address Ulan's commen Created 7 years, 9 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 | « src/arm/simulator-arm.cc ('k') | test/cctest/test-disasm-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); 258 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit());
259 __ sub(fp, ip, Operand(4)); 259 __ sub(fp, ip, Operand(4));
260 260
261 __ mov(r4, Operand(r0)); 261 __ mov(r4, Operand(r0));
262 __ vldr(d6, r4, OFFSET_OF(T, a)); 262 __ vldr(d6, r4, OFFSET_OF(T, a));
263 __ vldr(d7, r4, OFFSET_OF(T, b)); 263 __ vldr(d7, r4, OFFSET_OF(T, b));
264 __ vadd(d5, d6, d7); 264 __ vadd(d5, d6, d7);
265 __ vstr(d5, r4, OFFSET_OF(T, c)); 265 __ vstr(d5, r4, OFFSET_OF(T, c));
266 266
267 __ vmla(d5, d6, d7); 267 __ vmla(d5, d6, d7);
268 __ vmls(d5, d5, d6);
268 269
269 __ vmov(r2, r3, d5); 270 __ vmov(r2, r3, d5);
270 __ vmov(d4, r2, r3); 271 __ vmov(d4, r2, r3);
271 __ vstr(d4, r4, OFFSET_OF(T, b)); 272 __ vstr(d4, r4, OFFSET_OF(T, b));
272 273
273 // Load t.x and t.y, switch values, and store back to the struct. 274 // Load t.x and t.y, switch values, and store back to the struct.
274 __ vldr(s0, r4, OFFSET_OF(T, x)); 275 __ vldr(s0, r4, OFFSET_OF(T, x));
275 __ vldr(s31, r4, OFFSET_OF(T, y)); 276 __ vldr(s31, r4, OFFSET_OF(T, y));
276 __ vmov(s16, s0); 277 __ vmov(s16, s0);
277 __ vmov(s0, s31); 278 __ vmov(s0, s31);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 CHECK_EQ(9.0, t.x); 348 CHECK_EQ(9.0, t.x);
348 CHECK_EQ(-123.456, t.n); 349 CHECK_EQ(-123.456, t.n);
349 CHECK_EQ(2718.2818, t.m); 350 CHECK_EQ(2718.2818, t.m);
350 CHECK_EQ(2, t.i); 351 CHECK_EQ(2, t.i);
351 CHECK_EQ(2718.2818, t.g); 352 CHECK_EQ(2718.2818, t.g);
352 CHECK_EQ(31415926.5, t.h); 353 CHECK_EQ(31415926.5, t.h);
353 CHECK_EQ(42.0, t.f); 354 CHECK_EQ(42.0, t.f);
354 CHECK_EQ(1.0, t.e); 355 CHECK_EQ(1.0, t.e);
355 CHECK_EQ(1.000000059604644775390625, t.d); 356 CHECK_EQ(1.000000059604644775390625, t.d);
356 CHECK_EQ(4.25, t.c); 357 CHECK_EQ(4.25, t.c);
357 CHECK_EQ(8.375, t.b); 358 CHECK_EQ(-4.1875, t.b);
358 CHECK_EQ(1.5, t.a); 359 CHECK_EQ(1.5, t.a);
359 } 360 }
360 } 361 }
361 362
362 363
363 TEST(5) { 364 TEST(5) {
364 // Test the ARMv7 bitfield instructions. 365 // Test the ARMv7 bitfield instructions.
365 InitializeVM(); 366 InitializeVM();
366 v8::HandleScope scope; 367 v8::HandleScope scope;
367 368
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 CHECK_EQ(2.75, t.x); 1152 CHECK_EQ(2.75, t.x);
1152 CHECK_EQ(1.5, t.y); 1153 CHECK_EQ(1.5, t.y);
1153 CHECK_EQ(17.0, t.z); 1154 CHECK_EQ(17.0, t.z);
1154 CHECK_EQ(14.7610017472335499, t.i); 1155 CHECK_EQ(14.7610017472335499, t.i);
1155 CHECK_EQ(16.0, t.j); 1156 CHECK_EQ(16.0, t.j);
1156 CHECK_EQ(73.8818412254460241, t.k); 1157 CHECK_EQ(73.8818412254460241, t.k);
1157 } 1158 }
1158 } 1159 }
1159 1160
1160 #undef __ 1161 #undef __
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698