Mercurial > hg > truffle
changeset 2108:50b45e2d9725
Fixed bug in getClass() XIR snippet
Null check needs separate PC position. Otherwise there's a problem if the null check is immediately after a call instruction.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Wed, 16 Feb 2011 13:38:33 +0100 |
parents | e5ba25730d9b |
children | d25d4ca69222 |
files | c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java src/share/vm/compiler/oopMap.cpp |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Fri Feb 04 16:01:24 2011 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Wed Feb 16 13:38:33 2011 +0100 @@ -817,6 +817,9 @@ protected XirTemplate create(CiXirAssembler asm, long flags) { XirOperand result = asm.restart(CiKind.Object); XirOperand object = asm.createInputParameter("object", CiKind.Object); + if (is(NULL_CHECK, flags)) { + asm.nop(1); + } asm.pload(CiKind.Object, result, object, asm.i(config.hubOffset), is(NULL_CHECK, flags)); asm.pload(CiKind.Object, result, result, asm.i(config.classMirrorOffset), false); return asm.finishTemplate("currentThread");
--- a/src/share/vm/compiler/oopMap.cpp Fri Feb 04 16:01:24 2011 +0100 +++ b/src/share/vm/compiler/oopMap.cpp Wed Feb 16 13:38:33 2011 +0100 @@ -255,7 +255,7 @@ if(om_count() > 0) { OopMap* last = at(om_count()-1); if (last->offset() == map->offset() ) { - fatal("OopMap inserted twice"); + fatal(err_msg("OopMap inserted twice (offset=%d)", last->offset())); } if(last->offset() > map->offset()) { tty->print_cr( "WARNING, maps not sorted: pc[%d]=%d, pc[%d]=%d",