Demoassembly adjusted

master
kaqu 1 year ago
parent 0efb546fde
commit e8e5401ad9
  1. 4
      software/source/flwstw.c

@ -6,6 +6,7 @@ static void start(void)
lui sp,%hi(0x40192000) # Setup stack pointer \n\
addi sp,sp,%lo(0x40192000) # s.a. \n\
mv x3,x0 # Clear \n\
j entry # to the interesting stuff ... \n\
fscsr x3 # Swap csr \n\
frcsr x3 # Control \n\
mv x3,x0 # Clear \n\
@ -74,7 +75,8 @@ repeat: lui x3,%hi(0xFF800000) # -INF \n\
flt.s x3,f0,f1 # x3 = (f0 < f1) \n\
fle.s x3,f0,f1 # x3 = (f0 < f1) \n\
#j repeat # Loop ... \n\
fcvt.s.w f3,x3 # f3 = float((signed)x3) \n\
nop # -------------------------------\n\
entry: fcvt.s.w f3,x3 # f3 = float((signed)x3) \n\
fcvt.s.wu f3,x3 # f3 = float((unsigned)x3) \n\
#j repeat # Loop ... \n\
fcvt.w.s x3,f3 # x3 = int(f3) \n\

Loading…
Cancel
Save