git.s-ol.nu subv / d16dab6
fix bswapw, print_hex_word s-ol 10 months ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4545 # addi a2, a2, -256
4646 # and a1, a1, a2
4747 13/opi 5/rd/t0 5/subop/srl b/rs/a1 8/imm12
48 37/lui 6/rd/t1 16/imm20
48 37/lui 6/rd/t1 10/imm20
4949 13/opi 6/rd/t1 0/subop/add 6/rs/t1 -100/imm12
5050 33/opr 5/rd/t0 7/subop/and 0/mode/norm 5/rs/t0 6/rs/t1
5151 # srli a2, a0, 24
122122 print_hex_dgt:
123123 # a1 = a1 & 0xf
124124 13/opi b/rd/a1 7/subop/and b/rs/a1 f/imm12
125 # t1 = 0x40
126 13/opi 6/rd/t1 0/subop/add 0/rs/x0 40/imm12
125 # t1 = 0x3a
126 13/opi 6/rd/t1 0/subop/add 0/rs/x0 3a/imm12
127127
128128 # add 0x30 (ascii '0') / 0x61 (ascii 'a')
129129 13/opi b/rd/a1 0/subop/add b/rs/a1 30/imm12