Author: [EMAIL PROTECTED]
Date: Tue Nov  4 06:00:35 2008
New Revision: 689

Modified:
    branches/bleeding_edge/src/assembler-ia32.cc
    branches/bleeding_edge/src/assembler-ia32.h

Log:
Remove duplicated code, the two emit_operand were basically identical.

Modified: branches/bleeding_edge/src/assembler-ia32.cc
==============================================================================
--- branches/bleeding_edge/src/assembler-ia32.cc        (original)
+++ branches/bleeding_edge/src/assembler-ia32.cc        Tue Nov  4 06:00:35 2008
@@ -781,7 +781,7 @@
    EnsureSpace ensure_space(this);
    last_pc_ = pc_;
    EMIT(0x21);
-  emit_operand(dst, src);
+  emit_operand(src, dst);
  }


@@ -949,7 +949,7 @@
    EnsureSpace ensure_space(this);
    last_pc_ = pc_;
    EMIT(0x09);
-  emit_operand(dst, src);
+  emit_operand(src, dst);
  }


@@ -1077,7 +1077,7 @@
    EnsureSpace ensure_space(this);
    last_pc_ = pc_;
    EMIT(0x29);
-  emit_operand(dst, src);
+  emit_operand(src, dst);
  }


@@ -2006,18 +2006,6 @@


  void Assembler::emit_operand(Register reg, const Operand& adr) {
-  adr.set_reg(reg);
-  memmove(pc_, adr.buf_, adr.len_);
-  pc_ += adr.len_;
-  if (adr.len_ >= sizeof(int32_t) && adr.rmode_ != RelocInfo::NONE) {
-    pc_ -= sizeof(int32_t);  // pc_ must be *at* disp32
-    RecordRelocInfo(adr.rmode_);
-    pc_ += sizeof(int32_t);
-  }
-}
-
-
-void Assembler::emit_operand(const Operand& adr, Register reg) {
    adr.set_reg(reg);
    memmove(pc_, adr.buf_, adr.len_);
    pc_ += adr.len_;

Modified: branches/bleeding_edge/src/assembler-ia32.h
==============================================================================
--- branches/bleeding_edge/src/assembler-ia32.h (original)
+++ branches/bleeding_edge/src/assembler-ia32.h Tue Nov  4 06:00:35 2008
@@ -757,7 +757,6 @@
    void emit_arith(int sel, Operand dst, const Immediate& x);

    void emit_operand(Register reg, const Operand& adr);
-  void emit_operand(const Operand& adr, Register reg);

    void emit_farith(int b1, int b2, int i);


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

Reply via email to