chiark / gitweb /
[PATCH] added klibc version 0.82 (cvs tree) to the udev tree.
[elogind.git] / klibc / klibc / arch / alpha / README-gcc
1    The current Alpha chips don't provide hardware for integer
2    division.  The C compiler expects the functions
3
4         __divqu: 64-bit unsigned long divide
5         __remqu: 64-bit unsigned long remainder
6         __divq/__remq:   signed 64-bit
7         __divlu/__remlu: unsigned 32-bit
8         __divl/__reml:   signed 32-bit
9
10    These are not normal C functions: instead of the normal calling
11    sequence, these expect their arguments in registers t10 and t11, and
12    return the result in t12 (aka pv).  Register AT may be clobbered
13    (assembly temporary), anything else must be saved.
14
15    Furthermore, the return address is in t9 instead of ra.
16
17    Normal function      Divide functions
18    ---------------      ----------------
19    v0 ($0)              t12/pv ($27)
20    a0 ($16)             t10 ($24)
21    a1 ($17)             t11 ($25)
22    ra ($26)             t9 ($23)
23