assert((call[0] == 0x40 || call[0] == 0x41) && call[1] == 0xFF)
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri Dec 19 01:22:57 UTC 2014
Hi,
I think next assert is incorrect:
# Internal Error
(/export/kvn/build/AOT/121714/hotspot/src/cpu/x86/vm/graalCodeInstaller_x86.cpp:45),
pid=11105, tid=2
# assert((call[0] == 0x40 || call[0] == 0x41) && call[1] == 0xFF)
failed: expected call with rex/rexb prefix byte
#
According to Intel's manual in 64-bit mode near calls don't need REX
prefix if first GP registers are used. And we follow it:
private int prefixAndEncode(int regEnc, boolean byteinst) {
if (regEnc >= 8) {
emitByte(Prefix.REXB);
return regEnc - 8;
} else if (byteinst && regEnc >= 4) {
emitByte(Prefix.REX);
}
return regEnc;
}
public final void call(Register src) {
int encode = prefixAndEncode(src.encoding);
emitByte(0xFF);
emitByte(0xD0 | encode);
}
I hit the assert when RAX is used for destination:
0xfffffd7fe50a1e10: movq $0x0000000000000000,%rax
0xfffffd7fe50a1e1a: call *%eax
So why you expect the call should have REX? Do you have somewhere
hard-coded registers used for calls and don't expect RAX?
Thanks,
Vladimir
More information about the graal-dev
mailing list