Commit 9cc5b94c authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Correctly handle the constant pool in constant pool splitting test

The constant pool was not taken into account in the test test-compiler/SplitConstantsInFullCompiler which caused random failures.

This also reverts the test code added in r8469 and r8471.

R=ricow@chromium.org

BUG=none
TEST=test-compiler/SplitConstantsInFullCompiler

Review URL: http://codereview.chromium.org//7308001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4f1e60cc
...@@ -992,7 +992,6 @@ void Decoder::DecodeType3(Instruction* instr) { ...@@ -992,7 +992,6 @@ void Decoder::DecodeType3(Instruction* instr) {
Format(instr, "bfi'cond 'rd, 'rm, 'f"); Format(instr, "bfi'cond 'rd, 'rm, 'f");
} }
} else { } else {
PrintF("%08x\n", instr->InstructionBits());
UNREACHABLE(); UNREACHABLE();
} }
} else { } else {
......
...@@ -367,9 +367,6 @@ static void CheckCodeForUnsafeLiteral(Handle<JSFunction> f) { ...@@ -367,9 +367,6 @@ static void CheckCodeForUnsafeLiteral(Handle<JSFunction> f) {
disasm::Disassembler d(name_converter); disasm::Disassembler d(name_converter);
if (f->code()->kind() == Code::FUNCTION) { if (f->code()->kind() == Code::FUNCTION) {
#ifdef DEBUG
f->code()->PrintLn();
#endif
Address pc = f->code()->instruction_start(); Address pc = f->code()->instruction_start();
int decode_size = int decode_size =
Min(f->code()->instruction_size(), Min(f->code()->instruction_size(),
...@@ -378,14 +375,17 @@ static void CheckCodeForUnsafeLiteral(Handle<JSFunction> f) { ...@@ -378,14 +375,17 @@ static void CheckCodeForUnsafeLiteral(Handle<JSFunction> f) {
v8::internal::EmbeddedVector<char, 128> decode_buffer; v8::internal::EmbeddedVector<char, 128> decode_buffer;
while (pc < end) { while (pc < end) {
PrintF("%08x\n", int num_const = d.ConstantPoolSizeAt(pc);
static_cast<unsigned int>(reinterpret_cast<intptr_t>(pc))); if (num_const >= 0) {
pc += num_const * kPointerSize;
} else {
pc += d.InstructionDecode(decode_buffer, pc); pc += d.InstructionDecode(decode_buffer, pc);
CHECK(strstr(decode_buffer.start(), "mov eax,0x178c29c") == NULL); CHECK(strstr(decode_buffer.start(), "mov eax,0x178c29c") == NULL);
CHECK(strstr(decode_buffer.start(), "push 0x178c29c") == NULL); CHECK(strstr(decode_buffer.start(), "push 0x178c29c") == NULL);
CHECK(strstr(decode_buffer.start(), "0x178c29c") == NULL); CHECK(strstr(decode_buffer.start(), "0x178c29c") == NULL);
} }
} }
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment