X64 Crankshaft: Remove relative jump to deoptimization code. Fixes logical error...
authorwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Jan 2011 13:24:19 +0000 (13:24 +0000)
committerwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Jan 2011 13:24:19 +0000 (13:24 +0000)
Review URL: http://codereview.chromium.org/6310018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/x64/assembler-x64.cc
src/x64/assembler-x64.h
src/x64/lithium-codegen-x64.cc

index 6a5ec615b1f753b2f400042b4c81a2399a4f270f..999306e37892a434ec19b4e7efb343922d1bb132 100644 (file)
@@ -1306,18 +1306,6 @@ void Assembler::j(Condition cc, NearLabel* L, Hint hint) {
 }
 
 
-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 9d4694b04209b07864975a18ef8c8b8244311238..29817a3161dd3afe6922ccfa0d5503de622eff2f 100644 (file)
@@ -1134,7 +1134,6 @@ class Assembler : public Malloced {
 
   // 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 14c6acbf6ea80488c3ffa483ae6aa94483a72fa2..f04654532bfbcd70df33717c22e3c5845d1eeec1 100644 (file)
@@ -429,7 +429,10 @@ void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) {
   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);
   }
 }