[PATCH] Fix POP2 opcode handling bug with two category 1 values at the stack top.
This commit is contained in:
committed by
Egor Ushakov
parent
faaab500e3
commit
e7854376b8
30
testData/src/pkg/TestPop2OneDoublePop2.jasm
Normal file
30
testData/src/pkg/TestPop2OneDoublePop2.jasm
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This code can be assembled with <a href="https://wiki.openjdk.java.net/display/CodeTools/asmtools">asmtools</a>
|
||||
* using <code>asmtools jasm -g *.jasm</code> command line.
|
||||
*/
|
||||
package pkg;
|
||||
|
||||
super public class TestPop2OneDoublePop2
|
||||
version 52:0
|
||||
{
|
||||
|
||||
public Method "<init>":"()V"
|
||||
stack 1 locals 1
|
||||
{
|
||||
aload_0;
|
||||
invokespecial Method java/lang/Object."<init>":"()V";
|
||||
return;
|
||||
}
|
||||
|
||||
public static varargs Method main:"([Ljava/lang/String;)V"
|
||||
stack 4 locals 1
|
||||
{
|
||||
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
|
||||
ldc int 1234567890;
|
||||
ldc2_w double 3.14159265358D;
|
||||
pop2;
|
||||
invokevirtual Method java/io/PrintStream.println:"(I)V";
|
||||
return;
|
||||
}
|
||||
|
||||
} // end Class TestPop2OneDoublePop2
|
||||
30
testData/src/pkg/TestPop2OneLongPop2.jasm
Normal file
30
testData/src/pkg/TestPop2OneLongPop2.jasm
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This code can be assembled with <a href="https://wiki.openjdk.java.net/display/CodeTools/asmtools">asmtools</a>
|
||||
* using <code>asmtools jasm -g *.jasm</code> command line.
|
||||
*/
|
||||
package pkg;
|
||||
|
||||
super public class TestPop2OneLongPop2
|
||||
version 52:0
|
||||
{
|
||||
|
||||
public Method "<init>":"()V"
|
||||
stack 1 locals 1
|
||||
{
|
||||
aload_0;
|
||||
invokespecial Method java/lang/Object."<init>":"()V";
|
||||
return;
|
||||
}
|
||||
|
||||
public static varargs Method main:"([Ljava/lang/String;)V"
|
||||
stack 4 locals 1
|
||||
{
|
||||
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
|
||||
ldc int 1234567890;
|
||||
ldc2_w long 0xCAFEBABE;
|
||||
pop2;
|
||||
invokevirtual Method java/io/PrintStream.println:"(I)V";
|
||||
return;
|
||||
}
|
||||
|
||||
} // end Class TestPop2OneLongPop2
|
||||
31
testData/src/pkg/TestPop2TwoIntPop2.jasm
Normal file
31
testData/src/pkg/TestPop2TwoIntPop2.jasm
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* This code can be assembled with <a href="https://wiki.openjdk.java.net/display/CodeTools/asmtools">asmtools</a>
|
||||
* using <code>asmtools jasm -g *.jasm</code> command line.
|
||||
*/
|
||||
package pkg;
|
||||
|
||||
super public class TestPop2TwoIntPop2
|
||||
version 52:0
|
||||
{
|
||||
|
||||
public Method "<init>":"()V"
|
||||
stack 1 locals 1
|
||||
{
|
||||
aload_0;
|
||||
invokespecial Method java/lang/Object."<init>":"()V";
|
||||
return;
|
||||
}
|
||||
|
||||
public static varargs Method main:"([Ljava/lang/String;)V"
|
||||
stack 4 locals 1
|
||||
{
|
||||
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
|
||||
ldc int 1234567890;
|
||||
ldc int 0xCAFE;
|
||||
ldc int 0xBABE;
|
||||
pop2;
|
||||
invokevirtual Method java/io/PrintStream.println:"(I)V";
|
||||
return;
|
||||
}
|
||||
|
||||
} // end Class TestPop2TwoIntPop2
|
||||
32
testData/src/pkg/TestPop2TwoIntTwoPop.jasm
Normal file
32
testData/src/pkg/TestPop2TwoIntTwoPop.jasm
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* This code can be assembled with <a href="https://wiki.openjdk.java.net/display/CodeTools/asmtools">asmtools</a>
|
||||
* using <code>asmtools jasm -g *.jasm</code> command line.
|
||||
*/
|
||||
package pkg;
|
||||
|
||||
super public class TestPop2TwoIntTwoPop
|
||||
version 52:0
|
||||
{
|
||||
|
||||
public Method "<init>":"()V"
|
||||
stack 1 locals 1
|
||||
{
|
||||
aload_0;
|
||||
invokespecial Method java/lang/Object."<init>":"()V";
|
||||
return;
|
||||
}
|
||||
|
||||
public static varargs Method main:"([Ljava/lang/String;)V"
|
||||
stack 4 locals 1
|
||||
{
|
||||
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
|
||||
ldc int 1234567890;
|
||||
ldc int 0xCAFE;
|
||||
ldc int 0xBABE;
|
||||
pop;
|
||||
pop;
|
||||
invokevirtual Method java/io/PrintStream.println:"(I)V";
|
||||
return;
|
||||
}
|
||||
|
||||
} // end Class TestPop2TwoIntTwoPop
|
||||
Reference in New Issue
Block a user