mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8146244: compiler/jvmci/code/DataPatchTest.java crashes: SIGSEGV in (getConstClass)getConstClass
Reviewed-by: twisti
This commit is contained in:
parent
a5d7b2b450
commit
0691fac50b
2 changed files with 22 additions and 1 deletions
|
@ -109,10 +109,11 @@ public class SPARCTestAssembler extends TestAssembler {
|
|||
|
||||
@Override
|
||||
public Register emitLoadLong(long c) {
|
||||
if ((c & 0xFFFFFFFF) == c) {
|
||||
if ((c & 0xFFFF_FFFFL) == c) {
|
||||
return emitLoadInt((int) c);
|
||||
} else {
|
||||
DataSectionReference ref = new DataSectionReference();
|
||||
data.align(8);
|
||||
ref.setOffset(data.position());
|
||||
data.emitLong(c);
|
||||
return emitLoadPointer(ref);
|
||||
|
@ -133,6 +134,7 @@ public class SPARCTestAssembler extends TestAssembler {
|
|||
@Override
|
||||
public Register emitLoadFloat(float c) {
|
||||
DataSectionReference ref = new DataSectionReference();
|
||||
data.align(4);
|
||||
ref.setOffset(data.position());
|
||||
data.emitFloat(c);
|
||||
|
||||
|
@ -262,4 +264,14 @@ public class SPARCTestAssembler extends TestAssembler {
|
|||
recordImplicitException(info);
|
||||
emitOp3(0b11, SPARC.g0, 0b001011, SPARC.g0, 0); // LDX [g0+0], g0
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSectionReference emitDataItem(HotSpotConstant c) {
|
||||
if (c.isCompressed()) {
|
||||
data.align(4);
|
||||
} else {
|
||||
data.align(8);
|
||||
}
|
||||
return super.emitDataItem(c);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue