Skip to content

Commit

Permalink
8296821: compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/N…
Browse files Browse the repository at this point in the history
…ativeCallTest.java fails after JDK-8262901

Reviewed-by: kvn, thartmann
  • Loading branch information
Olga Mikhaltsova authored and TobiHartmann committed Nov 14, 2022
1 parent 34d10f1 commit 277f0c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion test/hotspot/jtreg/ProblemList.txt
Expand Up @@ -46,7 +46,6 @@
compiler/ciReplay/TestSAServer.java 8029528 generic-all
compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8225370 generic-all
compiler/jvmci/compilerToVM/GetFlagValueTest.java 8204459 generic-all
compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java 8296821 generic-all
compiler/tiered/LevelTransitionTest.java 8067651 generic-all

compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java 8190680 generic-all
Expand Down
Expand Up @@ -159,7 +159,13 @@ public void test(String name, long addr, Class<?> returnClazz, Class<?>[] types,
asm.emitCallPrologue(cc, values);
asm.emitCall(addr);
asm.emitCallEpilogue(cc);
asm.emitFloatRet(((RegisterValue) cc.getReturn()).getRegister());
if (returnClazz == float.class) {
asm.emitFloatRet(((RegisterValue) cc.getReturn()).getRegister());
} else if (returnClazz == int.class) {
asm.emitIntRet(((RegisterValue) cc.getReturn()).getRegister());
} else {
assert false : "Unimplemented return type: " + returnClazz;
}
}, getMethod(name, types), values);
} catch (Throwable e) {
e.printStackTrace();
Expand Down
Expand Up @@ -403,8 +403,7 @@ public void emitLoad(AllocatableValue av, Object prim) {

@Override
public void emitCallPrologue(CallingConvention cc, Object... prim) {
emitGrowStack(cc.getStackSize());
frameSize += cc.getStackSize();
growFrame(cc.getStackSize());
AllocatableValue[] args = cc.getArguments();
// Do the emission in reverse, this avoids register collisons of xmm0 - which is used a
// scratch register when putting arguments on the stack.
Expand All @@ -427,7 +426,6 @@ public void emitCall(long addr) {

@Override
public void emitCallEpilogue(CallingConvention cc) {
emitGrowStack(-cc.getStackSize());
frameSize -= cc.getStackSize();
growFrame(-cc.getStackSize());
}
}

1 comment on commit 277f0c2

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.