amd64 register names used in the i486 tree in b17
Paul Hohensee - Java SE
Paul.Hohensee at Sun.COM
Fri Aug 3 11:24:06 PDT 2007
We're in the process of merging the i486 and amd64 directories into a
single directory,
in a way similar to sparc and sparcv9. Lots of code is identical or
close to it in the
i486 and amd64 directories, so merging them should reduce maintenance costs.
Renaming the 32-bit registers is part of that process.
Paul
Florian Weimer wrote:
> 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