FFI: Don't load PC from non-function object in FFI continuation.
Reported by Yichun Zhang. #743
This commit is contained in:
@@ -819,11 +819,11 @@ static void build_subroutines(BuildCtx *ctx)
|
||||
|.endif
|
||||
| lwz PC, -16(RB) // Restore PC from [cont|PC].
|
||||
| subi TMP2, RD, 8
|
||||
| lwz TMP1, LFUNC:TMP1->pc
|
||||
| stwx TISNIL, RA, TMP2 // Ensure one valid arg.
|
||||
|.if FFI
|
||||
| ble >1
|
||||
|.endif
|
||||
| lwz TMP1, LFUNC:TMP1->pc
|
||||
| lwz KBASE, PC2PROTO(k)(TMP1)
|
||||
| // BASE = base, RA = resultptr, RB = meta base
|
||||
| mtctr TMP0
|
||||
|
||||
Reference in New Issue
Block a user