# HG changeset patch # User Thomas Wuerthinger # Date 1309449823 -7200 # Node ID 33f0052372c6bf0b27653b2fd2381b4777067d67 # Parent ab218bdf7077125222be27db49d7925b203573c6 optimized genInstanceOf XIR snippet. diff -r ab218bdf7077 -r 33f0052372c6 graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java --- a/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java Thu Jun 30 18:00:22 2011 +0200 +++ b/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java Thu Jun 30 18:03:43 2011 +0200 @@ -636,7 +636,7 @@ @Override protected XirTemplate create(CiXirAssembler asm, long flags) { - XirOperand result = asm.restart(CiKind.Boolean); + asm.restart(CiKind.Void); XirParameter object = asm.createInputParameter("object", CiKind.Object); final XirOperand hub; hub = asm.createConstantInputParameter("hub", CiKind.Object); @@ -654,14 +654,13 @@ asm.pload(CiKind.Object, objHub, object, asm.i(config.hubOffset), false); // if we get an exact match: succeed immediately - asm.mov(result, asm.b(true)); asm.jeq(trueSucc, objHub, hub); asm.jmp(slowPath); // -- out of line ------------------------------------------------------- asm.bindOutOfLine(slowPath); - checkSubtype(asm, result, objHub, hub); - asm.jeq(falseSucc, result, asm.b(false)); + checkSubtype(asm, objHub, objHub, hub); + asm.jeq(falseSucc, objHub, asm.o(null)); asm.jmp(trueSucc); return asm.finishTemplate("instanceof");