LJ_FR2: Fix stack checks in vararg calls.

Thanks to Peter Cawley. #1048
This commit is contained in:
Mike Pall
2023-09-21 05:19:55 +02:00
parent 234dbc481e
commit d1a2fef8a8
4 changed files with 4 additions and 2 deletions

View File

@@ -5396,6 +5396,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
| settp LFUNC:RB, TMP0
| daddu TMP0, RA, RC
| sd LFUNC:RB, 0(TMP1) // Store (tagged) copy of LFUNC.
| daddiu TMP2, TMP2, -8
| daddiu TMP3, RC, 16+FRAME_VARG
| sltu AT, TMP0, TMP2
| ld KBASE, -4+PC2PROTO(k)(PC)