mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 21:21:33 +00:00
upgrade to java 22 and fix miscompile of variable loads
This commit is contained in:
@ -30,7 +30,9 @@ class IrStubOpEmitter(val irDefinition: IrDefinition, val code: CodeBuilder) : I
|
||||
if (callOrStubVar.stubVar != null) {
|
||||
code.emit(Opcode.LoadLocal, listOf(callOrStubVar.stubVar.index))
|
||||
} else {
|
||||
code.emit(Opcode.Integer, listOf(code.nextOpInst() + 2u))
|
||||
val retRel = MutableRel(0u)
|
||||
retRel.rel = code.nextOpInst() + 2u
|
||||
code.patch(Opcode.ReturnAddress, listOf(0u), 0, symbol, retRel)
|
||||
code.patch(Opcode.Call, listOf(0u), mapOf(0 to callOrStubVar.call!!))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user