1.1 |
| 04-Aug-2011 |
uwe | For unsignad integer division gcc used to emit a call to __udivsi3 "millicode" function that uses compiler-private ABI. Newer gcc uses heavily tuned __udivsi3_i4i that is NOT compatible with __udivsi3 because it's expected to clobber different registers. We don't want to link the kernel against libgcc and we don't have resources to write heavily tuned version ourselves, so clone __udivsi3 but adjust it to conform to the __udivsi3_i4i clobber spec.
Ditto for signed division.
You can make gcc use old routines with -mdiv=call-div1 to avoid few extra instructions to save/restore the right registers in the signed division funcion.
|