]
retval += [
"loop:",
- # FIXME: use SVSHAPE0 for RA, SVSHAPE1 for RB,
+ # use SVSHAPE0 for RA, SVSHAPE1 for RB,
# SVSHAPE2 for RC/RT, SVSHAPE3 for RS
- "sv.maddedu *4, *32, *36, *4", # RS is scalar by using constant remap
- # FIXME: use SVSHAPE2 for RT/RA
+ "svremap 0o37, 0, 1, 2, 2, 3, 0",
+ # RS is scalar by using constant remap
+ "sv.maddedu *4, *32, *36, *4", # FIXME: need to set EXTRA2_MODE to 0
+ # use SVSHAPE2 for RT/RA, all others are not remapped
+ "svremap 0o11, 2, 0, 0, 2, 0, 0",
"sv.adde *5, *5, 20", # FIXME: maddedu's RS is in r20, right?
"svstep 0, 0, 1",
"bc 16, 0, loop # bdnz loop",