From: Fei Wu <fe...@in...> - 2023-05-26 13:57:48
|
SyncupEnv is added for syncup the environment so that the following instructions can get the update from the previous instructions, e.g. vl set by vsetvl. TooManyIR is added for the cases one guest instruction is translated to many IRs, this stops TB including more guest instructions and it is used to avoid too many IRs in one TB. Signed-off-by: Fei Wu <fe...@in...> --- VEX/priv/host_riscv64_isel.c | 2 ++ VEX/priv/ir_defs.c | 2 ++ VEX/pub/libvex_ir.h | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/VEX/priv/host_riscv64_isel.c b/VEX/priv/host_riscv64_isel.c index 76fc3fd5c..87213fb86 100644 --- a/VEX/priv/host_riscv64_isel.c +++ b/VEX/priv/host_riscv64_isel.c @@ -1942,6 +1942,8 @@ static void iselNext(ISelEnv* env, IRExpr* next, IRJumpKind jk, Int offsIP) /* Case: call/return (==boring) transfer to any address. */ switch (jk) { case Ijk_Boring: + case Ijk_SyncupEnv: + case Ijk_TooManyIR: case Ijk_Ret: case Ijk_Call: { HReg r = iselIntExpr_R(env, next); diff --git a/VEX/priv/ir_defs.c b/VEX/priv/ir_defs.c index 2d82c41a1..875816c78 100644 --- a/VEX/priv/ir_defs.c +++ b/VEX/priv/ir_defs.c @@ -2083,6 +2083,8 @@ void ppIRJumpKind ( IRJumpKind kind ) case Ijk_Sys_int145: vex_printf("Sys_int145"); break; case Ijk_Sys_int210: vex_printf("Sys_int210"); break; case Ijk_Sys_sysenter: vex_printf("Sys_sysenter"); break; + case Ijk_SyncupEnv: vex_printf("SyncupEnv"); break; + case Ijk_TooManyIR: vex_printf("TooManyIR"); break; default: vpanic("ppIRJumpKind"); } } diff --git a/VEX/pub/libvex_ir.h b/VEX/pub/libvex_ir.h index 8c47be090..b4b1e9d6e 100644 --- a/VEX/pub/libvex_ir.h +++ b/VEX/pub/libvex_ir.h @@ -2513,8 +2513,13 @@ typedef Ijk_Sys_int130, /* amd64/x86 'int $0x82' */ Ijk_Sys_int145, /* amd64/x86 'int $0x91' */ Ijk_Sys_int210, /* amd64/x86 'int $0xD2' */ - Ijk_Sys_sysenter /* x86 'sysenter'. guest_EIP becomes + Ijk_Sys_sysenter, /* x86 'sysenter'. guest_EIP becomes invalid at the point this happens. */ + Ijk_SyncupEnv, /* rvv syncup so that following instructions can read + the env set here */ + Ijk_TooManyIR /* some rvv instructions generate too many IRs to + exhaust storage, break out early to reduce the + risk */ } IRJumpKind; -- 2.25.1 |