1/*  Macro definitions to used to support 32/64-bit code in Darwin's
2 *  assembly files.
3 *
4 *   Copyright (C) 2004 Free Software Foundation, Inc.
5 *
6 * This file is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
9 * later version.
10 *
11 * In addition to the permissions in the GNU General Public License, the
12 * Free Software Foundation gives you unlimited permission to link the
13 * compiled version of this file with other programs, and to distribute
14 * those programs without any restriction coming from the use of this
15 * file.  (The General Public License restrictions do apply in other
16 * respects; for example, they cover modification of the file, and
17 * distribution when not linked into another program.)
18 *
19 * This file is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; see the file COPYING.  If not, write to
26 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
27 * Boston, MA 02110-1301, USA.
28 *
29 *  As a special exception, if you link this library with files
30 *  compiled with GCC to produce an executable, this does not cause the
31 *  resulting executable to be covered by the GNU General Public License.
32 *  This exception does not however invalidate any other reasons why the
33 *  executable file might be covered by the GNU General Public License.
34 */
35
36/* These are donated from /usr/include/architecture/ppc . */
37
38#if defined(__ppc64__)
39#define MODE_CHOICE(x, y) y
40#else
41#define MODE_CHOICE(x, y) x
42#endif
43
44#define cmpg    MODE_CHOICE(cmpw, cmpd)
45#define lg      MODE_CHOICE(lwz, ld)
46#define stg     MODE_CHOICE(stw, std)
47#define lgx     MODE_CHOICE(lwzx, ldx)
48#define stgx    MODE_CHOICE(stwx, stdx)
49#define lgu     MODE_CHOICE(lwzu, ldu)
50#define stgu    MODE_CHOICE(stwu, stdu)
51#define lgux    MODE_CHOICE(lwzux, ldux)
52#define stgux   MODE_CHOICE(stwux, stdux)
53#define lgwa    MODE_CHOICE(lwz, lwa)
54
55#define g_long  MODE_CHOICE(long, quad)         /* usage is ".g_long" */
56
57#define GPR_BYTES       MODE_CHOICE(4,8)        /* size of a GPR in bytes */
58#define LOG2_GPR_BYTES  MODE_CHOICE(2,3)        /* log2(GPR_BYTES) */
59
60#define SAVED_LR_OFFSET MODE_CHOICE(8,16)	/* position of saved
61						   LR in frame */
62