
Xifanie
(Webmistress)
[Posts: 3779]

 [September 12, 2013, 08:45:04 PM]

« Reply #6 on: September 12, 2013, 08:45:04 PM »
mult r4,r5 # Perform r4 * r5 Not allowed to use mult within two commands of mflo.
This is not necessary AFAIK, because I tested different opcode combinations on pSX, PSX (console) and PSP... nothing crashed, and every single routine was calculated perfectly without any need to put spaces anywhere. Limitations concerning mult/div/mflo/mfhi/mtlo/mthi other than dividing by 0 simply don't seem to exist. Note that for my tests, r17 is the result variable. ori r2,r0,0x0x001D ori r3,r0,0x0x0011 mult r2,r3 mflo r17 addiu r17,r17,0x0007 returns 500
ori r2,r0,0x0x0005 ori r3,r0,0x0x0025 mult r2,r3 mflo r17 mult r2,r17 mflo r17 returns 925
ori r2,r0,0x0x000D ori r3,r0,0x0x0035 div r3,r2 nop mflo r17 returns 4
ori r2,r0,0x0x001F ori r3,r0,0x0x0003 div r2,r3 mflo r17 div r2,r17 mflo r17 returns 3
ori r2,r0,0x0x0013 ori r3,r0,0x0x002B mult r2,r3 mflo r17 addiu r17,r17,0x0004 mult r2,r17 mflo r17 returns 15599
ori r2,r0,0x0x0007 ori r3,r0,0x0x003B mtlo r2 div r3,r2 nop nop mflo r17 returns 8
ori r2,r0,0x0x0078 ori r3,r0,0x0x0017 div r2,r3 nop nop mflo r17 div r3,r17 mflo r17 returns 4
ori r2,r0,0x0x002F ori r3,r0,0x0x000B div r2,r3 mflo r17 nop nop div r2,r17 mflo r17 returns 11

ori r2,r0,0x0x001D ori r3,r0,0x0x0011 mult r2,r3 mflo r17 mult r2,r2 returns 493
ori r2,r0,0x0x0005 ori r3,r0,0x0x0025 mult r2,r2 mult r3,r3 mult r2,r3 mflo r17 returns 185
ori r2,r0,0x0x000D ori r3,r0,0x0x0035 mult r2,r3 nop mflo r17 returns 689
ori r2,r0,0x0x001F ori r3,r0,0x0x0003 mult r2,r3 nop nop mflo r17 returns 93
ori r2,r0,0x0x0013 ori r3,r0,0x0x002B mult r2,r3 nop nop mflo r17 mult r2,r2 returns 817
ori r2,r0,0x0x0007 ori r3,r0,0x0x003B mtlo r2 mult r2,r3 nop nop mflo r17 returns 413
ori r2,r0,0x0x0029 ori r3,r0,0x0x0017 mult r2,r3 nop nop mflo r17 mult r17,r3 mflo r17 returns 21689
ori r2,r0,0x0x002F ori r3,r0,0x0x000B mult r2,r3 mflo r17 nop nop mult r17,r3 mflo r17 returns 5687 
<R999> My target market is not FFT mod players 

