aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2021-10-10 17:18:36 +0000
committers-ol <s+removethis@s-ol.nu>2021-10-10 17:18:36 +0000
commitd16dab68aeb05518d61cb55ca08904dc3df32ea1 (patch)
tree2e374578daf9536c1928f2102d94b07dddd416e4 /examples
parentfix validate.py tests (diff)
downloadsubv-d16dab68aeb05518d61cb55ca08904dc3df32ea1.tar.gz
subv-d16dab68aeb05518d61cb55ca08904dc3df32ea1.zip
fix bswapw, print_hex_word
Diffstat (limited to 'examples')
-rw-r--r--examples/device_tree.subv6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/device_tree.subv b/examples/device_tree.subv
index b2b0022..f79a233 100644
--- a/examples/device_tree.subv
+++ b/examples/device_tree.subv
@@ -46,7 +46,7 @@ bswapw:
# addi a2, a2, -256
# and a1, a1, a2
13/opi 5/rd/t0 5/subop/srl b/rs/a1 8/imm12
- 37/lui 6/rd/t1 16/imm20
+ 37/lui 6/rd/t1 10/imm20
13/opi 6/rd/t1 0/subop/add 6/rs/t1 -100/imm12
33/opr 5/rd/t0 7/subop/and 0/mode/norm 5/rs/t0 6/rs/t1
# srli a2, a0, 24
@@ -123,8 +123,8 @@ print_hex_word:loop:
print_hex_dgt:
# a1 = a1 & 0xf
13/opi b/rd/a1 7/subop/and b/rs/a1 f/imm12
- # t1 = 0x40
- 13/opi 6/rd/t1 0/subop/add 0/rs/x0 40/imm12
+ # t1 = 0x3a
+ 13/opi 6/rd/t1 0/subop/add 0/rs/x0 3a/imm12
# add 0x30 (ascii '0') / 0x61 (ascii 'a')
13/opi b/rd/a1 0/subop/add b/rs/a1 30/imm12