xemu/target/riscv/insn_trans
Deepak Gupta f06bfe3dc3 target/riscv: implement zicfiss instructions
zicfiss has following instructions
 - sspopchk: pops a value from shadow stack and compares with x1/x5.
   If they dont match, reports a sw check exception with tval = 3.
 - sspush: pushes value in x1/x5 on shadow stack
 - ssrdp: reads current shadow stack
 - ssamoswap: swaps contents of shadow stack atomically

sspopchk/sspush/ssrdp default to zimop if zimop implemented and SSE=0

If SSE=0, ssamoswap is illegal instruction exception.

This patch implements shadow stack operations for qemu-user and shadow
stack is not protected.

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Co-developed-by: Jim Shu <jim.shu@sifive.com>
Co-developed-by: Andy Chiu <andy.chiu@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20241008225010.1861630-17-debug@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2024-10-30 11:22:08 +10:00
..
trans_privileged.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rva.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rvb.c.inc target/riscv: Drop tcg_temp_free 2023-03-05 13:44:08 -08:00
trans_rvbf16.c.inc target/riscv: enable 'vstart_eq_zero' in the end of insns 2024-03-22 15:24:37 +10:00
trans_rvd.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rvf.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rvh.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rvi.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rvk.c.inc target/riscv: Drop tcg_temp_free 2023-03-05 13:44:08 -08:00
trans_rvm.c.inc tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
trans_rvv.c.inc target/riscv: remove break after g_assert_not_reached() 2024-09-24 13:53:35 +02:00
trans_rvvk.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rvzabha.c.inc target/riscv: Add amocas.[b|h] for Zabha 2024-07-18 12:00:42 +10:00
trans_rvzacas.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rvzawrs.c.inc target/riscv: Raise exceptions on wrs.nto 2024-06-03 11:12:11 +10:00
trans_rvzce.c.inc target/riscv: Update $ra with current $pc in trans_cm_jalt() 2024-03-08 15:37:20 +10:00
trans_rvzcmop.c.inc target/riscv: Add zcmop extension 2024-07-18 12:00:42 +10:00
trans_rvzfa.c.inc tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
trans_rvzfh.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_rvzicbo.c.inc target/riscv: rvzicbo: Fixup CBO extension register calculation 2024-06-03 11:12:12 +10:00
trans_rvzicfiss.c.inc target/riscv: implement zicfiss instructions 2024-10-30 11:22:08 +10:00
trans_rvzicond.c.inc target/riscv: refactor Zicond support 2023-05-05 10:49:50 +10:00
trans_rvzimop.c.inc target/riscv: Add zimop extension 2024-07-18 12:00:42 +10:00
trans_svinval.c.inc target/riscv: update `decode_save_opc` to store extra word2 2024-10-30 11:22:08 +10:00
trans_xthead.c.inc target/riscv: Enable xtheadsync under user mode 2024-02-09 20:43:14 +10:00
trans_xventanacondops.c.inc target/riscv: redirect XVentanaCondOps to use the Zicond functions 2023-05-05 10:49:50 +10:00