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

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

Issue 2026633004: [x64] Fix invalid REX prefix for pslld, psrld and friends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/assembler-x64-inl.h ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 #endif 2289 #endif
2290 2290
2291 F1 f = FUNCTION_CAST<F1>(code->entry()); 2291 F1 f = FUNCTION_CAST<F1>(code->entry());
2292 for (int i = 0; i < kNumCases; ++i) { 2292 for (int i = 0; i < kNumCases; ++i) {
2293 int res = f(i); 2293 int res = f(i);
2294 PrintF("f(%d) = %d\n", i, res); 2294 PrintF("f(%d) = %d\n", i, res);
2295 CHECK_EQ(values[i], res); 2295 CHECK_EQ(values[i], res);
2296 } 2296 }
2297 } 2297 }
2298 2298
2299 TEST(AssemblerX64PslldWithXmm15) {
2300 CcTest::InitializeVM();
2301 // Allocate an executable page of memory.
2302 size_t actual_size;
2303 byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
2304 Assembler::kMinimalBufferSize, &actual_size, true));
2305 CHECK(buffer);
2306 Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
2307
2308 __ movq(xmm15, arg1);
2309 __ pslld(xmm15, 1);
2310 __ movq(rax, xmm15);
2311 __ ret(0);
2312
2313 CodeDesc desc;
2314 assm.GetCode(&desc);
2315 uint64_t result = FUNCTION_CAST<F5>(buffer)(V8_UINT64_C(0x1122334455667788));
2316 CHECK_EQ(V8_UINT64_C(0x22446688aaccef10), result);
2317 }
2318
2299 #undef __ 2319 #undef __
OLDNEW
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698