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
30 $Id: md-asm.h 7227 2007-01-18 13:21:36Z twisti $
41 /* register defines ***********************************************************/
43 #define res1 r0 /* result registers */
46 #define a0 r0 /* argument registers */
51 #define v1 r4 /* variable registers */
60 #define pc r15 /* program counter */
61 #define lr r14 /* return address */
62 #define sp r13 /* stack pointer */
63 #define ip r12 /* something like pv */
64 #define fp r11 /* frame pointer (not used) */
66 #define itmp1 v7 /* temporary scratch regs */
72 #define xptr itmp1 /* exception registers */
76 /* save and restore macros ****************************************************/
78 #define SAVE_ARGUMENT_REGISTERS \
79 stmfd sp!, {a0,a1,a2,a3,lr}
81 #define SAVE_ARGUMENT_REGISTERS_IP \
82 stmfd sp!, {a0,a1,a2,a3,ip,lr}
84 #if defined(ENABLE_SOFTFLOAT)
85 # define SAVE_FLOAT_REGISTERS
87 # define SAVE_FLOAT_REGISTERS \
92 #define SAVE_SCRATCH_REGISTERS \
93 stmfd sp!, {itmp3,itmp1,itmp2,lr}
96 #define RESTORE_ARGUMENT_REGISTERS \
97 ldmfd sp!, {a0,a1,a2,a3,lr}
99 #define RESTORE_ARGUMENT_REGISTERS_IP \
100 ldmfd sp!, {a0,a1,a2,a3,ip,lr}
102 #if defined(ENABLE_SOFTFLOAT)
103 # define RESTORE_FLOAT_REGISTERS
105 # define RESTORE_FLOAT_REGISTERS \
106 lfmfd f4, 4, [sp]!; \
110 #define RESTORE_SCRATCH_REGS_AND_RETURN \
111 ldmfd sp!, {itmp3,itmp1,itmp2,pc}
113 #endif /* _MD_ASM_H */
117 * These are local overrides for various environment variables in Emacs.
118 * Please do not remove this and leave it at the end of the file, where
119 * Emacs will automagically detect them.
120 * ---------------------------------------------------------------------
123 * indent-tabs-mode: t
127 * vim:noexpandtab:sw=4:ts=4: