diff --git a/src/cheri_insts.sail b/src/cheri_insts.sail index abf36cc8..da61cf88 100644 --- a/src/cheri_insts.sail +++ b/src/cheri_insts.sail @@ -1187,7 +1187,7 @@ function handle_store_data_via_cap(rs, cs, cap_val, vaddrBits, width) = { TR_Address(addr, _) => { let eares : MemoryOpResult(unit) = mem_write_ea(addr, size, aq, rl, false); match (eares) { - MemException(e) => { handle_mem_exception(addr, e); RETIRE_FAIL }, + MemException(e) => { handle_mem_exception(vaddrBits, e); RETIRE_FAIL }, MemValue(_) => { let rs_val = X(rs); let res : MemoryOpResult(bool) = match (width, sizeof(xlen)) { @@ -1199,7 +1199,7 @@ function handle_store_data_via_cap(rs, cs, cap_val, vaddrBits, width) = { match (res) { MemValue(true) => RETIRE_SUCCESS, MemValue(false) => internal_error("store got false from mem_write_value"), - MemException(e) => { handle_mem_exception(addr, e); RETIRE_FAIL } + MemException(e) => { handle_mem_exception(vaddrBits, e); RETIRE_FAIL } } } } @@ -1265,13 +1265,13 @@ function handle_store_cap_via_cap(rs, cs, cap_val, vaddrBits) = { _ => { let eares : MemoryOpResult(unit) = mem_write_ea_cap(addr, aq, rl, false); match (eares) { - MemException(e) => { handle_mem_exception(addr, e); RETIRE_FAIL }, + MemException(e) => { handle_mem_exception(vaddrBits, e); RETIRE_FAIL }, MemValue(_) => { let res : MemoryOpResult(bool) = mem_write_cap(addr, rs_val, aq, rl, false); match (res) { MemValue(true) => RETIRE_SUCCESS, MemValue(false) => internal_error("store got false from mem_write_value"), - MemException(e) => { handle_mem_exception(addr, e); RETIRE_FAIL } + MemException(e) => { handle_mem_exception(vaddrBits, e); RETIRE_FAIL } } } } @@ -1352,7 +1352,7 @@ function handle_store_cond_data_via_cap(rs2, cs, cap_val, vaddrBits, width) = { TR_Address(addr, _) => { let eares : MemoryOpResult(unit) = mem_write_ea(addr, size, aq, rl, false); match (eares) { - MemException(e) => { handle_mem_exception(addr, e); RETIRE_FAIL }, + MemException(e) => { handle_mem_exception(vaddrBits, e); RETIRE_FAIL }, MemValue(_) => { let rs2_val = X(rs2); let res : MemoryOpResult(bool) = match (width, sizeof(xlen)) { @@ -1364,7 +1364,7 @@ function handle_store_cond_data_via_cap(rs2, cs, cap_val, vaddrBits, width) = { match (res) { MemValue(true) => { X(rs2) = EXTZ(0b0); cancel_reservation(); RETIRE_SUCCESS }, MemValue(false) => { X(rs2) = EXTZ(0b1); cancel_reservation(); RETIRE_SUCCESS }, - MemException(e) => { handle_mem_exception(addr, e); RETIRE_FAIL } + MemException(e) => { handle_mem_exception(vaddrBits, e); RETIRE_FAIL } } } } @@ -1421,7 +1421,7 @@ function handle_store_cond_cap_via_cap(cs2, cs, cap_val, vaddrBits) = { _ => { let eares : MemoryOpResult(unit) = mem_write_ea_cap(addr, aq, rl, false); match (eares) { - MemException(e) => { handle_mem_exception(addr, e); RETIRE_FAIL }, + MemException(e) => { handle_mem_exception(vaddrBits, e); RETIRE_FAIL }, MemValue(_) => { let res : MemoryOpResult(bool) = mem_write_cap(addr, cs2_val, aq, rl, false); match (res) { @@ -1436,7 +1436,7 @@ function handle_store_cond_cap_via_cap(cs2, cs, cap_val, vaddrBits) = { RETIRE_SUCCESS }, MemException(e) => { - handle_mem_exception(addr, e); + handle_mem_exception(vaddrBits, e); RETIRE_FAIL } }