$NetBSD: patch-an,v 1.2 2010/01/17 08:00:47 dholland Exp $ - regparm is only for i386 - patch out gcc language extensions that are no longer supported --- features.h.orig 2001-02-01 22:56:32.000000000 +0000 +++ features.h @@ -48,6 +48,7 @@ #undef ET #undef RADR #undef GR_A +#undef GR_Ax #undef VADR #undef GREG #undef CREG @@ -70,8 +71,13 @@ #define ARCH_MODE ARCH_370 +#ifdef __i386__ #define DEF_INST(_name) \ __attribute__ ((regparm(3))) void s370_ ## _name (BYTE inst[], int execflag, REGS *regs) +#else +#define DEF_INST(_name) \ +void s370_ ## _name (BYTE inst[], int execflag, REGS *regs) +#endif #define ARCH_DEP(_name) \ s370_ ## _name @@ -104,6 +110,7 @@ s370_ ## _name #define CR(_r) CR_L(_r) #define GR(_r) GR_L(_r) #define GR_A(_r, _regs) ((_regs)->GR_L((_r))) +#define GR_Ax(_r, _regs, _val) (((_regs)->GR_L((_r))) = (_val)) #define MONCODE MC_L #define TEA EA_L #define ET ET_L @@ -129,8 +136,13 @@ s370_ ## _name #define ARCH_MODE ARCH_390 +#ifdef __i386__ #define DEF_INST(_name) \ __attribute__ ((regparm(3))) void s390_ ## _name (BYTE inst[], int execflag, REGS *regs) +#else +#define DEF_INST(_name) \ +void s390_ ## _name (BYTE inst[], int execflag, REGS *regs) +#endif #define ARCH_DEP(_name) \ s390_ ## _name @@ -163,6 +175,7 @@ s390_ ## _name #define CR(_r) CR_L(_r) #define GR(_r) GR_L(_r) #define GR_A(_r, _regs) ((_regs)->GR_L((_r))) +#define GR_Ax(_r, _regs, _val) (((_regs)->GR_L((_r))) = (_val)) #define MONCODE MC_L #define TEA EA_L #define ET ET_L @@ -211,8 +224,13 @@ s390_ ## _name #define SSEVENT_BIT ASCE_X #define SSGROUP_BIT ASCE_G +#ifdef __i386__ #define DEF_INST(_name) \ __attribute__ ((regparm(3))) void z900_ ## _name (BYTE inst[], int execflag, REGS *regs) +#else +#define DEF_INST(_name) \ +void z900_ ## _name (BYTE inst[], int execflag, REGS *regs) +#endif #define ARCH_DEP(_name) \ z900_ ## _name @@ -223,6 +241,7 @@ z900_ ## _name #define CR(_r) CR_G(_r) #define GR(_r) GR_G(_r) #define GR_A(_r, _regs) ((_regs)->psw.amode64 ? (_regs)->GR_G((_r)) : (_regs)->GR_L((_r))) +#define GR_Ax(_r, _regs, _val) ((_regs)->psw.amode64 ? ((_regs)->GR_G((_r)) = (_val)) : ((_regs)->GR_L((_r)) = (_val))) #define MONCODE MC_G #define TEA EA_G #define ET ET_G @@ -267,8 +286,13 @@ z900_ ## _name #define SSEVENT_BIT ASCE_X #define SSGROUP_BIT ASCE_G +#ifdef __i386__ #define DEF_INST(_name) \ __attribute__ ((regparm(3))) void z964_ ## _name (BYTE inst[], int execflag, REGS *regs) +#else +#define DEF_INST(_name) \ +void z964_ ## _name (BYTE inst[], int execflag, REGS *regs) +#endif #define ARCH_DEP(_name) \ z964_ ## _name @@ -279,6 +303,7 @@ z964_ ## _name #define CR(_r) CR_G(_r) #define GR(_r) GR_G(_r) #define GR_A(_r, _regs) ((_regs)->psw.amode64 ? (_regs)->GR_G((_r)) : (_regs)->GR_L((_r))) +#define GR_Ax(_r, _regs, _val) ((_regs)->psw.amode64 ? ((_regs)->GR_G((_r)) = (_val)) : ((_regs)->GR_L((_r)) = (_val))) #define MONCODE MC_G #define TEA EA_G #define ET ET_G