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

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

Issue 11293061: Emit VMLA for multiply-add on ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 1 month 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 __ mov(ip, Operand(sp)); 252 __ mov(ip, Operand(sp));
253 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); 253 __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit());
254 __ sub(fp, ip, Operand(4)); 254 __ sub(fp, ip, Operand(4));
255 255
256 __ mov(r4, Operand(r0)); 256 __ mov(r4, Operand(r0));
257 __ vldr(d6, r4, OFFSET_OF(T, a)); 257 __ vldr(d6, r4, OFFSET_OF(T, a));
258 __ vldr(d7, r4, OFFSET_OF(T, b)); 258 __ vldr(d7, r4, OFFSET_OF(T, b));
259 __ vadd(d5, d6, d7); 259 __ vadd(d5, d6, d7);
260 __ vstr(d5, r4, OFFSET_OF(T, c)); 260 __ vstr(d5, r4, OFFSET_OF(T, c));
261 261
262 __ vmla(d5, d6, d7);
263
262 __ vmov(r2, r3, d5); 264 __ vmov(r2, r3, d5);
263 __ vmov(d4, r2, r3); 265 __ vmov(d4, r2, r3);
264 __ vstr(d4, r4, OFFSET_OF(T, b)); 266 __ vstr(d4, r4, OFFSET_OF(T, b));
265 267
266 // Load t.x and t.y, switch values, and store back to the struct. 268 // Load t.x and t.y, switch values, and store back to the struct.
267 __ vldr(s0, r4, OFFSET_OF(T, x)); 269 __ vldr(s0, r4, OFFSET_OF(T, x));
268 __ vldr(s31, r4, OFFSET_OF(T, y)); 270 __ vldr(s31, r4, OFFSET_OF(T, y));
269 __ vmov(s16, s0); 271 __ vmov(s16, s0);
270 __ vmov(s0, s31); 272 __ vmov(s0, s31);
271 __ vmov(s31, s16); 273 __ vmov(s31, s16);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 CHECK_EQ(9.0, t.x); 342 CHECK_EQ(9.0, t.x);
341 CHECK_EQ(-123.456, t.n); 343 CHECK_EQ(-123.456, t.n);
342 CHECK_EQ(2718.2818, t.m); 344 CHECK_EQ(2718.2818, t.m);
343 CHECK_EQ(2, t.i); 345 CHECK_EQ(2, t.i);
344 CHECK_EQ(2718.2818, t.g); 346 CHECK_EQ(2718.2818, t.g);
345 CHECK_EQ(31415926.5, t.h); 347 CHECK_EQ(31415926.5, t.h);
346 CHECK_EQ(42.0, t.f); 348 CHECK_EQ(42.0, t.f);
347 CHECK_EQ(1.0, t.e); 349 CHECK_EQ(1.0, t.e);
348 CHECK_EQ(1.000000059604644775390625, t.d); 350 CHECK_EQ(1.000000059604644775390625, t.d);
349 CHECK_EQ(4.25, t.c); 351 CHECK_EQ(4.25, t.c);
350 CHECK_EQ(4.25, t.b); 352 CHECK_EQ(8.375, t.b);
351 CHECK_EQ(1.5, t.a); 353 CHECK_EQ(1.5, t.a);
352 } 354 }
353 } 355 }
354 356
355 357
356 TEST(5) { 358 TEST(5) {
357 // Test the ARMv7 bitfield instructions. 359 // Test the ARMv7 bitfield instructions.
358 InitializeVM(); 360 InitializeVM();
359 v8::HandleScope scope; 361 v8::HandleScope scope;
360 362
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 Assembler assm(Isolate::Current(), NULL, 0); 1020 Assembler assm(Isolate::Current(), NULL, 0);
1019 1021
1020 Label target; 1022 Label target;
1021 __ b(eq, &target); 1023 __ b(eq, &target);
1022 __ b(ne, &target); 1024 __ b(ne, &target);
1023 __ bind(&target); 1025 __ bind(&target);
1024 __ nop(); 1026 __ nop();
1025 } 1027 }
1026 1028
1027 #undef __ 1029 #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