1169689Skan/* Macro definitions to used to support 32/64-bit code in Darwin's 2169689Skan * assembly files. 3169689Skan * 4169689Skan * Copyright (C) 2004 Free Software Foundation, Inc. 5169689Skan * 6169689Skan * This file is free software; you can redistribute it and/or modify it 7169689Skan * under the terms of the GNU General Public License as published by the 8169689Skan * Free Software Foundation; either version 2, or (at your option) any 9169689Skan * later version. 10169689Skan * 11169689Skan * In addition to the permissions in the GNU General Public License, the 12169689Skan * Free Software Foundation gives you unlimited permission to link the 13169689Skan * compiled version of this file with other programs, and to distribute 14169689Skan * those programs without any restriction coming from the use of this 15169689Skan * file. (The General Public License restrictions do apply in other 16169689Skan * respects; for example, they cover modification of the file, and 17169689Skan * distribution when not linked into another program.) 18169689Skan * 19169689Skan * This file is distributed in the hope that it will be useful, but 20169689Skan * WITHOUT ANY WARRANTY; without even the implied warranty of 21169689Skan * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22169689Skan * General Public License for more details. 23169689Skan * 24169689Skan * You should have received a copy of the GNU General Public License 25169689Skan * along with this program; see the file COPYING. If not, write to 26169689Skan * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 27169689Skan * Boston, MA 02110-1301, USA. 28169689Skan * 29169689Skan * As a special exception, if you link this library with files 30169689Skan * compiled with GCC to produce an executable, this does not cause the 31169689Skan * resulting executable to be covered by the GNU General Public License. 32169689Skan * This exception does not however invalidate any other reasons why the 33169689Skan * executable file might be covered by the GNU General Public License. 34169689Skan */ 35169689Skan 36169689Skan/* These are donated from /usr/include/architecture/ppc . */ 37169689Skan 38169689Skan#if defined(__ppc64__) 39169689Skan#define MODE_CHOICE(x, y) y 40169689Skan#else 41169689Skan#define MODE_CHOICE(x, y) x 42169689Skan#endif 43169689Skan 44169689Skan#define cmpg MODE_CHOICE(cmpw, cmpd) 45169689Skan#define lg MODE_CHOICE(lwz, ld) 46169689Skan#define stg MODE_CHOICE(stw, std) 47169689Skan#define lgx MODE_CHOICE(lwzx, ldx) 48169689Skan#define stgx MODE_CHOICE(stwx, stdx) 49169689Skan#define lgu MODE_CHOICE(lwzu, ldu) 50169689Skan#define stgu MODE_CHOICE(stwu, stdu) 51169689Skan#define lgux MODE_CHOICE(lwzux, ldux) 52169689Skan#define stgux MODE_CHOICE(stwux, stdux) 53169689Skan#define lgwa MODE_CHOICE(lwz, lwa) 54169689Skan 55169689Skan#define g_long MODE_CHOICE(long, quad) /* usage is ".g_long" */ 56169689Skan 57169689Skan#define GPR_BYTES MODE_CHOICE(4,8) /* size of a GPR in bytes */ 58169689Skan#define LOG2_GPR_BYTES MODE_CHOICE(2,3) /* log2(GPR_BYTES) */ 59169689Skan 60169689Skan#define SAVED_LR_OFFSET MODE_CHOICE(8,16) /* position of saved 61169689Skan LR in frame */ 62