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

Unified Diff: test/cctest/test-assembler-x64.cc

Issue 2655213003: [x64] Do not compact constants with attached reloc info. (Closed)
Patch Set: Add a cctest Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-x64.cc
diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc
index 55186571621f66d92b66418d27afcb54f8739377..0ea854d7fe8633461b6bcd235ab261a1431814f5 100644
--- a/test/cctest/test-assembler-x64.cc
+++ b/test/cctest/test-assembler-x64.cc
@@ -173,6 +173,22 @@ TEST(AssemblerX64CmpbOperation) {
CHECK_EQ(0, result);
}
+TEST(Regression684407) {
+ CcTest::InitializeVM();
+ // Allocate an executable page of memory.
+ size_t actual_size;
+ byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
+ Assembler::kMinimalBufferSize, &actual_size, true));
+ CHECK(buffer);
+ Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+ Address before = assm.pc();
+ __ cmpl(Operand(arg1, 0),
+ Immediate(0, RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ Address after = assm.pc();
+ size_t instruction_size = static_cast<size_t>(after - before);
+ // Check that the immediate is not encoded as uint8.
+ CHECK_LT(sizeof(uint32_t), instruction_size);
+}
TEST(AssemblerX64ImulOperation) {
CcTest::InitializeVM();
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698