Skip to content

Commit

Permalink
replaced lw/sw with ld/sd for pmp64 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
UmerShahidengr committed Apr 25, 2024
1 parent 8ac1a16 commit 25b9bff
Show file tree
Hide file tree
Showing 40 changed files with 120 additions and 120 deletions.
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-R-priority-level-2.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-R-priority.S
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-R.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-RW-priority.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-RW.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-RWX.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-RX-priority.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-RX.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-X-priority-level-2.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-X-priority.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NA4-X.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NAPOT-R-priority.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NAPOT-R.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NAPOT-RW-priority.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NAPOT-RW.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
6 changes: 3 additions & 3 deletions riscv-test-suite/rv64i_m/pmp64/pmp64-NAPOT-RWX.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ RVTEST_SIGBASE( x13,signature_x13_1)
#define NOP 0x13
.macro VERIFICATION_RWX ADDRESS
LA(a5, \ADDRESS) // Fetch the address to be checked
lw a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
ld a4,0(a5) // Load data from it (CHECK FOR READ) ; (NOT TRAP => W enabled)
nop
nop
/* WRITING new value to memory region
TRAP if the WRITability is blocked */
LI(a4, NOP) // Load the new value (NOP Instruction ID)
sw a4,0(a5) // Store the new value (NOT TRAP => W enabled)
sd a4,0(a5) // Store the new value (NOT TRAP => W enabled)
nop
nop
lw a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
ld a4,0(a5) // Reload for verification (CHECK IF DATA HAS BEEN UPDATED SUCCESSFULLY)
jal \ADDRESS // Test for execution, an instruction is placed at this address
.endm

Expand Down
Loading

0 comments on commit 25b9bff

Please sign in to comment.