1 /* src/vm/jit/x86_64/md-asm.h - assembler defines for x86_64 Linux ABI
3 Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4 R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5 C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6 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., 59 Temple Place - Suite 330, Boston, MA
25 Contact: cacao@complang.tuwien.ac.at
27 Authors: Christian Thalinger
31 $Id: md-asm.h 2588 2005-06-08 10:58:04Z twisti $
40 /* register defines ***********************************************************/
77 /* save and restore macros ****************************************************/
79 #define SAVE_ARGUMENT_REGISTERS(off) \
80 mov a0,(0+(off))*8(%rsp) ; \
81 mov a1,(1+(off))*8(%rsp) ; \
82 mov a2,(2+(off))*8(%rsp) ; \
83 mov a3,(3+(off))*8(%rsp) ; \
84 mov a4,(4+(off))*8(%rsp) ; \
85 mov a5,(5+(off))*8(%rsp) ; \
87 movq fa0,(6+(off))*8(%rsp) ; \
88 movq fa1,(7+(off))*8(%rsp) ; \
89 movq fa2,(8+(off))*8(%rsp) ; \
90 movq fa3,(9+(off))*8(%rsp) ; \
91 movq fa4,(10+(off))*8(%rsp) ; \
92 movq fa5,(11+(off))*8(%rsp) ; \
93 movq fa6,(12+(off))*8(%rsp) ; \
94 movq fa7,(13+(off))*8(%rsp) ;
97 #define RESTORE_ARGUMENT_REGISTERS(off) \
98 mov (0+(off))*8(%rsp),a0 ; \
99 mov (1+(off))*8(%rsp),a1 ; \
100 mov (2+(off))*8(%rsp),a2 ; \
101 mov (3+(off))*8(%rsp),a3 ; \
102 mov (4+(off))*8(%rsp),a4 ; \
103 mov (5+(off))*8(%rsp),a5 ; \
105 movq (6+(off))*8(%rsp),fa0 ; \
106 movq (7+(off))*8(%rsp),fa1 ; \
107 movq (8+(off))*8(%rsp),fa2 ; \
108 movq (9+(off))*8(%rsp),fa3 ; \
109 movq (10+(off))*8(%rsp),fa4 ; \
110 movq (11+(off))*8(%rsp),fa5 ; \
111 movq (12+(off))*8(%rsp),fa6 ; \
112 movq (13+(off))*8(%rsp),fa7 ;
115 #define SAVE_TEMPORARY_REGISTERS(off) \
116 mov %rbx,(0+(off))*8(%rsp)
119 #define RESTORE_TEMPORARY_REGISTERS(off) \
120 mov (0+(off))*8(%rsp),%rbx
122 #endif /* _MD_ASM_H */
126 * These are local overrides for various environment variables in Emacs.
127 * Please do not remove this and leave it at the end of the file, where
128 * Emacs will automagically detect them.
129 * ---------------------------------------------------------------------
132 * indent-tabs-mode: t