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

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

Issue 131333011: A64: When truncating to an int, store the result in a 64bit register (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: updates Created 6 years, 10 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/a64/macro-assembler-a64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 9334 matching lines...) Expand 10 before | Expand all | Expand 10 after
9345 TEARDOWN(); 9345 TEARDOWN();
9346 } 9346 }
9347 9347
9348 9348
9349 static void ECMA262ToInt32Helper(int32_t expected, double input) { 9349 static void ECMA262ToInt32Helper(int32_t expected, double input) {
9350 SETUP(); 9350 SETUP();
9351 START(); 9351 START();
9352 9352
9353 __ Fmov(d0, input); 9353 __ Fmov(d0, input);
9354 9354
9355 __ ECMA262ToInt32(x0, d0, x10, x11, MacroAssembler::INT32_IN_W); 9355 __ ECMA262ToInt32(x1, d0, x10, x11, MacroAssembler::INT32);
9356 __ ECMA262ToInt32(x1, d0, x10, x11, MacroAssembler::INT32_IN_X);
9357 __ ECMA262ToInt32(x2, d0, x10, x11, MacroAssembler::SMI); 9356 __ ECMA262ToInt32(x2, d0, x10, x11, MacroAssembler::SMI);
9358 9357
9359 // The upper bits of INT32_IN_W are undefined, so make sure we don't try to
9360 // test them.
9361 __ Mov(w0, w0);
9362
9363 END(); 9358 END();
9364 9359
9365 RUN(); 9360 RUN();
9366 9361
9367 int64_t expected64 = expected; 9362 int64_t expected64 = expected;
9368 9363
9369 ASSERT_EQUAL_32(expected, w0);
9370 ASSERT_EQUAL_64(expected64, x1); 9364 ASSERT_EQUAL_64(expected64, x1);
9371 ASSERT_EQUAL_64(expected64 << kSmiShift | kSmiTag, x2); 9365 ASSERT_EQUAL_64(expected64 << kSmiShift | kSmiTag, x2);
9372 9366
9373 TEARDOWN(); 9367 TEARDOWN();
9374 } 9368 }
9375 9369
9376 9370
9377 TEST(ecma_262_to_int32) { 9371 TEST(ecma_262_to_int32) {
9378 INIT_V8(); 9372 INIT_V8();
9379 // ==== exponent < 64 ==== 9373 // ==== exponent < 64 ====
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
9566 AbsHelperX(-42); 9560 AbsHelperX(-42);
9567 AbsHelperX(kXMinInt); 9561 AbsHelperX(kXMinInt);
9568 AbsHelperX(kXMaxInt); 9562 AbsHelperX(kXMaxInt);
9569 9563
9570 AbsHelperW(0); 9564 AbsHelperW(0);
9571 AbsHelperW(42); 9565 AbsHelperW(42);
9572 AbsHelperW(-42); 9566 AbsHelperW(-42);
9573 AbsHelperW(kWMinInt); 9567 AbsHelperW(kWMinInt);
9574 AbsHelperW(kWMaxInt); 9568 AbsHelperW(kWMaxInt);
9575 } 9569 }
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698