ARM64: More fixes for ARM BTI.

Reported by Yuichiro Naito. #1415
This commit is contained in:
Mike Pall
2025-12-06 08:42:18 +01:00
parent b1cd2f83b5
commit c7c74ea505

View File

@@ -1696,6 +1696,7 @@ static void build_subroutines(BuildCtx *ctx)
| adr lr, >1 | adr lr, >1
| checkint CARG1, ->vm_tobit_fb | checkint CARG1, ->vm_tobit_fb
|1: |1:
| bti_jump
|.endmacro |.endmacro
| |
|.macro .ffunc_bit_op, name, ins |.macro .ffunc_bit_op, name, ins
@@ -1710,6 +1711,7 @@ static void build_subroutines(BuildCtx *ctx)
| bge >9 | bge >9
| checkint CARG1, ->vm_tobit_fb | checkint CARG1, ->vm_tobit_fb
|2: |2:
| bti_jump
| ins TMP0w, TMP0w, CARG1w | ins TMP0w, TMP0w, CARG1w
| b <1 | b <1
|.endmacro |.endmacro
@@ -1742,6 +1744,7 @@ static void build_subroutines(BuildCtx *ctx)
| adr lr, >1 | adr lr, >1
| checkint CARG1, ->vm_tobit_fb | checkint CARG1, ->vm_tobit_fb
|1: |1:
| bti_jump
|.if shmod == 0 |.if shmod == 0
| mov TMP1, CARG1 | mov TMP1, CARG1
|.else |.else
@@ -1751,6 +1754,7 @@ static void build_subroutines(BuildCtx *ctx)
| adr lr, >2 | adr lr, >2
| checkint CARG1, ->vm_tobit_fb | checkint CARG1, ->vm_tobit_fb
|2: |2:
| bti_jump
| ins TMP0w, CARG1w, TMP1w | ins TMP0w, CARG1w, TMP1w
| add_TISNUM CARG1, TMP0 | add_TISNUM CARG1, TMP0
| b ->fff_restv | b ->fff_restv