# HG changeset patch # User cslag # Date 1465643243 -7200 # Node ID d595eb90efdd9655129347e57a4d682ed1169362 # Parent ca36937b46136f0b4e48b2706ddef7167803147e - dyncallback/mips_o32 fixes for when using -O? optimization flags; basically not using $fp directly, anymore diff -r ca36937b4613 -r d595eb90efdd dyncallback/dyncall_callback_mips_o32_gas.s --- a/dyncallback/dyncall_callback_mips_o32_gas.s Thu Jun 09 16:11:37 2016 +0200 +++ b/dyncallback/dyncall_callback_mips_o32_gas.s Sat Jun 11 13:07:23 2016 +0200 @@ -52,7 +52,7 @@ sw $ra, 20($sp) /* save link register */ .frame $fp,56,$31 /* specify our frame: fp,size,lr; creates virt $fp */ - + /* code below doesn't use $fp though, as n/a with -O1 */ /* Init return value */ sw $zero, 32($sp) sw $zero, 36($sp) @@ -63,15 +63,16 @@ /* For $f12 and $f14 use our space (in local data), which is adjacent. */ s.d $f12, 40($sp) /* -16($fp) */ s.d $f14, 48($sp) /* -8($fp) */ - sw $4, 0($fp) - sw $5, 4($fp) - sw $6, 8($fp) - sw $7, 12($fp) + sw $4, 56($sp) /* 0($fp) */ + sw $5, 60($sp) /* 4($fp) */ + sw $6, 64($sp) /* 8($fp) */ + sw $7, 68($sp) /* 12($fp) */ /* Init DCArg, which contains reg_count and stackptr* to the args. Point */ /* stackptr to the area where the non-float args start (which is at $fp). */ + addiu $4, $sp, 56 /* non-$fp replacement for: */ + sw $4, 28($sp) /* sw $fp, 28($sp) */ sw $zero, 24($sp) - sw $fp, 28($sp) /* Prepare callback handler call. */ move $4, $12 /* Param 0 = DCCallback*, $12 ($t4) holds pointer to thunk */