Revision: 6195
Author: [email protected]
Date: Thu Jan  6 02:56:23 2011
Log: ARM: Fix a bug in the lithium arguments support

Got the comparison wrong and fortot to actually set the flags.
Review URL: http://codereview.chromium.org/6085010
http://code.google.com/p/v8/source/detail?r=6195

Modified:
 /branches/bleeding_edge/src/arm/code-stubs-arm.cc
 /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc

=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Wed Jan 5 04:01:53 2011 +++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Thu Jan 6 02:56:23 2011
@@ -3016,7 +3016,7 @@
   // through register r0. Use unsigned comparison to get negative
   // check for free.
   __ cmp(r1, r0);
-  __ b(cs, &slow);
+  __ b(hs, &slow);

   // Read the argument from the stack and return it.
   __ sub(r3, r0, r1);
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Thu Jan 6 00:56:29 2011 +++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Thu Jan 6 02:56:23 2011
@@ -1593,8 +1593,10 @@
   Operand index = ToOperand(instr->index());
   Register result = ToRegister(instr->result());

-  __ sub(length, length, index);
-  DeoptimizeIf(hi, instr->environment());
+  // Bailout index is not a valid argument index. Use unsigned check to get
+  // negative check for free.
+  __ sub(length, length, index, SetCC);
+  DeoptimizeIf(ls, instr->environment());

   // There are two words between the frame pointer and the last argument.
   // Subtracting from length accounts for one of them add one more.

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

Reply via email to