Reviewers: Rico,

Description:
X64 Crankshaft: Remove relative jump to deoptimization code.  Fixes logical
error, and compilation error on Windows.

Please review this at http://codereview.chromium.org/6310018/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/x64/assembler-x64.h
  M     src/x64/assembler-x64.cc
  M     src/x64/lithium-codegen-x64.cc


Index: src/x64/assembler-x64.cc
===================================================================
--- src/x64/assembler-x64.cc    (revision 6488)
+++ src/x64/assembler-x64.cc    (working copy)
@@ -1306,18 +1306,6 @@
 }


-void Assembler::j(Condition cc, byte* entry, RelocInfo::Mode rmode) {
-  EnsureSpace ensure_space(this);
-  RecordRelocInfo(rmode);
-  last_pc_ = pc_;
-  ASSERT((0 <= cc) && (cc < 16));
-  // 0000 1111 1000 tttn #32-bit disp.
-  emit(0x0F);
-  emit(0x80 | cc);
-  emit(entry - (pc_ + sizeof(intptr_t)));
-}
-
-
 void Assembler::jmp(Label* L) {
   EnsureSpace ensure_space(this);
   last_pc_ = pc_;
Index: src/x64/assembler-x64.h
===================================================================
--- src/x64/assembler-x64.h     (revision 6488)
+++ src/x64/assembler-x64.h     (working copy)
@@ -1134,7 +1134,6 @@

   // Conditional jumps
   void j(Condition cc, Label* L);
-  void j(Condition cc, byte* entry, RelocInfo::Mode rmode);
   void j(Condition cc, Handle<Code> target, RelocInfo::Mode rmode);

   // Conditional short jump
Index: src/x64/lithium-codegen-x64.cc
===================================================================
--- src/x64/lithium-codegen-x64.cc      (revision 6488)
+++ src/x64/lithium-codegen-x64.cc      (working copy)
@@ -429,7 +429,10 @@
   if (cc == no_condition) {
     __ Jump(entry, RelocInfo::RUNTIME_ENTRY);
   } else {
-    __ j(cc, entry, RelocInfo::RUNTIME_ENTRY);
+    NearLabel done;
+    __ j(NegateCondition(cc), &done);
+    __ Jump(entry, RelocInfo::RUNTIME_ENTRY);
+    __ bind(&done);
   }
 }



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

Reply via email to