1 /* src/vm/jit/arm/md-asm.h - assembler defines for arm ABI
3 Copyright (C) 1996-2005, 2006, 2007 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
39 /* register defines ***********************************************************/
41 #define res1 r0 /* result registers */
44 #define a0 r0 /* argument registers */
49 #define v1 r4 /* variable registers */
58 #define pc r15 /* program counter */
59 #define lr r14 /* return address */
60 #define sp r13 /* stack pointer */
61 #define ip r12 /* something like pv */
62 #define fp r11 /* frame pointer (not used) */
64 #define itmp1 v7 /* temporary scratch regs */
70 #define xptr itmp1 /* exception registers */
74 /* save and restore macros ****************************************************/
76 #define SAVE_ARGUMENT_REGISTERS \
77 stmfd sp!, {a0,a1,a2,a3,lr}
79 #define SAVE_ARGUMENT_REGISTERS_IP \
80 stmfd sp!, {a0,a1,a2,a3,ip,lr}
82 #if defined(ENABLE_SOFTFLOAT)
83 # define SAVE_FLOAT_REGISTERS
85 # define SAVE_FLOAT_REGISTERS \
90 #define SAVE_SCRATCH_REGISTERS \
91 stmfd sp!, {itmp3,itmp1,itmp2,lr}
94 #define RESTORE_ARGUMENT_REGISTERS \
95 ldmfd sp!, {a0,a1,a2,a3,lr}
97 #define RESTORE_ARGUMENT_REGISTERS_IP \
98 ldmfd sp!, {a0,a1,a2,a3,ip,lr}
100 #if defined(ENABLE_SOFTFLOAT)
101 # define RESTORE_FLOAT_REGISTERS
103 # define RESTORE_FLOAT_REGISTERS \
104 lfmfd f4, 4, [sp]!; \
108 #define RESTORE_SCRATCH_REGS_AND_RETURN \
109 ldmfd sp!, {itmp3,itmp1,itmp2,pc}
111 #endif /* _MD_ASM_H */
115 * These are local overrides for various environment variables in Emacs.
116 * Please do not remove this and leave it at the end of the file, where
117 * Emacs will automagically detect them.
118 * ---------------------------------------------------------------------
121 * indent-tabs-mode: t
125 * vim:noexpandtab:sw=4:ts=4: