Reviewers: Lasse Reichstein,

Description:
X64: Use low bits of registers in emit_sse_operand.  Enable --stop-at
flag.

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

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/codegen-x64.cc


Index: src/x64/assembler-x64.cc
===================================================================
--- src/x64/assembler-x64.cc    (revision 2348)
+++ src/x64/assembler-x64.cc    (working copy)
@@ -2022,11 +2022,11 @@


  void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) {
-  emit(0xC0 | (dst.code() << 3) | src.code());
+  emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
  }

  void Assembler::emit_sse_operand(XMMRegister dst, Register src) {
-  emit(0xC0 | (dst.code() << 3) | src.code());
+  emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
  }


Index: src/x64/assembler-x64.h
===================================================================
--- src/x64/assembler-x64.h     (revision 2348)
+++ src/x64/assembler-x64.h     (working copy)
@@ -160,6 +160,17 @@
      return code_;
    }

+  // Return the high bit of the register code as a 0 or 1.  Used often
+  // when constructing the REX prefix byte.
+  int high_bit() const {
+    return code_ >> 3;
+  }
+  // Return the 3 low bits of the register code.  Used when encoding  
registers
+  // in modR/M, SIB, and opcode bytes.
+  int low_bits() const {
+    return code_ & 0x7;
+  }
+
    int code_;
  };

Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc      (revision 2351)
+++ src/x64/codegen-x64.cc      (working copy)
@@ -154,8 +154,7 @@

  #ifdef DEBUG
    if (strlen(FLAG_stop_at) > 0 &&
-      //    fun->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
-      false) {
+      function->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
      frame_->SpillAll();
      __ int3();
    }



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

Reply via email to