Revision: 9079
Author:   [email protected]
Date:     Wed Aug 31 02:42:28 2011
Log:      MIPS: small test-case fix for chaining of fixup position.

Add nops to the branch-delay slots of the 'beq' and 'bne' instructions
used in the test-case. Having a branch instruction in the branch-delay-slot
of another branch is undefined on mips.

In regular code we avoid this by using the Branch() macro-instruction which
fills the branch-delay-slot with nop() automatically, unless the programmer
asks to use it (via USE_BRANCH_DELAY).

There is more info about branch-delay-slots on this page, and in the ISA
reference also on the page:

https://github.com/paul99/v8m-rb/wiki/MIPS-instruction-set-and-v8

BUG=
TEST=
Review URL: http://codereview.chromium.org/7812019
http://code.google.com/p/v8/source/detail?r=9079

Modified:
 /branches/bleeding_edge/test/cctest/test-assembler-mips.cc

=======================================
--- /branches/bleeding_edge/test/cctest/test-assembler-mips.cc Tue Aug 30 00:36:31 2011 +++ /branches/bleeding_edge/test/cctest/test-assembler-mips.cc Wed Aug 31 02:42:28 2011
@@ -1268,7 +1268,9 @@

   Label target;
   __ beq(v0, v1, &target);
+  __ nop();
   __ bne(v0, v1, &target);
+  __ nop();
   __ bind(&target);
   __ nop();
 }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to