Remove an ARM jump elimination test.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
deanm@chromium.org 2008-09-30 10:20:58 +00:00
parent b4a40eb22f
commit 7b0ab87baf

View File

@ -212,55 +212,4 @@ TEST(3) {
}
TEST(4) {
InitializeVM();
v8::HandleScope scope;
// enable jump elimination
bool je_save = FLAG_eliminate_jumps;
bool pje_save = FLAG_print_jump_elimination;
FLAG_eliminate_jumps = true;
FLAG_print_jump_elimination = true;
Assembler assm(NULL, 0);
Label L0, L1, L2, L3;
__ mov(r1, Operand(r0));
__ mov(r0, Operand(1));
__ b(&L0); // can be eliminated
__ bind(&L0);
__ b(&L2);
__ bind(&L1);
__ mul(r0, r1, r0);
__ sub(r1, r1, Operand(1));
__ bind(&L2);
__ teq(r1, Operand(0));
__ b(ne, &L3); // can be replaced by bne L1
__ mov(pc, Operand(lr));
__ bind(&L3);
__ b(&L1);
CodeDesc desc;
assm.GetCode(&desc);
// restore jump elimination flags
FLAG_eliminate_jumps = je_save;
FLAG_print_jump_elimination = pje_save;
Object* code = Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB));
CHECK(code->IsCode());
#ifdef DEBUG
Code::cast(code)->Print();
#endif
F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry());
int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 10, 0, 0, 0, 0));
::printf("f() = %d\n", res);
CHECK_EQ(3628800, res);
}
#undef __