From 8333b4f40beddae0e1a8f9e5654cc1d8304c9db5 Mon Sep 17 00:00:00 2001 From: WRansohoff Date: Sat, 21 Mar 2020 18:31:24 -0400 Subject: Move self-modifying 'fence.i' ops to .data memory section (#269) Co-authored-by: WRR <-@-> --- isa/rv64ui/fence_i.S | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'isa/rv64ui') diff --git a/isa/rv64ui/fence_i.S b/isa/rv64ui/fence_i.S index cd0fe56..2893c5e 100644 --- a/isa/rv64ui/fence_i.S +++ b/isa/rv64ui/fence_i.S @@ -19,11 +19,12 @@ lh a1, insn+2 # test I$ hit .align 6 -sh a0, 1f, t0 -sh a1, 1f+2, t0 +sh a0, 2f, t0 +sh a1, 2f+2, t0 fence.i -1: addi a3, a3, 222 +la a5, 2f +jalr a6, a5, 0 TEST_CASE( 2, a3, 444, nop ) # test prefetcher hit @@ -31,12 +32,13 @@ li a4, 100 1: addi a4, a4, -1 bnez a4, 1b -sh a0, 1f, t0 -sh a1, 1f+2, t0 +sh a0, 3f, t0 +sh a1, 3f+2, t0 fence.i .align 6 -1: addi a3, a3, 555 +la a5, 3f +jalr a6, a5, 0 TEST_CASE( 3, a3, 777, nop ) TEST_PASSFAIL @@ -51,4 +53,10 @@ RVTEST_DATA_BEGIN insn: addi a3, a3, 333 +2: addi a3, a3, 222 +jalr a5, a6, 0 + +3: addi a3, a3, 555 +jalr a5, a6, 0 + RVTEST_DATA_END -- cgit v1.1