1 /* src/vm/jit/arm/md-asm.h - assembler defines for arm ABI
3 Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 Contact: cacao@cacaojvm.org
27 Authors: Michael Starzinger
29 Changes: Christian Thalinger
31 $Id: md-asm.h 6514 2006-02-17 20:05:00Z michi $
42 /* register defines ***********************************************************/
44 #define res1 r0 /* result registers */
47 #define a1 r0 /* argument registers */
52 #define v1 r4 /* variable registers */
61 #define pc r15 /* program counter */
62 #define lr r14 /* return address */
63 #define sp r13 /* stack pointer */
64 #define ip r12 /* something like pv */
65 #define fp r11 /* frame pointer (not used) */
67 #define itmp1 v7 /* temporary scratch regs */
73 #define xptr itmp1 /* exception registers */
77 /* save and restore macros ****************************************************/
79 #define SAVE_ARGUMENT_REGISTERS \
80 stmfd sp!, {a1,a2,a3,a4,lr}
82 #define SAVE_ARGUMENT_REGISTERS_IP \
83 stmfd sp!, {a1,a2,a3,a4,ip,lr}
85 #if defined(ENABLE_SOFTFLOAT)
86 # define SAVE_FLOAT_REGISTERS
88 # define SAVE_FLOAT_REGISTERS \
93 #define SAVE_SCRATCH_REGISTERS \
94 stmfd sp!, {itmp3,itmp1,itmp2,lr}
97 #define RESTORE_ARGUMENT_REGISTERS \
98 ldmfd sp!, {a1,a2,a3,a4,lr}
100 #define RESTORE_ARGUMENT_REGISTERS_IP \
101 ldmfd sp!, {a1,a2,a3,a4,ip,lr}
103 #if defined(ENABLE_SOFTFLOAT)
104 # define RESTORE_FLOAT_REGISTERS
106 # define RESTORE_FLOAT_REGISTERS \
107 lfmfd f4, 4, [sp]!; \
111 #define RESTORE_SCRATCH_REGS_AND_RETURN \
112 ldmfd sp!, {itmp3,itmp1,itmp2,pc}
114 #endif /* _MD_ASM_H */
118 * These are local overrides for various environment variables in Emacs.
119 * Please do not remove this and leave it at the end of the file, where
120 * Emacs will automagically detect them.
121 * ---------------------------------------------------------------------
124 * indent-tabs-mode: t
128 * vim:noexpandtab:sw=4:ts=4: