From 848e84b0948e3cf60cd118e3d2f507f20920e06c Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 27 May 2021 11:54:05 +0200 Subject: fix jalr immediate slice, update example stage results --- ex.format | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'ex.format') diff --git a/ex.format b/ex.format index c9c68b8..5fb48d8 100644 --- a/ex.format +++ b/ex.format @@ -4,13 +4,20 @@ main: # load 0x10010000 (UART0) into t0 37/7 05/5 10010/20 # store 0x48 (H) in UART0+0 -13/7 06/5 00/3 00/5 48/12 -23/7 00/5 02/3 05/5 06/5 00/7 +13/7 06/5 0/3 00/5 048/12 +23/7 00/5 2/3 05/5 06/5 00/7 # store 0x69 (i) in UART0+0 -13/7 06/5 00/3 00/5 69/12 -23/7 00/5 02/3 05/5 06/5 00/7 +13/7 06/5 0/3 00/5 069/12 +23/7 00/5 2/3 05/5 06/5 00/7 # store 0x0a (\n) in UART0+0 -13/7 06/5 00/3 00/5 0a/12 -23/7 00/5 02/3 05/5 06/5 00/7 -# jump back up to the top -6f/7 00/5 main/8/off21>>12 main/1/off21>>11 main/10/off21>>1 main/1/off21>>20 +13/7 06/5 0/3 00/5 00a/12 +23/7 00/5 2/3 05/5 06/5 00/7 +# jump back up to the top (three versions): +# a) jal 21bit relative (with 0th bit forced to 0) +# 6f/jal 0/rd/x0 main/off21 +# b) auipc+jalr 32bit relative (note label offset) +17/7 07/5 main/off32/[31:12] +67/7 00/5 0/3 07/5 main+4/off32/[11:0] +# c) lui+jalr 32bit absolute +# 37/lui 7/rd/t2 main/imm32 +# 67/jalr 0/subop 0/rd/x0 7/rs/t2 main/imm32 -- cgit v1.2.3