]> git.buserror.net Git - polintos/scott/priv.git/blob - doc/abi/alpha
Initial checkin from Perforce.
[polintos/scott/priv.git] / doc / abi / alpha
1 Method Invocation:
2    Caller:
3       a0: object ID
4       a1: method ID
5
6       a2: pointer to args (low addr to high, padded as in a struct):
7           Out arrays can be preallocated.  Scalar outs are ignored,
8           but space is made for them.  NULL array params and arrays
9           which are larger than the preallocated buffer are
10           allocated by the callee.  Arrays are passed as a pointer
11           and a 64-bit element count, in that order.  Objects are
12           passed as pointers.
13       
14       Call a special symbol TBD to invoke the method.
15       
16       Upon return:
17       params on stack, with out params filled in and out params clobbered
18
19       t0-t11, at, ra clobbered
20       v0: pointer to exception, or NULL if none.
21       a2: pointer to args, with out params filled in; in params
22           may be clobbered
23       
24    Callee:
25       params on stack (low addr to high), ids replaced with pointers,
26       at least 8 bytes of spare space beyond the high element
27
28       a0: object pointer
29       a1: pointer to caller information struct, if such was
30           requested
31       ra: return address
32       
33       Upon return:
34       
35       params on stack (low addr to high), in params may be clobbered
36       t0-t11, at, ra may be clobbered
37       v0: pointer to exception, or NULL if none.
38
39 Stack:
40    sp is stack pointer, grows down, decrement before store
41       
42 Object structure:
43    The object ID is stored as a 64-bit quantity at an offset
44    specified by calling a method TBD.
45
46 Wrapper object creation:
47         The function to create wrapper objects is specified by calling a
48    method TBD.  The function shall conform to the local ABI, and
49    takes an ID as a 64-bit integer as the first parameter, and a
50    pointer to the class as the second. It returns a pointer.
51    
52    Wrapper objects may be preemptively declared to avoid infinite
53    loops by calling a method TBD.
54
55 Struct padding:
56    All fields are padded so that basic types are naturally aligned.