amd64 register names used in the i486 tree in b17

Florian Weimer fw at deneb.enyo.de
Fri Aug 3 01:18:09 PDT 2007


Someone has run s/eax/rax et al. on the i486 part of the source tree,
which seems incorrect:

diff --git a/hotspot/src/cpu/i486/vm/c1_MacroAssembler_i486.cpp b/hotspot/src/cpu/i486/vm/c1_MacroAssembler_i486.cpp
index 29e95a3..f9df8be 100644
--- a/hotspot/src/cpu/i486/vm/c1_MacroAssembler_i486.cpp
+++ b/hotspot/src/cpu/i486/vm/c1_MacroAssembler_i486.cpp
[...]
@@ -31,7 +31,7 @@
 int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) {
   const int aligned_mask = 3;
   const int hdr_offset = oopDesc::mark_offset_in_bytes();
-  assert(hdr == eax, "hdr must be eax for the cmpxchg instruction");
+  assert(hdr == rax, "hdr must be rax, for the cmpxchg instruction");
   assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
   assert(BytesPerWord == 4, "adjust aligned_mask and code");
   Label done;
@@ -70,16 +70,16 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
   // => test if it is a stack pointer into the same stack (recursive locking), i.e.:
   //
   // 1) (hdr & aligned_mask) == 0
-  // 2) esp <= hdr
-  // 3) hdr <= esp + page_size
+  // 2) rsp <= hdr
+  // 3) hdr <= rsp + page_size
   //
   // these 3 tests can be done by evaluating the following expression:
   //
-  // (hdr - esp) & (aligned_mask - page_size)
+  // (hdr - rsp) & (aligned_mask - page_size)
   //
   // assuming both the stack pointer and page_size have their least
   // significant 2 bits cleared and page_size is a power of 2
-  subl(hdr, esp);
+  subl(hdr, rsp);
   andl(hdr, aligned_mask - os::vm_page_size());
   // for recursive locking, the result is zero => save it in the displaced header
   // location (NULL in the displaced hdr location indicates recursive locking)
[...]



More information about the hotspot-dev mailing list