xref: /haiku/src/system/libroot/posix/arch/m68k/setjmp_internal.h (revision 47a21c5c89fc9fd155a3929e5a8f6056b92a2053)
1dd68e9e8SFrançois Revol /*
2dd68e9e8SFrançois Revol  * Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. All rights
3*47a21c5cSAugustin Cavalier  * reserved. Distributed under the terms of the MIT License.
4dd68e9e8SFrançois Revol  */
5dd68e9e8SFrançois Revol #ifndef SETJMP_INTERNAL_H
6dd68e9e8SFrançois Revol #define SETJMP_INTERNAL_H
7dd68e9e8SFrançois Revol 
8dd68e9e8SFrançois Revol /*	M68K function call ABI register use:
9dd68e9e8SFrançois Revol 	d0		- return value
10dd68e9e8SFrançois Revol 	d1		- volatile (return value?)
11dd68e9e8SFrançois Revol 	d2-d7		- local vars
12dd68e9e8SFrançois Revol 	a0		- return value
13dd68e9e8SFrançois Revol 	a1		- volatile (return value?)
14dd68e9e8SFrançois Revol 	a2-a6		- local vars
15dd68e9e8SFrançois Revol 	a6		- (stack frame ?)
16dd68e9e8SFrançois Revol 	a7		- stack pointer
17dd68e9e8SFrançois Revol */
18dd68e9e8SFrançois Revol 
19dd68e9e8SFrançois Revol /* These are the fields of the __jmp_regs structure */
20dd68e9e8SFrançois Revol #define JMP_REGS_D2     0
21dd68e9e8SFrançois Revol #define JMP_REGS_PC     (4*(6+6))
22dd68e9e8SFrançois Revol #define JMP_REGS_CCR    (4*(6+6)+4)
23dd68e9e8SFrançois Revol 
24dd68e9e8SFrançois Revol #define FUNCTION(x) .global x; .type x,@function; x
25dd68e9e8SFrançois Revol 
26dd68e9e8SFrançois Revol #endif	/* SETJMP_INTERNAL_H */
27