From a08bcf9cd0c49fb4d95b1db1576601d6f232865d003e9bc1726a98eb15cb984a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 25 Jul 2008 02:42:31 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qemu?expand=0&rev=26 --- .gitattributes | 1 - COPYING.zx-rom | 4 - bug-380828_qemu-block-format-arg.diff | 68 - gcc-3.3.5.dif | 233 - gcc-3.3.5.tar.bz2 | 3 - gcc-abuildappease.patch | 10 - gcc-aliasing.diff | 42 - gcc-aliasing12.diff | 91 - gcc-aliasing3.diff | 269 -- gcc-altivec.diff | 5202 ---------------------- gcc-bug-reporting.patch | 31 - gcc-c99-double-inline.diff | 12 - gcc-c99numbers.diff | 17 - gcc-compact-dwarf2.patch | 446 -- gcc-configure.patch | 10 - gcc-cse-mem-expr.patch | 13 - gcc-emit-note.patch | 27 - gcc-ffi.patch | 10 - gcc-fworking-directory.patch | 446 -- gcc-gcc-3.3-ppc64.patch | 22 - gcc-gcc-3.3.5-hammer.patch.bz2 | 3 - gcc-gcc-noalias-warn.diff | 41 - gcc-gcc32-ada-addr2line.patch | 30 - gcc-gcc32-ada-link.patch | 80 - gcc-gcse-volatile.patch | 62 - gcc-head-tail.patch | 86 - gcc-hppa.patch | 27 - gcc-ia64intrin.patch | 149 - gcc-libgc.patch | 547 --- gcc-o_creat.dif | 11 - gcc-ppc-nof.patch | 44 - gcc-ppc-nostartfileprefix.patch | 20 - gcc-stl-multiple-defs.diff | 20 - gcc-suse46595.diff | 45 - gcc-swig-alias.patch | 31 - gcc-unwind-ia64.patch | 41 - linkerscripts.patch | 276 -- qemu-0.7.1-armfpaex.patch | 83 - qemu-0.8.3-gcc4.patch | 904 ---- qemu-0.9.1.tar.bz2 | 3 - qemu-20080703.tar.bz2 | 3 + qemu-cvs-futex.patch | 126 - qemu-cvs-ia64.patch | 10 +- qemu-cvs-ipc.patch | 46 +- qemu-cvs-mmap-amd64.patch | 18 +- qemu-cvs-mplayer.patch | 17 - qemu-cvs-newpath.patch | 2 +- qemu-cvs-noppcemb.patch | 13 - qemu-cvs-sched_getaffinity.patch | 24 +- qemu-cvs-tls.patch | 141 - qemu-img-vmdk-scsi.patch | 48 +- qemu-m68k.diff | 2726 ------------ qemu-s390.patch | 48 - qemu-s390dis-license.patch | 74 - qemu-svn-ncurses.patch | 20 + qemu-svn-nodyngen.patch | 26 + qemu-svn-pcap.patch | 189 + qemu-z80.diff | 5693 ------------------------- qemu.changes | 14 + qemu.spec | 206 +- zx-rom.bin | 3 - 61 files changed, 355 insertions(+), 18552 deletions(-) delete mode 100644 COPYING.zx-rom delete mode 100644 bug-380828_qemu-block-format-arg.diff delete mode 100644 gcc-3.3.5.dif delete mode 100644 gcc-3.3.5.tar.bz2 delete mode 100644 gcc-abuildappease.patch delete mode 100644 gcc-aliasing.diff delete mode 100644 gcc-aliasing12.diff delete mode 100644 gcc-aliasing3.diff delete mode 100644 gcc-altivec.diff delete mode 100644 gcc-bug-reporting.patch delete mode 100644 gcc-c99-double-inline.diff delete mode 100644 gcc-c99numbers.diff delete mode 100644 gcc-compact-dwarf2.patch delete mode 100644 gcc-configure.patch delete mode 100644 gcc-cse-mem-expr.patch delete mode 100644 gcc-emit-note.patch delete mode 100644 gcc-ffi.patch delete mode 100644 gcc-fworking-directory.patch delete mode 100644 gcc-gcc-3.3-ppc64.patch delete mode 100644 gcc-gcc-3.3.5-hammer.patch.bz2 delete mode 100644 gcc-gcc-noalias-warn.diff delete mode 100644 gcc-gcc32-ada-addr2line.patch delete mode 100644 gcc-gcc32-ada-link.patch delete mode 100644 gcc-gcse-volatile.patch delete mode 100644 gcc-head-tail.patch delete mode 100644 gcc-hppa.patch delete mode 100644 gcc-ia64intrin.patch delete mode 100644 gcc-libgc.patch delete mode 100644 gcc-o_creat.dif delete mode 100644 gcc-ppc-nof.patch delete mode 100644 gcc-ppc-nostartfileprefix.patch delete mode 100644 gcc-stl-multiple-defs.diff delete mode 100644 gcc-suse46595.diff delete mode 100644 gcc-swig-alias.patch delete mode 100644 gcc-unwind-ia64.patch delete mode 100644 linkerscripts.patch delete mode 100644 qemu-0.7.1-armfpaex.patch delete mode 100644 qemu-0.8.3-gcc4.patch delete mode 100644 qemu-0.9.1.tar.bz2 create mode 100644 qemu-20080703.tar.bz2 delete mode 100644 qemu-cvs-futex.patch delete mode 100644 qemu-cvs-mplayer.patch delete mode 100644 qemu-cvs-noppcemb.patch delete mode 100644 qemu-cvs-tls.patch delete mode 100644 qemu-m68k.diff delete mode 100644 qemu-s390.patch delete mode 100644 qemu-s390dis-license.patch create mode 100644 qemu-svn-ncurses.patch create mode 100644 qemu-svn-nodyngen.patch create mode 100644 qemu-svn-pcap.patch delete mode 100644 qemu-z80.diff delete mode 100644 zx-rom.bin diff --git a/.gitattributes b/.gitattributes index b38efbd7..3827e92d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -23,4 +23,3 @@ *.zst filter=lfs diff=lfs merge=lfs -text ## Specific LFS patterns kvm_bios.bin filter=lfs diff=lfs merge=lfs -text -zx-rom.bin filter=lfs diff=lfs merge=lfs -text diff --git a/COPYING.zx-rom b/COPYING.zx-rom deleted file mode 100644 index 4f74092e..00000000 --- a/COPYING.zx-rom +++ /dev/null @@ -1,4 +0,0 @@ -Amstrad have kindly given their permission for the redistribution of their -copyrighted material but retain that copyright. - -http://www.worldofspectrum.org/permits/amstrad-roms.txt diff --git a/bug-380828_qemu-block-format-arg.diff b/bug-380828_qemu-block-format-arg.diff deleted file mode 100644 index 4ea08dd4..00000000 --- a/bug-380828_qemu-block-format-arg.diff +++ /dev/null @@ -1,68 +0,0 @@ -From: Chris Wright -Subject: [PATCH] add format= to drive options - -A guest with a raw format disk can write any format header to that device. -A subsequent restart of the guest will cause qemu to interpret the format -header and could allow the guest read access to any host file. Add a -format= drive option to allow host to specify, e.g. format=raw, to give -qemu a hint to choose a specific block format driver. Originially noted -by Avi Kivity . - -Signed-off-by: Chris Wright -[Aurelien Jarno: port to SVN tip for QEMU) -================================================================================ ---- qemu-0.9.1/qemu-doc.texi -+++ qemu-0.9.1/qemu-doc.texi -@@ -252,6 +252,10 @@ - @var{snapshot} is "on" or "off" and allows to enable snapshot for given drive (see @option{-snapshot}). - @item cache=@var{cache} - @var{cache} is "on" or "off" and allows to disable host cache to access data. -+@item format=@var{format} -+Specify which disk @var{format} will be used rather than detecting -+the format. Can be used to specifiy format=raw to avoid interpreting -+an untrusted format header. - @end table - - Instead of @option{-cdrom} you can use: ---- qemu-0.9.1/vl.c -+++ qemu-0.9.1/vl.c -@@ -4877,13 +4877,14 @@ - int bus_id, unit_id; - int cyls, heads, secs, translation; - BlockDriverState *bdrv; -+ BlockDriver *drv = NULL; - int max_devs; - int index; - int cache; - int bdrv_flags; - char *params[] = { "bus", "unit", "if", "index", "cyls", "heads", - "secs", "trans", "media", "snapshot", "file", -- "cache", NULL }; -+ "cache", "format", NULL }; - - if (check_params(buf, sizeof(buf), params, str) < 0) { - fprintf(stderr, "qemu: unknowm parameter '%s' in '%s'\n", -@@ -5051,6 +5052,14 @@ - } - } - -+ if (get_param_value(buf, sizeof(buf), "format", str)) { -+ drv = bdrv_find_format(buf); -+ if (!drv) { -+ fprintf(stderr, "qemu: '%s' invalid format\n", buf); -+ return -1; -+ } -+ } -+ - get_param_value(file, sizeof(file), "file", str); - - /* compute bus and unit according index */ -@@ -5150,7 +5159,7 @@ - bdrv_flags |= BDRV_O_SNAPSHOT; - if (!cache) - bdrv_flags |= BDRV_O_DIRECT; -- if (bdrv_open(bdrv, file, bdrv_flags) < 0 || qemu_key_check(bdrv, file)) { -+ if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0 || qemu_key_check(bdrv, file)) { - fprintf(stderr, "qemu: could not open disk image %s\n", - file); - return -1; diff --git a/gcc-3.3.5.dif b/gcc-3.3.5.dif deleted file mode 100644 index 4f7abec9..00000000 --- a/gcc-3.3.5.dif +++ /dev/null @@ -1,233 +0,0 @@ ---- gcc/config/rs6000/darwin-ldouble.c -+++ gcc/config/rs6000/darwin-ldouble.c -@@ -1,4 +1,208 @@ - /* 128-bit long double support routines for Darwin. -+ Copyright (C) 1993, 2003, 2004, 2005, 2006 -+ Free Software Foundation, Inc. -+ -+This file is part of GCC. -+ -+GCC is free software; you can redistribute it and/or modify it under -+the terms of the GNU General Public License as published by the Free -+Software Foundation; either version 2, or (at your option) any later -+version. -+ -+In addition to the permissions in the GNU General Public License, the -+Free Software Foundation gives you unlimited permission to link the -+compiled version of this file into combinations with other programs, -+and to distribute those combinations without any restriction coming -+from the use of this file. (The General Public License restrictions -+do apply in other respects; for example, they cover modification of -+the file, and distribution when not linked into a combine -+executable.) -+ -+GCC is distributed in the hope that it will be useful, but WITHOUT ANY -+WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GCC; see the file COPYING. If not, write to the Free -+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301, USA. */ -+ -+/* Implementations of floating-point long double basic arithmetic -+ functions called by the IBM C compiler when generating code for -+ PowerPC platforms. In particular, the following functions are -+ implemented: __gcc_qadd, __gcc_qsub, __gcc_qmul, and __gcc_qdiv. -+ Double-double algorithms are based on the paper "Doubled-Precision -+ IEEE Standard 754 Floating-Point Arithmetic" by W. Kahan, February 26, -+ 1987. An alternative published reference is "Software for -+ Doubled-Precision Floating-Point Computations", by Seppo Linnainmaa, -+ ACM TOMS vol 7 no 3, September 1981, pages 272-283. */ -+ -+/* Each long double is made up of two IEEE doubles. The value of the -+ long double is the sum of the values of the two parts. The most -+ significant part is required to be the value of the long double -+ rounded to the nearest double, as specified by IEEE. For Inf -+ values, the least significant part is required to be one of +0.0 or -+ -0.0. No other requirements are made; so, for example, 1.0 may be -+ represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a -+ NaN is don't-care. -+ -+ This code currently assumes big-endian. */ -+ -+#if (!defined (__NO_FPRS__) && !defined (__LITTLE_ENDIAN__) \ -+ && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX))) -+ -+#define fabs(x) __builtin_fabs(x) -+#define isless(x, y) __builtin_isless (x, y) -+#define inf() __builtin_inf() -+ -+#define unlikely(x) __builtin_expect ((x), 0) -+ -+#define nonfinite(a) unlikely (! isless (fabs (a), inf ())) -+ -+/* All these routines actually take two long doubles as parameters, -+ but GCC currently generates poor code when a union is used to turn -+ a long double into a pair of doubles. */ -+ -+extern long double __gcc_qadd (double, double, double, double); -+extern long double __gcc_qsub (double, double, double, double); -+extern long double __gcc_qmul (double, double, double, double); -+extern long double __gcc_qdiv (double, double, double, double); -+ -+#if defined __ELF__ && defined SHARED \ -+ && (defined __powerpc64__ || !(defined __linux__ || defined __gnu_hurd__)) -+/* Provide definitions of the old symbol names to satisfy apps and -+ shared libs built against an older libgcc. To access the _xlq -+ symbols an explicit version reference is needed, so these won't -+ satisfy an unadorned reference like _xlqadd. If dot symbols are -+ not needed, the assembler will remove the aliases from the symbol -+ table. */ -+__asm__ (".symver __gcc_qadd,_xlqadd@GCC_3.4\n\t" -+ ".symver __gcc_qsub,_xlqsub@GCC_3.4\n\t" -+ ".symver __gcc_qmul,_xlqmul@GCC_3.4\n\t" -+ ".symver __gcc_qdiv,_xlqdiv@GCC_3.4\n\t" -+ ".symver .__gcc_qadd,._xlqadd@GCC_3.4\n\t" -+ ".symver .__gcc_qsub,._xlqsub@GCC_3.4\n\t" -+ ".symver .__gcc_qmul,._xlqmul@GCC_3.4\n\t" -+ ".symver .__gcc_qdiv,._xlqdiv@GCC_3.4"); -+#endif -+ -+typedef union -+{ -+ long double ldval; -+ double dval[2]; -+} longDblUnion; -+ -+/* Add two 'long double' values and return the result. */ -+long double -+__gcc_qadd (double a, double aa, double c, double cc) -+{ -+ longDblUnion x; -+ double z, q, zz, xh; -+ -+ z = a + c; -+ -+ if (nonfinite (z)) -+ { -+ z = cc + aa + c + a; -+ if (nonfinite (z)) -+ return z; -+ x.dval[0] = z; /* Will always be DBL_MAX. */ -+ zz = aa + cc; -+ if (fabs(a) > fabs(c)) -+ x.dval[1] = a - z + c + zz; -+ else -+ x.dval[1] = c - z + a + zz; -+ } -+ else -+ { -+ q = a - z; -+ zz = q + c + (a - (q + z)) + aa + cc; -+ -+ /* Keep -0 result. */ -+ if (zz == 0.0) -+ return z; -+ -+ xh = z + zz; -+ if (nonfinite (xh)) -+ return xh; -+ -+ x.dval[0] = xh; -+ x.dval[1] = z - xh + zz; -+ } -+ return x.ldval; -+} -+ -+long double -+__gcc_qsub (double a, double b, double c, double d) -+{ -+ return __gcc_qadd (a, b, -c, -d); -+} -+ -+long double -+__gcc_qmul (double a, double b, double c, double d) -+{ -+ longDblUnion z; -+ double t, tau, u, v, w; -+ -+ t = a * c; /* Highest order double term. */ -+ -+ if (unlikely (t == 0) /* Preserve -0. */ -+ || nonfinite (t)) -+ return t; -+ -+ /* Sum terms of two highest orders. */ -+ -+ /* Use fused multiply-add to get low part of a * c. */ -+ asm ("fmsub %0,%1,%2,%3" : "=f"(tau) : "f"(a), "f"(c), "f"(t)); -+ v = a*d; -+ w = b*c; -+ tau += v + w; /* Add in other second-order terms. */ -+ u = t + tau; -+ -+ /* Construct long double result. */ -+ if (nonfinite (u)) -+ return u; -+ z.dval[0] = u; -+ z.dval[1] = (t - u) + tau; -+ return z.ldval; -+} -+ -+long double -+__gcc_qdiv (double a, double b, double c, double d) -+{ -+ longDblUnion z; -+ double s, sigma, t, tau, u, v, w; -+ -+ t = a / c; /* highest order double term */ -+ -+ if (unlikely (t == 0) /* Preserve -0. */ -+ || nonfinite (t)) -+ return t; -+ -+ /* Finite nonzero result requires corrections to the highest order term. */ -+ -+ s = c * t; /* (s,sigma) = c*t exactly. */ -+ w = -(-b + d * t); /* Written to get fnmsub for speed, but not -+ numerically necessary. */ -+ -+ /* Use fused multiply-add to get low part of c * t. */ -+ asm ("fmsub %0,%1,%2,%3" : "=f"(sigma) : "f"(c), "f"(t), "f"(s)); -+ v = a - s; -+ -+ tau = ((v-sigma)+w)/c; /* Correction to t. */ -+ u = t + tau; -+ -+ /* Construct long double result. */ -+ if (nonfinite (u)) -+ return u; -+ z.dval[0] = u; -+ z.dval[1] = (t - u) + tau; -+ return z.ldval; -+} -+ -+#endif -+/* 128-bit long double support routines for Darwin. - Copyright (C) 1993, 2003, 2004 Free Software Foundation, Inc. - - This file is part of GCC. ---- gcc/config/rs6000/t-newas -+++ gcc/config/rs6000/t-newas -@@ -42,6 +42,9 @@ - LIBGCC = stmp-multilib - INSTALL_LIBGCC = install-multilib - -+# GCC 128-bit long double support routines. -+LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c -+ - # Aix 3.2.x needs milli.exp for -mcpu=common - EXTRA_PARTS = milli.exp - milli.exp: $(srcdir)/config/rs6000/milli.exp ---- gcc/config/rs6000/t-ppccomm -+++ gcc/config/rs6000/t-ppccomm -@@ -1,6 +1,6 @@ - # Common support for PowerPC ELF targets (both EABI and SVR4). - --LIB2FUNCS_EXTRA = tramp.S -+LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/darwin-ldouble.c - - # This one can't end up in shared libgcc - LIB2FUNCS_STATIC_EXTRA = eabi.S diff --git a/gcc-3.3.5.tar.bz2 b/gcc-3.3.5.tar.bz2 deleted file mode 100644 index 254e2338..00000000 --- a/gcc-3.3.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ae90c6948d2654a254116fabb0cc7e474abf51ea841e6ef5cd8e6c161a9fa74 -size 23833856 diff --git a/gcc-abuildappease.patch b/gcc-abuildappease.patch deleted file mode 100644 index 4b4df24d..00000000 --- a/gcc-abuildappease.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- gcc-3.3.5/gcc/cppexp.c -+++ gcc-3.3.5/gcc/cppexp.c -@@ -1448,6 +1448,7 @@ - result.high += HIGH_PART (middle[0]); - result.high += HIGH_PART (middle[1]); - result.unsignedp = 1; -+ result.overflow = 0; - - return result; - } diff --git a/gcc-aliasing.diff b/gcc-aliasing.diff deleted file mode 100644 index cbc6286e..00000000 --- a/gcc-aliasing.diff +++ /dev/null @@ -1,42 +0,0 @@ -Index: emit-rtl.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v -retrieving revision 1.302.2.4 -diff -u -p -r1.302.2.4 emit-rtl.c ---- gcc/emit-rtl.c 1 May 2003 09:55:39 -0000 1.302.2.4 -+++ gcc/emit-rtl.c 28 Jul 2003 18:30:35 -0000 -@@ -1684,6 +1684,22 @@ component_ref_for_mem_expr (ref) - TREE_OPERAND (ref, 1)); - } - -+static int indirect_ref_nonzero_ofs_p PARAMS ((tree)); -+static int -+indirect_ref_nonzero_ofs_p (t) -+ tree t; -+{ -+ tree op0, op1; -+ t = TREE_OPERAND (t, 0); -+ if (TREE_CODE (t) != PLUS_EXPR) -+ return 0; -+ op0 = TREE_OPERAND (t, 0); -+ op1 = TREE_OPERAND (t, 1); -+ if (TREE_CODE (op1) == INTEGER_CST && (1 || !integer_zerop (op1))) -+ return 1; -+ return 0; -+} -+ - /* Given REF, a MEM, and T, either the type of X or the expression - corresponding to REF, set the memory attributes. OBJECTP is nonzero - if we are making a new object of this type. BITPOS is nonzero if -@@ -1911,6 +1930,11 @@ set_mem_attributes_minus_bitpos (ref, t, - else if (TREE_CODE (t) == COMPONENT_REF || TREE_CODE (t) == ARRAY_REF - || TREE_CODE (t) == ARRAY_RANGE_REF - || TREE_CODE (t) == BIT_FIELD_REF) -+ MEM_IN_STRUCT_P (ref) = 1; -+ /* An INDIRECT_REF of an PLUS expression of something with a -+ non-zero offset also is part of an aggregate. */ -+ else if (TREE_CODE (t) == INDIRECT_REF -+ && indirect_ref_nonzero_ofs_p (t)) - MEM_IN_STRUCT_P (ref) = 1; - } - diff --git a/gcc-aliasing12.diff b/gcc-aliasing12.diff deleted file mode 100644 index 7b8465a2..00000000 --- a/gcc-aliasing12.diff +++ /dev/null @@ -1,91 +0,0 @@ -Index: rtl.h -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/rtl.h,v -retrieving revision 1.374.2.10 -diff -u -p -r1.374.2.10 rtl.h ---- gcc/rtl.h 21 Jun 2003 22:47:01 -0000 1.374.2.10 -+++ gcc/rtl.h 10 Aug 2003 21:20:12 -0000 -@@ -141,7 +141,8 @@ struct rtx_def GTY((chain_next ("RTX_NEX - In a CODE_LABEL, part of the two-bit alternate entry field. */ - unsigned int jump : 1; - /* In a CODE_LABEL, part of the two-bit alternate entry field. -- 1 in a MEM if it cannot trap. */ -+ 1 in a MEM if it cannot trap. -+ 1 in a SYMBOL_REF which refers to a read-only object. */ - unsigned int call : 1; - /* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere. - 1 in a SUBREG if it references an unsigned object whose mode has been -@@ -1241,6 +1242,10 @@ do { \ - /* 1 if RTX is a symbol_ref for a weak symbol. */ - #define SYMBOL_REF_WEAK(RTX) \ - (RTL_FLAG_CHECK1("SYMBOL_REF_WEAK", (RTX), SYMBOL_REF)->integrated) -+ -+/* 1 if RTX is a symbol_ref for a readonly object. */ -+#define SYMBOL_REF_READONLY(RTX) \ -+ (RTL_FLAG_CHECK1("SYMBOL_REF_READONLY", (RTX), SYMBOL_REF)->call) - - /* Define a macro to look for REG_INC notes, - but save time on machines where they never exist. */ -Index: alias.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/alias.c,v -retrieving revision 1.180.2.4 -diff -u -p -r1.180.2.4 alias.c ---- gcc/alias.c 21 Jun 2003 22:47:00 -0000 1.180.2.4 -+++ gcc/alias.c 10 Aug 2003 21:20:12 -0000 -@@ -2071,7 +2071,7 @@ true_dependence (mem, mem_mode, x, varie - int (*varies) PARAMS ((rtx, int)); - { - rtx x_addr, mem_addr; -- rtx base; -+ rtx base, mem_base; - - if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem)) - return 1; -@@ -2109,9 +2109,12 @@ true_dependence (mem, mem_mode, x, varie - mem_addr = get_addr (XEXP (mem, 0)); - - base = find_base_term (x_addr); -+ mem_base = find_base_term (mem_addr); - if (base && (GET_CODE (base) == LABEL_REF - || (GET_CODE (base) == SYMBOL_REF -- && CONSTANT_POOL_ADDRESS_P (base)))) -+ && ((SYMBOL_REF_READONLY (base) -+ && !rtx_equal_p (base, mem_base)) -+ || CONSTANT_POOL_ADDRESS_P (base))))) - return 0; - - if (! base_alias_check (x_addr, mem_addr, GET_MODE (x), mem_mode)) -Index: varasm.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/varasm.c,v -retrieving revision 1.318.2.11 -diff -u -p -r1.318.2.11 varasm.c ---- gcc/varasm.c 19 Jul 2003 14:57:43 -0000 1.318.2.11 -+++ gcc/varasm.c 10 Aug 2003 21:20:12 -0000 -@@ -941,6 +941,8 @@ make_decl_rtl (decl, asmspec) - SYMBOL_REF_WEAK (XEXP (x, 0)) = DECL_WEAK (decl); - if (TREE_CODE (decl) != FUNCTION_DECL) - set_mem_attributes (x, decl, 1); -+ if (RTX_UNCHANGING_P (x)) -+ SYMBOL_REF_READONLY (XEXP (x, 0)) = 1; - SET_DECL_RTL (decl, x); - - /* Optionally set flags or add text to the name to record information -@@ -2731,6 +2733,8 @@ output_constant_def (exp, defer) - gen_rtx_SYMBOL_REF (Pmode, desc->label)); - - set_mem_attributes (rtl, exp, 1); -+ if (RTX_UNCHANGING_P (rtl)) -+ SYMBOL_REF_READONLY (XEXP (rtl, 0)) = 1; - set_mem_alias_set (rtl, 0); - set_mem_alias_set (rtl, const_alias_set); - -@@ -3299,6 +3303,7 @@ force_const_mem (mode, x) - set_mem_alias_set (def, const_alias_set); - set_mem_attributes (def, (*lang_hooks.types.type_for_mode) (mode, 0), 1); - RTX_UNCHANGING_P (def) = 1; -+ SYMBOL_REF_READONLY (XEXP (def, 0)) = 1; - - /* Add label to symbol hash table. */ - hash = SYMHASH (XSTR (XEXP (def, 0), 0)); diff --git a/gcc-aliasing3.diff b/gcc-aliasing3.diff deleted file mode 100644 index d4678b36..00000000 --- a/gcc-aliasing3.diff +++ /dev/null @@ -1,269 +0,0 @@ -Index: fold-const.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v -retrieving revision 1.226.2.9 -diff -u -p -r1.226.2.9 fold-const.c ---- gcc/fold-const.c 21 Jul 2003 19:07:12 -0000 1.226.2.9 -+++ gcc/fold-const.c 30 Jul 2003 21:29:05 -0000 -@@ -1011,6 +1011,233 @@ associate_trees (t1, t2, code, type) - - return fold (build (code, type, convert (type, t1), convert (type, t2))); - } -+ -+static tree tree_get_index PARAMS ((tree)); -+static int indirect_ref_zero_ofs_p PARAMS ((tree)); -+static int indirect_ref_nonzero_ofs_p PARAMS ((tree)); -+static tree associate_trees_refs PARAMS ((tree, tree, enum tree_code, tree)); -+static void split_tree_indirect_refs PARAMS ((tree, enum tree_code, tree)); -+static void split_tree_for_reorder PARAMS ((tree, enum tree_code, tree)); -+static int compare_trees PARAMS ((const PTR, const PTR)); -+static tree reorder_memrefs PARAMS ((tree, tree, enum tree_code, tree)); -+static tree reorder_summands PARAMS ((tree, tree, enum tree_code, tree)); -+ -+static tree -+tree_get_index (t) -+ tree t; -+{ -+ if (TREE_CODE (t) == ARRAY_REF) -+ return TREE_OPERAND (t, 1); -+ else -+ { -+ t = TREE_OPERAND (t, 0); -+ if (TREE_CODE (t) != PLUS_EXPR) -+ return NULL_TREE; -+ return TREE_OPERAND (t, 1); -+ } -+} -+ -+static int -+indirect_ref_nonzero_ofs_p (t) -+ tree t; -+{ -+ tree i = tree_get_index (t); -+ if (i && TREE_CODE (i) == INTEGER_CST && !integer_zerop (i)) -+ return 1; -+ return 0; -+} -+ -+static int -+indirect_ref_zero_ofs_p (t) -+ tree t; -+{ -+ tree i = tree_get_index (t); -+ if (!i) -+ return 1; -+ if (TREE_CODE (i) == INTEGER_CST && integer_zerop (i)) -+ return 1; -+ return 0; -+} -+ -+static tree -+associate_trees_refs (t1, t2, code, type) -+ tree t1, t2; -+ enum tree_code code; -+ tree type; -+{ -+ if (t1 == 0) -+ return t2; -+ else if (t2 == 0) -+ return t1; -+ return build (code, type, convert (type, t1), convert (type, t2)); -+} -+ -+#define MAX_SUMMANDS 100 -+static tree merged_z, merged_nz, merged_rest; -+static tree summands[MAX_SUMMANDS]; -+static int num_summands; -+static void -+split_tree_indirect_refs (in, code, type) -+ tree in; -+ enum tree_code code; -+ tree type; -+{ -+ /* Strip any conversions that don't change the machine mode or signedness. */ -+ STRIP_SIGN_NOPS (in); -+ -+ if (TREE_CODE (in) == INDIRECT_REF || TREE_CODE (in) == ARRAY_REF) -+ { -+ if (indirect_ref_zero_ofs_p (in)) -+ merged_z = associate_trees_refs (merged_z, in, code, type); -+ else if (indirect_ref_nonzero_ofs_p (in)) -+ merged_nz = associate_trees_refs (merged_nz, in, code, type); -+ else -+ merged_rest = associate_trees_refs (merged_rest, in, code, type); -+ } -+ else if (TREE_CODE (in) == code) -+ { -+ tree op0 = TREE_OPERAND (in, 0); -+ tree op1 = TREE_OPERAND (in, 1); -+ split_tree_indirect_refs (op0, code, type); -+ split_tree_indirect_refs (op1, code, type); -+ } -+ else -+ merged_rest = associate_trees_refs (merged_rest, in, code, type); -+} -+ -+static void -+split_tree_for_reorder (in, code, type) -+ tree in; -+ enum tree_code code; -+ tree type; -+{ -+ /* Strip any conversions that don't change the machine mode or signedness. */ -+ STRIP_SIGN_NOPS (in); -+ -+ if ((TREE_CODE (in) == INDIRECT_REF -+ || TREE_CODE (in) == ARRAY_REF -+ || TREE_CODE (in) == VAR_DECL) -+ && num_summands < MAX_SUMMANDS) -+ summands[num_summands++] = in; -+ else if (TREE_CODE (in) == code) -+ { -+ tree op0 = TREE_OPERAND (in, 0); -+ tree op1 = TREE_OPERAND (in, 1); -+ split_tree_for_reorder (op0, code, type); -+ split_tree_for_reorder (op1, code, type); -+ } -+ else -+ merged_rest = associate_trees_refs (merged_rest, in, code, type); -+} -+ -+static int -+compare_trees (v1, v2) -+ const PTR v1; -+ const PTR v2; -+{ -+ tree t1 = *((const tree *) v1); -+ tree t2 = *((const tree *) v2); -+ -+ if (t1 == t2) -+ return 0; -+ /* Everything besides var_decls and indirect_refs last. */ -+ if (TREE_CODE (t1) != INDIRECT_REF -+ && TREE_CODE (t1) != ARRAY_REF -+ && TREE_CODE (t1) != VAR_DECL) -+ return 1; -+ if (TREE_CODE (t2) != INDIRECT_REF -+ && TREE_CODE (t2) != ARRAY_REF -+ && TREE_CODE (t2) != VAR_DECL) -+ return -1; -+ /* All indirect_refs with nonzero index before var_decls. -+ All indirect_refs with zero index after var_decls. */ -+ if (TREE_CODE (t1) != TREE_CODE (t2)) -+ { -+ if (TREE_CODE (t1) == INDIRECT_REF || TREE_CODE (t1) == ARRAY_REF) -+ { -+ if (indirect_ref_nonzero_ofs_p (t1)) -+ return -1; -+ else -+ return 1; -+ } -+ /* t2 is a INDIRECT_REF or ARRAY_REF, so we can call that without -+ checking. */ -+ else if (indirect_ref_nonzero_ofs_p (t2)) -+ return 1; -+ else -+ return -1; -+ } -+ if (TREE_CODE (t1) == VAR_DECL) -+ { -+ if (IDENTIFIER_HASH_VALUE (DECL_NAME (t1)) -+ < IDENTIFIER_HASH_VALUE (DECL_NAME (t2))) -+ return -1; -+ else -+ return 1; -+ } -+ /* We have two indirect_refs here. */ -+ if (indirect_ref_nonzero_ofs_p (t1) && indirect_ref_nonzero_ofs_p (t2)) -+ /* As both had non-zero index, we know that tree_get_index() really -+ returns INTEGER_CST. */ -+ return tree_int_cst_compare (tree_get_index (t1), tree_get_index (t2)); -+ else if (indirect_ref_zero_ofs_p (t1)) -+ return 1; -+ else -+ return -1; -+} -+ -+static tree -+reorder_memrefs (in0, in1, code, type) -+ tree in0, in1; -+ enum tree_code code; -+ tree type; -+{ -+ tree ret = 0; -+ merged_z = 0; -+ merged_nz = 0; -+ merged_rest = 0; -+ /* XXX We can't yet handle MINUS_EXPR. */ -+ if (code == MINUS_EXPR) -+ return 0; -+ if (in0) -+ split_tree_indirect_refs (in0, code, type); -+ if (in1) -+ split_tree_indirect_refs (in1, code, type); -+ if (merged_nz || merged_z) -+ { -+ ret = associate_trees_refs (merged_nz, merged_z, code, type); -+ ret = associate_trees_refs (ret, merged_rest, code, type); -+ } -+ return ret; -+} -+ -+static tree -+reorder_summands (in0, in1, code, type) -+ tree in0, in1; -+ enum tree_code code; -+ tree type; -+{ -+ tree ret = 0; -+ merged_rest = 0; -+ num_summands = 0; -+ /* XXX We can't yet handle MINUS_EXPR. */ -+ if (code == MINUS_EXPR) -+ return 0; -+ if (in0) -+ split_tree_for_reorder (in0, code, type); -+ if (in1) -+ split_tree_for_reorder (in1, code, type); -+ if (num_summands > 2) -+ { -+ int i; -+ qsort (summands, num_summands, sizeof (tree), compare_trees); -+ ret = summands[0]; -+ for (i = 1; i < num_summands; i++) -+ ret = associate_trees_refs (ret, summands[i], code, type); -+ ret = associate_trees_refs (ret, merged_rest, code, type); -+ } -+ return ret; -+} - - /* Combine two integer constants ARG1 and ARG2 under operation CODE - to produce a new constant. -@@ -5378,11 +5605,16 @@ fold (expr) - + (lit0 != 0) + (lit1 != 0) - + (minus_lit0 != 0) + (minus_lit1 != 0))) - { -+ tree tmp; -+ tmp = reorder_summands (var0, var1, code, type); - /* Recombine MINUS_EXPR operands by using PLUS_EXPR. */ - if (code == MINUS_EXPR) - code = PLUS_EXPR; - -- var0 = associate_trees (var0, var1, code, type); -+ if (tmp) -+ var0 = tmp; -+ else -+ var0 = associate_trees (var0, var1, code, type); - con0 = associate_trees (con0, con1, code, type); - lit0 = associate_trees (lit0, lit1, code, type); - minus_lit0 = associate_trees (minus_lit0, minus_lit1, code, type); -@@ -5424,6 +5656,9 @@ fold (expr) - con0 = associate_trees (con0, lit0, code, type); - return convert (type, associate_trees (var0, con0, code, type)); - } -+ var0 = reorder_summands (arg0, arg1, code, type); -+ if (var0) -+ return convert (type, var0); - } - - binary: diff --git a/gcc-altivec.diff b/gcc-altivec.diff deleted file mode 100644 index 1238844b..00000000 --- a/gcc-altivec.diff +++ /dev/null @@ -1,5202 +0,0 @@ ---- gcc/config/rs6000/altivec.h.~1.20.18.5.~ 2004-06-22 21:48:10.000000000 +0200 -+++ gcc/config/rs6000/altivec.h 2004-10-09 17:34:47.978909835 +0200 -@@ -7910,508 +7910,508 @@ vec_any_out (vector float a1, vector flo - #define __ch(x, y, z) __builtin_choose_expr (x, y, z) - - #define vec_step(t) \ -- __ch (__builtin_types_compatible_p (typeof (t), vector signed int), 4, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector unsigned int), 4, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector bool int), 4, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector signed short), 8, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector unsigned short), 8, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector bool short), 8, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector pixel), 8, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector signed char), 16, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector unsigned char), 16, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector bool char), 16, \ -- __ch (__builtin_types_compatible_p (typeof (t), vector float), 4, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector signed int), 4, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector unsigned int), 4, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector __bool int), 4, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector signed short), 8, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector unsigned short), 8, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector __bool short), 8, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector __pixel), 8, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector signed char), 16, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector unsigned char), 16, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector __bool char), 16, \ -+ __ch (__builtin_types_compatible_p (typeof (t), __vector float), 4, \ - __builtin_altivec_compiletime_error ("vec_step")))))))))))) - - #define vec_abs(a) \ -- __ch (__un_args_eq (vector signed char, (a)), \ -- ((vector signed char) __builtin_altivec_abs_v16qi ((vector signed char) (a))), \ -- __ch (__un_args_eq (vector signed short, (a)), \ -- ((vector signed short) __builtin_altivec_abs_v8hi ((vector signed short) (a))), \ -- __ch (__un_args_eq (vector signed int, (a)), \ -- ((vector signed int) __builtin_altivec_abs_v4si ((vector signed int) (a))), \ -- __ch (__un_args_eq (vector float, (a)), \ -- ((vector float) __builtin_altivec_abs_v4sf ((vector float) (a))), \ -+ __ch (__un_args_eq (__vector signed char, (a)), \ -+ ((__vector signed char) __builtin_altivec_abs_v16qi ((__vector signed char) (a))), \ -+ __ch (__un_args_eq (__vector signed short, (a)), \ -+ ((__vector signed short) __builtin_altivec_abs_v8hi ((__vector signed short) (a))), \ -+ __ch (__un_args_eq (__vector signed int, (a)), \ -+ ((__vector signed int) __builtin_altivec_abs_v4si ((__vector signed int) (a))), \ -+ __ch (__un_args_eq (__vector float, (a)), \ -+ ((__vector float) __builtin_altivec_abs_v4sf ((__vector float) (a))), \ - __builtin_altivec_compiletime_error ("vec_abs"))))) - - #define vec_abss(a) \ -- __ch (__un_args_eq (vector signed char, (a)), \ -- ((vector signed char) __builtin_altivec_abss_v16qi ((vector signed char) (a))), \ -- __ch (__un_args_eq (vector signed short, (a)), \ -- ((vector signed short) __builtin_altivec_abss_v8hi ((vector signed short) (a))), \ -- __ch (__un_args_eq (vector signed int, (a)), \ -- ((vector signed int) __builtin_altivec_abss_v4si ((vector signed int) (a))), \ -+ __ch (__un_args_eq (__vector signed char, (a)), \ -+ ((__vector signed char) __builtin_altivec_abss_v16qi ((__vector signed char) (a))), \ -+ __ch (__un_args_eq (__vector signed short, (a)), \ -+ ((__vector signed short) __builtin_altivec_abss_v8hi ((__vector signed short) (a))), \ -+ __ch (__un_args_eq (__vector signed int, (a)), \ -+ ((__vector signed int) __builtin_altivec_abss_v4si ((__vector signed int) (a))), \ - __builtin_altivec_compiletime_error ("vec_abss")))) - - #define vec_vaddubm(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vaddubm"))))) - - #define vec_vadduhm(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vadduhm"))))) - - #define vec_vadduwm(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector signed int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vadduwm"))))) - - #define vec_vaddfp(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vaddfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vaddfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vaddfp")) - - #define vec_add(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vaddfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vaddfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_add")))))))))))))))))))) - - #define vec_addc(a1, a2) \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vaddcuw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vaddcuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_addc")) - - #define vec_adds(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vaddsbs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vaddsbs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vaddsbs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vaddshs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vaddshs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vaddshs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vaddsws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vaddsws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vaddsws ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_adds"))))))))))))))))))) - - #define vec_vaddsws(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vaddsws ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vaddsws")) - - #define vec_vadduws(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector signed int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vadduws ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vadduws")))) - - #define vec_vaddshs(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vaddshs ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vaddshs")) - - #define vec_vadduhs(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vadduhs")))) - - #define vec_vaddsbs(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vaddsbs ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vaddsbs")) - - #define vec_vaddubs(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vaddubs")))) - - #define vec_and(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector bool int, (a2)), \ -- ((vector float) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool int) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool short) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- ((vector bool char) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector __bool int, (a2)), \ -+ ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_and"))))))))))))))))))))))))) - - #define vec_andc(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector bool int, (a2)), \ -- ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- ((vector bool char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector __bool int, (a2)), \ -+ ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_andc"))))))))))))))))))))))))) - - #define vec_avg(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vavgub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vavgsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vavguh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vavgsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vavguw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vavgsw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_avg"))))))) - - #define vec_vavgsw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vavgsw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vavgsw")) - - #define vec_vavguw(a1, a2) \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vavguw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vavguw")) - - #define vec_vavgsh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vavgsh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vavgsh")) - - #define vec_vavguh(a1, a2) \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vavguh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vavguh")) - - #define vec_vavgsb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vavgsb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vavgsb")) - - #define vec_vavgub(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vavgub ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vavgub")) - - #define vec_ceil(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vrfip ((vector float) (a1))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vrfip ((__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_ceil")) - - #define vec_cmpb(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector signed int) __builtin_altivec_vcmpbfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vcmpbfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_cmpb")) - - #define vec_cmpeq(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector bool char) __builtin_altivec_vcmpequb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector bool char) __builtin_altivec_vcmpequb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector bool short) __builtin_altivec_vcmpequh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector bool short) __builtin_altivec_vcmpequh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpequw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpequw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpeqfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpeqfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_cmpeq")))))))) - - #define vec_vcmpeqfp(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector signed int) __builtin_altivec_vcmpeqfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vcmpeqfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpeqfp")) - - #define vec_vcmpequw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vcmpequw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vcmpequw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpequw"))) - - #define vec_vcmpequh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vcmpequh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vcmpequh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpequh"))) - - #define vec_vcmpequb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vcmpequb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vcmpequb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpequb"))) - - #define vec_cmpge(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpgefp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpgefp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_cmpge")) - - #define vec_cmpgt(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector bool char) __builtin_altivec_vcmpgtub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector bool char) __builtin_altivec_vcmpgtsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector bool short) __builtin_altivec_vcmpgtuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector bool short) __builtin_altivec_vcmpgtsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpgtuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpgtsw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpgtfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_cmpgt")))))))) - - #define vec_vcmpgtfp(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector signed int) __builtin_altivec_vcmpgtfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpgtfp")) - - #define vec_vcmpgtsw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vcmpgtsw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_abs")) - - #define vec_vcmpgtuw(a1, a2) \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vcmpgtuw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_abs")) - - #define vec_vcmpgtsh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vcmpgtsh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpgtsh")) - - #define vec_vcmpgtuh(a1, a2) \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vcmpgtuh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpgtuh")) - - #define vec_vcmpgtsb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vcmpgtsb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpgtsb")) - - #define vec_vcmpgtub(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcmpgtub")) - - #define vec_cmple(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpgefp ((vector float) (a2), (vector float) (a1))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpgefp ((__vector float) (a2), (__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_cmple")) - - #define vec_cmplt(a2, a1) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector bool char) __builtin_altivec_vcmpgtub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector bool char) __builtin_altivec_vcmpgtsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector bool short) __builtin_altivec_vcmpgtuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector bool short) __builtin_altivec_vcmpgtsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpgtuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpgtsw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector bool int) __builtin_altivec_vcmpgtfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_cmplt")))))))) - - #define vec_ctf(a1, a2) \ --__ch (__un_args_eq (vector unsigned int, (a1)), \ -- ((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector signed int, (a1)), \ -- ((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector unsigned int, (a1)), \ -+ ((__vector float) __builtin_altivec_vcfux ((__vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector signed int, (a1)), \ -+ ((__vector float) __builtin_altivec_vcfsx ((__vector signed int) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_ctf"))) - - #define vec_vcfsx(a1, a2) \ --__ch (__un_args_eq (vector signed int, (a1)), \ -- ((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector signed int, (a1)), \ -+ ((__vector float) __builtin_altivec_vcfsx ((__vector signed int) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcfsx")) - - #define vec_vcfux(a1, a2) \ --__ch (__un_args_eq (vector unsigned int, (a1)), \ -- ((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector unsigned int, (a1)), \ -+ ((__vector float) __builtin_altivec_vcfux ((__vector signed int) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vcfux")) - - #define vec_cts(a1, a2) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector signed int) __builtin_altivec_vctsxs ((vector float) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector signed int) __builtin_altivec_vctsxs ((__vector float) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_cts")) - - #define vec_ctu(a1, a2) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector unsigned int) __builtin_altivec_vctuxs ((vector float) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector unsigned int) __builtin_altivec_vctuxs ((__vector float) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_ctu")) - - #define vec_dss(a1) __builtin_altivec_dss ((const int) (a1)); -@@ -8419,27 +8419,27 @@ __ch (__un_args_eq (vector float, (a1)), - #define vec_dssall() __builtin_altivec_dssall () - - #define vec_dst(a1, a2, a3) \ --__ch (__un_args_eq (const vector unsigned char, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned char, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed char, *(a1)), \ -+__ch (__un_args_eq (const __vector signed char, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool char, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool char, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector unsigned short, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned short, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed short, *(a1)), \ -+__ch (__un_args_eq (const __vector signed short, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool short, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool short, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector pixel, *(a1)), \ -+__ch (__un_args_eq (const __vector __pixel, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector unsigned int, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned int, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed int, *(a1)), \ -+__ch (__un_args_eq (const __vector signed int, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool int, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool int, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector float, *(a1)), \ -+__ch (__un_args_eq (const __vector float, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ - __ch (__un_args_eq (const unsigned char, *(a1)), \ - __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -@@ -8462,27 +8462,27 @@ __ch (__un_args_eq (const float, *(a1)), - __builtin_altivec_compiletime_error ("vec_dst"))))))))))))))))))))) - - #define vec_dstst(a1, a2, a3) \ --__ch (__un_args_eq (const vector unsigned char, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned char, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed char, *(a1)), \ -+__ch (__un_args_eq (const __vector signed char, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool char, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool char, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector unsigned short, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned short, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed short, *(a1)), \ -+__ch (__un_args_eq (const __vector signed short, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool short, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool short, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector pixel, *(a1)), \ -+__ch (__un_args_eq (const __vector __pixel, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector unsigned int, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned int, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed int, *(a1)), \ -+__ch (__un_args_eq (const __vector signed int, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool int, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool int, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector float, *(a1)), \ -+__ch (__un_args_eq (const __vector float, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ - __ch (__un_args_eq (const unsigned char, *(a1)), \ - __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -@@ -8505,27 +8505,27 @@ __ch (__un_args_eq (const float, *(a1)), - __builtin_altivec_compiletime_error ("vec_dstst"))))))))))))))))))))) - - #define vec_dststt(a1, a2, a3) \ --__ch (__un_args_eq (const vector unsigned char, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned char, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed char, *(a1)), \ -+__ch (__un_args_eq (const __vector signed char, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool char, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool char, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector unsigned short, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned short, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed short, *(a1)), \ -+__ch (__un_args_eq (const __vector signed short, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool short, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool short, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector pixel, *(a1)), \ -+__ch (__un_args_eq (const __vector __pixel, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector unsigned int, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned int, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed int, *(a1)), \ -+__ch (__un_args_eq (const __vector signed int, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool int, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool int, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector float, *(a1)), \ -+__ch (__un_args_eq (const __vector float, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ - __ch (__un_args_eq (const unsigned char, *(a1)), \ - __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -@@ -8548,27 +8548,27 @@ __ch (__un_args_eq (const float, *(a1)), - __builtin_altivec_compiletime_error ("vec_dststt"))))))))))))))))))))) - - #define vec_dstt(a1, a2, a3) \ --__ch (__un_args_eq (const vector unsigned char, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned char, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed char, *(a1)), \ -+__ch (__un_args_eq (const __vector signed char, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool char, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool char, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector unsigned short, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned short, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed short, *(a1)), \ -+__ch (__un_args_eq (const __vector signed short, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool short, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool short, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector pixel, *(a1)), \ -+__ch (__un_args_eq (const __vector __pixel, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector unsigned int, *(a1)), \ -+__ch (__un_args_eq (const __vector unsigned int, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector signed int, *(a1)), \ -+__ch (__un_args_eq (const __vector signed int, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector bool int, *(a1)), \ -+__ch (__un_args_eq (const __vector __bool int, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ --__ch (__un_args_eq (const vector float, *(a1)), \ -+__ch (__un_args_eq (const __vector float, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ - __ch (__un_args_eq (const unsigned char, *(a1)), \ - __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -@@ -8591,2372 +8591,2372 @@ __ch (__un_args_eq (const float, *(a1)), - __builtin_altivec_compiletime_error ("vec_dstt"))))))))))))))))))))) - - #define vec_expte(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vexptefp ((vector float) (a1))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vexptefp ((__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_expte")) - - #define vec_floor(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vrfim ((vector float) (a1))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vrfim ((__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_floor")) - - #define vec_ld(a, b) \ --__ch (__un_args_eq (const vector unsigned char, *(b)), \ -- ((vector unsigned char) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector unsigned char, *(b)), \ -+ ((__vector unsigned char) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const unsigned char, *(b)), \ -- ((vector unsigned char) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector signed char, *(b)), \ -- ((vector signed char) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector unsigned char) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector signed char, *(b)), \ -+ ((__vector signed char) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const signed char, *(b)), \ -- ((vector signed char) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector bool char, *(b)), \ -- ((vector bool char) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector unsigned short, *(b)), \ -- ((vector unsigned short) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector signed char) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector __bool char, *(b)), \ -+ ((__vector __bool char) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector unsigned short, *(b)), \ -+ ((__vector unsigned short) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const unsigned short, *(b)), \ -- ((vector unsigned short) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector signed short, *(b)), \ -- ((vector signed short) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector unsigned short) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector signed short, *(b)), \ -+ ((__vector signed short) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const short, *(b)), \ -- ((vector signed short) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector bool short, *(b)), \ -- ((vector bool short) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector pixel, *(b)), \ -- ((vector pixel) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector unsigned int, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector signed short) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector __bool short, *(b)), \ -+ ((__vector __bool short) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector __pixel, *(b)), \ -+ ((__vector __pixel) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector unsigned int, *(b)), \ -+ ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const unsigned int, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const unsigned long, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector signed int, *(b)), \ -- ((vector signed int) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector signed int, *(b)), \ -+ ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const int, *(b)), \ -- ((vector signed int) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const long, *(b)), \ -- ((vector signed int) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector bool int, *(b)), \ -- ((vector bool int) __builtin_altivec_lvx ((a), (b))), \ --__ch (__un_args_eq (const vector float, *(b)), \ -- ((vector float) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector __bool int, *(b)), \ -+ ((__vector __bool int) __builtin_altivec_lvx ((a), (b))), \ -+__ch (__un_args_eq (const __vector float, *(b)), \ -+ ((__vector float) __builtin_altivec_lvx ((a), (b))), \ - __ch (__un_args_eq (const float, *(b)), \ -- ((vector float) __builtin_altivec_lvx ((a), (b))), \ -+ ((__vector float) __builtin_altivec_lvx ((a), (b))), \ - __builtin_altivec_compiletime_error ("vec_ld"))))))))))))))))))))) - - #define vec_lde(a, b) \ - __ch (__un_args_eq (const unsigned char, *(b)), \ -- ((vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \ -+ ((__vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \ - __ch (__un_args_eq (const signed char, *(b)), \ -- ((vector signed char) __builtin_altivec_lvebx ((a), (b))), \ -+ ((__vector signed char) __builtin_altivec_lvebx ((a), (b))), \ - __ch (__un_args_eq (const unsigned short, *(b)), \ -- ((vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \ -+ ((__vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \ - __ch (__un_args_eq (const short, *(b)), \ -- ((vector signed short) __builtin_altivec_lvehx ((a), (b))), \ -+ ((__vector signed short) __builtin_altivec_lvehx ((a), (b))), \ - __ch (__un_args_eq (const unsigned long, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ - __ch (__un_args_eq (const long, *(b)), \ -- ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \ - __ch (__un_args_eq (const unsigned int, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ - __ch (__un_args_eq (const int, *(b)), \ -- ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \ - __ch (__un_args_eq (const float, *(b)), \ -- ((vector float) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector float) __builtin_altivec_lvewx ((a), (b))), \ - __builtin_altivec_compiletime_error ("vec_lde")))))))))) - - #define vec_lvewx(a, b) \ - __ch (__un_args_eq (unsigned int, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ - __ch (__un_args_eq (signed int, *(b)), \ -- ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \ - __ch (__un_args_eq (unsigned long, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ - __ch (__un_args_eq (signed long, *(b)), \ -- ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \ - __ch (__un_args_eq (float, *(b)), \ -- ((vector float) __builtin_altivec_lvewx ((a), (b))), \ -+ ((__vector float) __builtin_altivec_lvewx ((a), (b))), \ - __builtin_altivec_compiletime_error ("vec_lvewx")))))) - - #define vec_lvehx(a, b) \ - __ch (__un_args_eq (unsigned short, *(b)), \ -- ((vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \ -+ ((__vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \ - __ch (__un_args_eq (signed short, *(b)), \ -- ((vector signed short) __builtin_altivec_lvehx ((a), (b))), \ -+ ((__vector signed short) __builtin_altivec_lvehx ((a), (b))), \ - __builtin_altivec_compiletime_error ("vec_lvehx"))) - - #define vec_lvebx(a, b) \ - __ch (__un_args_eq (unsigned char, *(b)), \ -- ((vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \ -+ ((__vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \ - __ch (__un_args_eq (signed char, *(b)), \ -- ((vector signed char) __builtin_altivec_lvebx ((a), (b))), \ -+ ((__vector signed char) __builtin_altivec_lvebx ((a), (b))), \ - __builtin_altivec_compiletime_error ("vec_lvebx"))) - - #define vec_ldl(a, b) \ --__ch (__un_args_eq (const vector unsigned char, *(b)), \ -- ((vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector unsigned char, *(b)), \ -+ ((__vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const unsigned char, *(b)), \ -- ((vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector signed char, *(b)), \ -- ((vector signed char) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector signed char, *(b)), \ -+ ((__vector signed char) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const signed char, *(b)), \ -- ((vector signed char) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector bool char, *(b)), \ -- ((vector bool char) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector unsigned short, *(b)), \ -- ((vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector signed char) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector __bool char, *(b)), \ -+ ((__vector __bool char) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector unsigned short, *(b)), \ -+ ((__vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const unsigned short, *(b)), \ -- ((vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector signed short, *(b)), \ -- ((vector signed short) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector signed short, *(b)), \ -+ ((__vector signed short) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const short, *(b)), \ -- ((vector signed short) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector bool short, *(b)), \ -- ((vector bool short) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector pixel, *(b)), \ -- ((vector pixel) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector unsigned int, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector signed short) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector __bool short, *(b)), \ -+ ((__vector __bool short) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector __pixel, *(b)), \ -+ ((__vector __pixel) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector unsigned int, *(b)), \ -+ ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const unsigned int, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const unsigned long, *(b)), \ -- ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector signed int, *(b)), \ -- ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector signed int, *(b)), \ -+ ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const int, *(b)), \ -- ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const long, *(b)), \ -- ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector bool int, *(b)), \ -- ((vector bool int) __builtin_altivec_lvxl ((a), (b))), \ --__ch (__un_args_eq (const vector float, *(b)), \ -- ((vector float) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector __bool int, *(b)), \ -+ ((__vector __bool int) __builtin_altivec_lvxl ((a), (b))), \ -+__ch (__un_args_eq (const __vector float, *(b)), \ -+ ((__vector float) __builtin_altivec_lvxl ((a), (b))), \ - __ch (__un_args_eq (const float, *(b)), \ -- ((vector float) __builtin_altivec_lvxl ((a), (b))), \ -+ ((__vector float) __builtin_altivec_lvxl ((a), (b))), \ - __builtin_altivec_compiletime_error ("vec_ldl"))))))))))))))))))))) - - #define vec_loge(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vlogefp ((vector float) (a1))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vlogefp ((__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_loge")) - - #define vec_lvsl(a1, a2) \ - __ch (__un_args_eq (const volatile unsigned char, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile signed char, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile unsigned short, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile signed short, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile unsigned int, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile signed int, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile unsigned long, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile signed long, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile float, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ - __builtin_altivec_compiletime_error ("vec_lvsl")))))))))) - - #define vec_lvsr(a1, a2) \ - __ch (__un_args_eq (const volatile unsigned char, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile signed char, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile unsigned short, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile signed short, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile unsigned int, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile signed int, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile unsigned long, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile signed long, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __ch (__un_args_eq (const volatile float, *(a2)), \ -- ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -+ ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ - __builtin_altivec_compiletime_error ("vec_lvsr")))))))))) - - #define vec_madd(a1, a2, a3) \ --__ch (__tern_args_eq (vector float, (a1), vector float, (a2), vector float, (a3)), \ -- ((vector float) __builtin_altivec_vmaddfp ((a1), (a2), (a3))), \ -+__ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector float, (a3)), \ -+ ((__vector float) __builtin_altivec_vmaddfp ((a1), (a2), (a3))), \ - __builtin_altivec_compiletime_error ("vec_madd")) - - #define vec_madds(a1, a2, a3) \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector signed short, (a3)), \ -- ((vector signed short) __builtin_altivec_vmhaddshs ((a1), (a2), (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \ -+ ((__vector signed short) __builtin_altivec_vmhaddshs ((a1), (a2), (a3))), \ - __builtin_altivec_compiletime_error ("vec_madds")) - - #define vec_max(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vmaxsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vmaxsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vmaxsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vmaxsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vmaxsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vmaxsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vmaxsw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vmaxsw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vmaxsw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vmaxfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vmaxfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_max")))))))))))))))))))) - - #define vec_vmaxfp(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vmaxfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vmaxfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmaxfp")) - - #define vec_vmaxsw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vmaxsw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmaxsw")) - - #define vec_vmaxuw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector signed int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmaxuw")))) - - #define vec_vmaxsh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vmaxsh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmaxsh")) - - #define vec_vmaxuh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmaxuh")))) - - #define vec_vmaxsb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vmaxsb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmaxsb")) - - #define vec_vmaxub(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmaxub")))) - - #define vec_mergeh(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vmrghb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmrghb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- ((vector bool char) __builtin_altivec_vmrghb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vmrghh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmrghh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool short) __builtin_altivec_vmrghh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, (a2)), \ -- ((vector pixel) __builtin_altivec_vmrghh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vmrghw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vmrghw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmrghw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool int) __builtin_altivec_vmrghw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_mergeh")))))))))))) - - #define vec_vmrghw(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vmrghw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vmrghw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmrghw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmrghw")))) - - #define vec_vmrghh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vmrghh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmrghh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmrghh"))) - - #define vec_vmrghb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vmrghb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmrghb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmrghb"))) - - #define vec_mergel(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- ((vector bool char) __builtin_altivec_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool short) __builtin_altivec_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, (a2)), \ -- ((vector pixel) __builtin_altivec_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool int) __builtin_altivec_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_mergel")))))))))))) - - #define vec_vmrglw(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmrglw")))) - - #define vec_vmrglh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmrglh"))) - - #define vec_vmrglb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmrglb"))) - --#define vec_mfvscr() (((vector unsigned short) __builtin_altivec_mfvscr ())) -+#define vec_mfvscr() (((__vector unsigned short) __builtin_altivec_mfvscr ())) - - #define vec_min(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vminub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vminub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vminub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vminsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vminsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vminsb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vminuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vminuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vminuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vminsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vminsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vminsh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vminuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vminuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vminuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vminsw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vminsw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vminsw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vminfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vminfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_min")))))))))))))))))))) - - #define vec_vminfp(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vminfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vminfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vminfp")) - - #define vec_vminsw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vminsw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vminsw")) - - #define vec_vminuw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vminuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector signed int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vminuw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vminuw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vminuw")))) - - #define vec_vminsh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vminsh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vminsh")) - - #define vec_vminuh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vminuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vminuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vminuh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vminuh")))) - - #define vec_vminsb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vminsb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_abs")) - - #define vec_vminub(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vminub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vminub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vminub ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vminub")))) - - #define vec_mladd(a1, a2, a3) \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector signed short, (a3)), \ -- ((vector signed short) __builtin_altivec_vmladduhm ((vector signed short) (a1), (vector signed short) (a2), (vector signed short) (a3))), \ --__ch (__tern_args_eq (vector signed short, (a1), vector unsigned short, (a2), vector unsigned short, (a3)), \ -- ((vector signed short) __builtin_altivec_vmladduhm ((vector signed short) (a1), (vector signed short) (a2), (vector signed short) (a3))), \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector signed short, (a2), vector signed short, (a3)), \ -- ((vector signed short) __builtin_altivec_vmladduhm ((vector signed short) (a1), (vector signed short) (a2), (vector signed short) (a3))), \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), vector unsigned short, (a3)), \ -- ((vector unsigned short) __builtin_altivec_vmladduhm ((vector signed short) (a1), (vector signed short) (a2), (vector signed short) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \ -+ ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \ -+ ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \ -+ ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \ -+ ((__vector unsigned short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \ - __builtin_altivec_compiletime_error ("vec_mladd"))))) - - #define vec_mradds(a1, a2, a3) \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector signed short, (a3)), \ -- ((vector signed short) __builtin_altivec_vmhraddshs ((a1), (a2), (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \ -+ ((__vector signed short) __builtin_altivec_vmhraddshs ((a1), (a2), (a3))), \ - __builtin_altivec_compiletime_error ("vec_mradds")) - - #define vec_msum(a1, a2, a3) \ --__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), vector unsigned int, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vmsumubm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed char, (a1), vector unsigned char, (a2), vector signed int, (a3)), \ -- ((vector signed int) __builtin_altivec_vmsummbm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), vector unsigned int, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vmsumuhm ((vector signed short) (a1), (vector signed short) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector signed int, (a3)), \ -- ((vector signed int) __builtin_altivec_vmsumshm ((vector signed short) (a1), (vector signed short) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned int, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed char, (a1), __vector unsigned char, (a2), __vector signed int, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_msum"))))) - - #define vec_vmsumshm(a1, a2, a3) \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector signed int, (a3)), \ -- ((vector signed int) __builtin_altivec_vmsumshm ((vector signed short) (a1), (vector signed short) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_vmsumshm")) - - #define vec_vmsumuhm(a1, a2, a3) \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), vector unsigned int, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vmsumuhm ((vector signed short) (a1), (vector signed short) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_vmsumuhm")) - - #define vec_vmsummbm(a1, a2, a3) \ --__ch (__tern_args_eq (vector signed char, (a1), vector unsigned char, (a2), vector signed int, (a3)), \ -- ((vector signed int) __builtin_altivec_vmsummbm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed char, (a1), __vector unsigned char, (a2), __vector signed int, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_abs")) - - #define vec_vmsumubm(a1, a2, a3) \ --__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), vector unsigned int, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vmsumubm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned int, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_vmsummbm")) - - #define vec_msums(a1, a2, a3) \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), vector unsigned int, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vmsumuhs ((vector signed short) (a1), (vector signed short) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector signed int, (a3)), \ -- ((vector signed int) __builtin_altivec_vmsumshs ((vector signed short) (a1), (vector signed short) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_msums"))) - - #define vec_vmsumshs(a1, a2, a3) \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector signed int, (a3)), \ -- ((vector signed int) __builtin_altivec_vmsumshs ((vector signed short) (a1), (vector signed short) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_vmsumshs")) - - #define vec_vmsumuhs(a1, a2, a3) \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), vector unsigned int, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vmsumuhs ((vector signed short) (a1), (vector signed short) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_vmsumuhs")) - - #define vec_mtvscr(a1) \ --__ch (__un_args_eq (vector signed int, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector unsigned int, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector bool int, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector signed short, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector unsigned short, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector bool short, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector pixel, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector signed char, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector unsigned char, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ --__ch (__un_args_eq (vector bool char, (a1)), \ -- __builtin_altivec_mtvscr ((vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector signed int, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector unsigned int, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector __bool int, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector signed short, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector unsigned short, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector __bool short, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector __pixel, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector signed char, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector unsigned char, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ -+__ch (__un_args_eq (__vector __bool char, (a1)), \ -+ __builtin_altivec_mtvscr ((__vector signed int) (a1)), \ - __builtin_altivec_compiletime_error ("vec_mtvscr"))))))))))) - - #define vec_mule(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmuleub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed short) __builtin_altivec_vmulesb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmuleuh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed int) __builtin_altivec_vmulesh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_mule"))))) - - #define vec_vmulesh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed int) __builtin_altivec_vmulesh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmulesh")) - - #define vec_vmuleuh(a1, a2) \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmuleuh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmuleuh")) - - #define vec_vmulesb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed short) __builtin_altivec_vmulesb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmulesb")) - - #define vec_vmuleub(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmuleub ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmuleub")) - - #define vec_mulo(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmuloub ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed short) __builtin_altivec_vmulosb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmulouh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed int) __builtin_altivec_vmulosh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_mulo"))))) - - #define vec_vmulosh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed int) __builtin_altivec_vmulosh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmulosh")) - - #define vec_vmulouh(a1, a2) \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vmulouh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmulouh")) - - #define vec_vmulosb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed short) __builtin_altivec_vmulosb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmulosb")) - - #define vec_vmuloub(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vmuloub ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vmuloub")) - - #define vec_nmsub(a1, a2, a3) \ --__ch (__tern_args_eq (vector float, ((a1)), vector float, ((a2)) , vector float, ((a3))), \ -- ((vector float) __builtin_altivec_vnmsubfp ((vector float) ((a1)), (vector float) ((a2)), (vector float)((a3)))), \ -+__ch (__tern_args_eq (__vector float, ((a1)), __vector float, ((a2)) , __vector float, ((a3))), \ -+ ((__vector float) __builtin_altivec_vnmsubfp ((__vector float) ((a1)), (__vector float) ((a2)), (__vector float)((a3)))), \ - __builtin_altivec_compiletime_error ("vec_nmsub")) - - #define vec_nor(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool int) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool short) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- ((vector bool char) __builtin_altivec_vnor ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_nor"))))))))))) - - #define vec_or(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector bool int, (a2)), \ -- ((vector float) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool int) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool short) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- ((vector bool char) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector __bool int, (a2)), \ -+ ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_or"))))))))))))))))))))))))) - - #define vec_pack(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed char) __builtin_altivec_vpkuhum ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vpkuhum ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool char) __builtin_altivec_vpkuhum ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed short) __builtin_altivec_vpkuwum ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vpkuwum ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool short) __builtin_altivec_vpkuwum ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_pack"))))))) - - #define vec_vpkuwum(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed short) __builtin_altivec_vpkuwum ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vpkuwum ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vpkuwum"))) - - #define vec_vpkuhum(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed char) __builtin_altivec_vpkuhum ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vpkuhum ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vpkuhum"))) - - #define vec_packpx(a1, a2) \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- (vector pixel) __builtin_altivec_vpkpx ((vector signed int) (a1), (vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ (__vector __pixel) __builtin_altivec_vpkpx ((__vector signed int) (a1), (__vector signed int) (a2)), \ - __builtin_altivec_compiletime_error ("vec_packpx")) - - #define vec_packs(a1, a2) \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vpkuhus ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed char) __builtin_altivec_vpkshss ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vpkuwus ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed short) __builtin_altivec_vpkswss ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_packs"))))) - - #define vec_vpkswss(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed short) __builtin_altivec_vpkswss ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vpkswss")) - - #define vec_vpkuwus(a1, a2) \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vpkuwus ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vpkuwus")) - - #define vec_vpkshss(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed char) __builtin_altivec_vpkshss ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vpkshss")) - - #define vec_vpkuhus(a1, a2) \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vpkuhus ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vpkuhus")) - - #define vec_packsu(a1, a2) \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vpkuhus ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vpkshus ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vpkuwus ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vpkswus ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_packsu"))))) - - #define vec_vpkswus(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vpkswus ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vpkswus")) - - #define vec_vpkshus(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vpkshus ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vpkshus")) - - #define vec_perm(a1, a2, a3) \ --__ch (__tern_args_eq (vector float, (a1), vector float, (a2), vector unsigned char, (a3)), \ -- ((vector float) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector signed int, (a1), vector signed int, (a2), vector unsigned char, (a3)), \ -- ((vector signed int) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector unsigned int, (a1), vector unsigned int, (a2), vector unsigned char, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector bool int, (a1), vector bool int, (a2), vector unsigned char, (a3)), \ -- ((vector bool int) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector unsigned char, (a3)), \ -- ((vector signed short) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), vector unsigned char, (a3)), \ -- ((vector unsigned short) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector bool short, (a1), vector bool short, (a2), vector unsigned char, (a3)), \ -- ((vector bool short) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector pixel, (a1), vector pixel, (a2), vector unsigned char, (a3)), \ -- ((vector pixel) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector signed char, (a1), vector signed char, (a2), vector unsigned char, (a3)), \ -- ((vector signed char) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), vector unsigned char, (a3)), \ -- ((vector unsigned char) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ --__ch (__tern_args_eq (vector bool char, (a1), vector bool char, (a2), vector unsigned char, (a3)), \ -- ((vector bool char) __builtin_altivec_vperm_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector unsigned char, (a3)), \ -+ ((__vector float) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector unsigned char, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector unsigned char, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector __bool int, (a1), __vector __bool int, (a2), __vector unsigned char, (a3)), \ -+ ((__vector __bool int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector unsigned char, (a3)), \ -+ ((__vector signed short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned char, (a3)), \ -+ ((__vector unsigned short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector __bool short, (a1), __vector __bool short, (a2), __vector unsigned char, (a3)), \ -+ ((__vector __bool short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector __pixel, (a1), __vector __pixel, (a2), __vector unsigned char, (a3)), \ -+ ((__vector __pixel) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector unsigned char, (a3)), \ -+ ((__vector signed char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned char, (a3)), \ -+ ((__vector unsigned char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ -+__ch (__tern_args_eq (__vector __bool char, (a1), __vector __bool char, (a2), __vector unsigned char, (a3)), \ -+ ((__vector __bool char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \ - __builtin_altivec_compiletime_error ("vec_perm")))))))))))) - - #define vec_re(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vrefp ((vector float) (a1))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vrefp ((__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_re")) - - #define vec_rl(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vrlb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vrlb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vrlh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vrlh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vrlw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vrlw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_rl"))))))) - - #define vec_vrlw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vrlw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vrlw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vrlw"))) - - #define vec_vrlh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vrlh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vrlh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vrlh"))) - - #define vec_vrlb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vrlb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vrlb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vrlb"))) - - #define vec_round(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vrfin ((vector float) (a1))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vrfin ((__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_round")) - - #define vec_rsqrte(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vrsqrtefp ((vector float) (a1))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vrsqrtefp ((__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_rsqrte")) - - #define vec_sel(a1, a2, a3) \ --__ch (__tern_args_eq (vector float, (a1), vector float, (a2), vector bool int, (a3)), \ -- ((vector float) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector float, (a1), vector float, (a2), vector unsigned int, (a3)), \ -- ((vector float) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector bool int, (a1), vector bool int, (a2), vector bool int, (a3)), \ -- ((vector bool int) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector bool int, (a1), vector bool int, (a2), vector unsigned int, (a3)), \ -- ((vector bool int) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed int, (a1), vector signed int, (a2), vector bool int, (a3)), \ -- ((vector signed int) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed int, (a1), vector signed int, (a2), vector unsigned int, (a3)), \ -- ((vector signed int) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector unsigned int, (a1), vector unsigned int, (a2), vector bool int, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector unsigned int, (a1), vector unsigned int, (a2), vector unsigned int, (a3)), \ -- ((vector unsigned int) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector bool short, (a1), vector bool short, (a2), vector bool short, (a3)), \ -- ((vector bool short) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector bool short, (a1), vector bool short, (a2), vector unsigned short, (a3)), \ -- ((vector bool short) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector bool short, (a3)), \ -- ((vector signed short) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), vector unsigned short, (a3)), \ -- ((vector signed short) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), vector bool short, (a3)), \ -- ((vector unsigned short) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), vector unsigned short, (a3)), \ -- ((vector unsigned short) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector bool char, (a1), vector bool char, (a2), vector bool char, (a3)), \ -- ((vector bool char) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector bool char, (a1), vector bool char, (a2), vector unsigned char, (a3)), \ -- ((vector bool char) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed char, (a1), vector signed char, (a2), vector bool char, (a3)), \ -- ((vector signed char) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector signed char, (a1), vector signed char, (a2), vector unsigned char, (a3)), \ -- ((vector signed char) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), vector bool char, (a3)), \ -- ((vector unsigned char) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ --__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), vector unsigned char, (a3)), \ -- ((vector unsigned char) __builtin_altivec_vsel_4si ((vector signed int) (a1), (vector signed int) (a2), (vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector __bool int, (a3)), \ -+ ((__vector float) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector unsigned int, (a3)), \ -+ ((__vector float) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector __bool int, (a1), __vector __bool int, (a2), __vector __bool int, (a3)), \ -+ ((__vector __bool int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector __bool int, (a1), __vector __bool int, (a2), __vector unsigned int, (a3)), \ -+ ((__vector __bool int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector __bool int, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector unsigned int, (a3)), \ -+ ((__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector __bool int, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector unsigned int, (a3)), \ -+ ((__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector __bool short, (a1), __vector __bool short, (a2), __vector __bool short, (a3)), \ -+ ((__vector __bool short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector __bool short, (a1), __vector __bool short, (a2), __vector unsigned short, (a3)), \ -+ ((__vector __bool short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector __bool short, (a3)), \ -+ ((__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector unsigned short, (a3)), \ -+ ((__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector __bool short, (a3)), \ -+ ((__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \ -+ ((__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector __bool char, (a1), __vector __bool char, (a2), __vector __bool char, (a3)), \ -+ ((__vector __bool char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector __bool char, (a1), __vector __bool char, (a2), __vector unsigned char, (a3)), \ -+ ((__vector __bool char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector __bool char, (a3)), \ -+ ((__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector unsigned char, (a3)), \ -+ ((__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector __bool char, (a3)), \ -+ ((__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ -+__ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned char, (a3)), \ -+ ((__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_sel"))))))))))))))))))))) - - #define vec_sl(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vslb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vslb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vslh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vslh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vslw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vslw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sl"))))))) - - #define vec_vslw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vslw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vslw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vslw"))) - - #define vec_vslh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vslh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vslh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vslh"))) - - #define vec_vslb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vslb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vslb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vslb"))) - - #define vec_sld(a1, a2, a3) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, (a2)), \ -- ((vector pixel) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- ((vector bool char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \ - __builtin_altivec_compiletime_error ("vec_sld")))))))))))) - - #define vec_sll(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned short, (a2)), \ -- ((vector signed int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned char, (a2)), \ -- ((vector signed int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector bool int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned short, (a2)), \ -- ((vector bool int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned char, (a2)), \ -- ((vector bool int) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned int, (a2)), \ -- ((vector signed short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned char, (a2)), \ -- ((vector signed short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned int, (a2)), \ -- ((vector bool short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector bool short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned char, (a2)), \ -- ((vector bool short) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector unsigned int, (a2)), \ -- ((vector pixel) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector unsigned short, (a2)), \ -- ((vector pixel) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector unsigned char, (a2)), \ -- ((vector pixel) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned int, (a2)), \ -- ((vector signed char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned short, (a2)), \ -- ((vector signed char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned int, (a2)), \ -- ((vector bool char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned short, (a2)), \ -- ((vector bool char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector bool char) __builtin_altivec_vsl ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sll"))))))))))))))))))))))))))))))) - - #define vec_slo(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector signed char, (a2)), \ -- ((vector float) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector unsigned char, (a2)), \ -- ((vector float) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed char, (a2)), \ -- ((vector signed int) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned char, (a2)), \ -- ((vector signed int) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector signed char, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed char, (a2)), \ -- ((vector signed short) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned char, (a2)), \ -- ((vector signed short) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector signed char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector signed char, (a2)), \ -- ((vector pixel) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector unsigned char, (a2)), \ -- ((vector pixel) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vslo ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector signed char, (a2)), \ -+ ((__vector float) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector unsigned char, (a2)), \ -+ ((__vector float) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed char, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector signed char, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_slo"))))))))))))))))) - - #define vec_splat(a1, a2) \ --__ch (__un_args_eq (vector signed char, (a1)), \ -- ((vector signed char) __builtin_altivec_vspltb ((vector signed char) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector unsigned char, (a1)), \ -- ((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector bool char, (a1)), \ -- ((vector bool char) __builtin_altivec_vspltb ((vector signed char) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector signed short, (a1)), \ -- ((vector signed short) __builtin_altivec_vsplth ((vector signed short) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector unsigned short, (a1)), \ -- ((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector bool short, (a1)), \ -- ((vector bool short) __builtin_altivec_vsplth ((vector signed short) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector pixel, (a1)), \ -- ((vector pixel) __builtin_altivec_vsplth ((vector signed short) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vspltw ((vector signed int) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector signed int, (a1)), \ -- ((vector signed int) __builtin_altivec_vspltw ((vector signed int) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector unsigned int, (a1)), \ -- ((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector bool int, (a1)), \ -- ((vector bool int) __builtin_altivec_vspltw ((vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector signed char, (a1)), \ -+ ((__vector signed char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector unsigned char, (a1)), \ -+ ((__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector __bool char, (a1)), \ -+ ((__vector __bool char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector signed short, (a1)), \ -+ ((__vector signed short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector unsigned short, (a1)), \ -+ ((__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector __bool short, (a1)), \ -+ ((__vector __bool short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector __pixel, (a1)), \ -+ ((__vector __pixel) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector signed int, (a1)), \ -+ ((__vector signed int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector unsigned int, (a1)), \ -+ ((__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector __bool int, (a1)), \ -+ ((__vector __bool int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_splat")))))))))))) - - #define vec_vspltw(a1, a2) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vspltw ((vector signed int) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector signed int, (a1)), \ -- ((vector signed int) __builtin_altivec_vspltw ((vector signed int) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector unsigned int, (a1)), \ -- ((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector signed int, (a1)), \ -+ ((__vector signed int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector unsigned int, (a1)), \ -+ ((__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vspltw")))) - - #define vec_vsplth(a1, a2) \ --__ch (__un_args_eq (vector signed short, (a1)), \ -- ((vector signed short) __builtin_altivec_vsplth ((vector signed short) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector unsigned short, (a1)), \ -- ((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector signed short, (a1)), \ -+ ((__vector signed short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector unsigned short, (a1)), \ -+ ((__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsplth"))) - - #define vec_vspltb(a1, a2) \ --__ch (__un_args_eq (vector signed char, (a1)), \ -- ((vector signed char) __builtin_altivec_vspltb ((vector signed char) (a1), (const int) (a2))), \ --__ch (__un_args_eq (vector unsigned char, (a1)), \ -- ((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector signed char, (a1)), \ -+ ((__vector signed char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \ -+__ch (__un_args_eq (__vector unsigned char, (a1)), \ -+ ((__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vspltb"))) - --#define vec_splat_s8(a1) ((vector signed char) __builtin_altivec_vspltisb (a1)) -+#define vec_splat_s8(a1) ((__vector signed char) __builtin_altivec_vspltisb (a1)) - --#define vec_splat_s16(a1) ((vector signed short) __builtin_altivec_vspltish (a1)) -+#define vec_splat_s16(a1) ((__vector signed short) __builtin_altivec_vspltish (a1)) - --#define vec_splat_s32(a1) ((vector signed int) __builtin_altivec_vspltisw (a1)) -+#define vec_splat_s32(a1) ((__vector signed int) __builtin_altivec_vspltisw (a1)) - --#define vec_splat_u8(a1) ((vector unsigned char) __builtin_altivec_vspltisb (a1)) -+#define vec_splat_u8(a1) ((__vector unsigned char) __builtin_altivec_vspltisb (a1)) - --#define vec_splat_u16(a1) ((vector unsigned short) __builtin_altivec_vspltish (a1)) -+#define vec_splat_u16(a1) ((__vector unsigned short) __builtin_altivec_vspltish (a1)) - --#define vec_splat_u32(a1) ((vector unsigned int) __builtin_altivec_vspltisw (a1)) -+#define vec_splat_u32(a1) ((__vector unsigned int) __builtin_altivec_vspltisw (a1)) - - #define vec_sr(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsrb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsrb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsrh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsrh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsrw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsrw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sr"))))))) - - #define vec_vsrw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsrw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsrw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsrw"))) - - #define vec_vsrh(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsrh ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsrh ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsrh"))) - - #define vec_vsrb(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsrb ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsrb ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsrb"))) - - #define vec_sra(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsrab ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsrab ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsrah ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsrah ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsraw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsraw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sra"))))))) - - #define vec_vsraw(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsraw ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsraw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsraw"))) - - #define vec_vsrah(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsrah ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsrah ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsrah"))) - - #define vec_vsrab(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsrab ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsrab ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsrab"))) - - #define vec_srl(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned short, (a2)), \ -- ((vector signed int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned char, (a2)), \ -- ((vector signed int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector bool int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned short, (a2)), \ -- ((vector bool int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned char, (a2)), \ -- ((vector bool int) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned int, (a2)), \ -- ((vector signed short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned char, (a2)), \ -- ((vector signed short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned int, (a2)), \ -- ((vector bool short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector bool short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned char, (a2)), \ -- ((vector bool short) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector unsigned int, (a2)), \ -- ((vector pixel) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector unsigned short, (a2)), \ -- ((vector pixel) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector unsigned char, (a2)), \ -- ((vector pixel) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned int, (a2)), \ -- ((vector signed char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned short, (a2)), \ -- ((vector signed char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned int, (a2)), \ -- ((vector bool char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned short, (a2)), \ -- ((vector bool char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector bool char) __builtin_altivec_vsr ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned int, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned short, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned int, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned short, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_srl"))))))))))))))))))))))))))))))) - - #define vec_sro(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector signed char, (a2)), \ -- ((vector float) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector unsigned char, (a2)), \ -- ((vector float) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed char, (a2)), \ -- ((vector signed int) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned char, (a2)), \ -- ((vector signed int) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector signed char, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed char, (a2)), \ -- ((vector signed short) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned char, (a2)), \ -- ((vector signed short) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector signed char, (a2)), \ -- ((vector pixel) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector pixel, (a1), vector unsigned char, (a2)), \ -- ((vector pixel) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector signed char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsro ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector signed char, (a2)), \ -+ ((__vector float) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector unsigned char, (a2)), \ -+ ((__vector float) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed char, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector signed char, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned char, (a2)), \ -+ ((__vector __pixel) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sro"))))))))))))))))) - - #define vec_st(a1, a2, a3) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), unsigned char, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed char, (a1), signed char, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool char, (a1), unsigned char, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool char, (a1), signed char, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), unsigned short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed short, (a1), short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool short, (a1), unsigned short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool short, (a1), short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector pixel, (a1), unsigned short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector pixel, (a1), short, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), unsigned int, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed int, (a1), int, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool int, (a1), unsigned int, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool int, (a1), int, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector float, (a1), float, *(a3)), \ -- __builtin_altivec_stvx ((vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), unsigned char, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), signed char, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), unsigned char, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), signed char, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), unsigned short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), unsigned short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), unsigned short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), short, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), unsigned int, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), int, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), unsigned int, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), int, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector float, (a1), float, *(a3)), \ -+ __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \ - __builtin_altivec_compiletime_error ("vec_st"))))))))))))))))))))))))))) - - #define vec_stl(a1, a2, a3) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), unsigned char, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed char, (a1), signed char, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool char, (a1), unsigned char, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool char, (a1), signed char, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), unsigned short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed short, (a1), short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool short, (a1), unsigned short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool short, (a1), short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector pixel, (a1), unsigned short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector pixel, (a1), short, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), unsigned int, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector signed int, (a1), int, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool int, (a1), unsigned int, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector bool int, (a1), int, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ --__ch (__bin_args_eq (vector float, (a1), float, *(a3)), \ -- __builtin_altivec_stvxl ((vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), unsigned char, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), signed char, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), unsigned char, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), signed char, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), unsigned short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), unsigned short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), unsigned short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), short, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), unsigned int, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), int, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), unsigned int, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), int, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ -+__ch (__bin_args_eq (__vector float, (a1), float, *(a3)), \ -+ __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \ - __builtin_altivec_compiletime_error ("vec_stl"))))))))))))))))))))))))))) - - #define vec_ste(a, b, c) \ --__ch (__bin_args_eq (vector unsigned char, (a), unsigned char, *(c)), \ -- __builtin_altivec_stvebx ((vector signed char) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector signed char, (a), signed char, *(c)), \ -- __builtin_altivec_stvebx ((vector signed char) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector bool char, (a), unsigned char, *(c)), \ -- __builtin_altivec_stvebx ((vector signed char) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector bool char, (a), signed char, *(c)), \ -- __builtin_altivec_stvebx ((vector signed char) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector unsigned short, (a), unsigned short, *(c)), \ -- __builtin_altivec_stvehx ((vector signed short) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector signed short, (a), short, *(c)), \ -- __builtin_altivec_stvehx ((vector signed short) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector bool short, (a), unsigned short, *(c)), \ -- __builtin_altivec_stvehx ((vector signed short) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector bool short, (a), short, *(c)), \ -- __builtin_altivec_stvehx ((vector signed short) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector pixel, (a), unsigned short, *(c)), \ -- __builtin_altivec_stvehx ((vector signed short) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector pixel, (a), short, *(c)), \ -- __builtin_altivec_stvehx ((vector signed short) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector unsigned int, (a), unsigned int, *(c)), \ -- __builtin_altivec_stvewx ((vector signed int) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector signed int, (a), int, *(c)), \ -- __builtin_altivec_stvewx ((vector signed int) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector bool int, (a), unsigned int, *(c)), \ -- __builtin_altivec_stvewx ((vector signed int) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector bool int, (a), int, *(c)), \ -- __builtin_altivec_stvewx ((vector signed int) (a), (b), (void *) (c)), \ --__ch (__bin_args_eq (vector float, (a), float, *(c)), \ -- __builtin_altivec_stvewx ((vector signed int) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a), unsigned char, *(c)), \ -+ __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector signed char, (a), signed char, *(c)), \ -+ __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector __bool char, (a), unsigned char, *(c)), \ -+ __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector __bool char, (a), signed char, *(c)), \ -+ __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a), unsigned short, *(c)), \ -+ __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector signed short, (a), short, *(c)), \ -+ __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector __bool short, (a), unsigned short, *(c)), \ -+ __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector __bool short, (a), short, *(c)), \ -+ __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector __pixel, (a), unsigned short, *(c)), \ -+ __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector __pixel, (a), short, *(c)), \ -+ __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a), unsigned int, *(c)), \ -+ __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector signed int, (a), int, *(c)), \ -+ __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector __bool int, (a), unsigned int, *(c)), \ -+ __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector __bool int, (a), int, *(c)), \ -+ __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \ -+__ch (__bin_args_eq (__vector float, (a), float, *(c)), \ -+ __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \ - __builtin_altivec_compiletime_error ("vec_ste")))))))))))))))) - - #define vec_stvewx(a, b, c) \ --__ch (__un_args_eq (vector unsigned int, (a)), \ -- __builtin_altivec_stvewx ((vector signed int) (a), (b), (c)), \ --__ch (__un_args_eq (vector signed int, (a)), \ -- __builtin_altivec_stvewx ((vector signed int) (a), (b), (c)), \ --__ch (__un_args_eq (vector float, (a)), \ -- __builtin_altivec_stvewx ((vector signed int) (a), (b), (c)), \ -+__ch (__un_args_eq (__vector unsigned int, (a)), \ -+ __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \ -+__ch (__un_args_eq (__vector signed int, (a)), \ -+ __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \ -+__ch (__un_args_eq (__vector float, (a)), \ -+ __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \ - __builtin_altivec_compiletime_error ("vec_stvewx")))) - - #define vec_stvehx(a, b, c) \ --__ch (__un_args_eq (vector unsigned short, (a)), \ -- __builtin_altivec_stvehx ((vector signed short) (a), (b), (c)), \ --__ch (__un_args_eq (vector signed short, (a)), \ -- __builtin_altivec_stvehx ((vector signed short) (a), (b), (c)), \ -+__ch (__un_args_eq (__vector unsigned short, (a)), \ -+ __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \ -+__ch (__un_args_eq (__vector signed short, (a)), \ -+ __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \ - __builtin_altivec_compiletime_error ("vec_stvehx"))) - - #define vec_stvebx(a, b, c) \ --__ch (__un_args_eq (vector unsigned char, (a)), \ -- __builtin_altivec_stvebx ((vector signed char) (a), (b), (c)), \ --__ch (__un_args_eq (vector signed char, (a)), \ -- __builtin_altivec_stvebx ((vector signed char) (a), (b), (c)), \ -+__ch (__un_args_eq (__vector unsigned char, (a)), \ -+ __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \ -+__ch (__un_args_eq (__vector signed char, (a)), \ -+ __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \ - __builtin_altivec_compiletime_error ("vec_stvebx"))) - - #define vec_sub(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vsubfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vsubfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sub")))))))))))))))))))) - - #define vec_vsubfp(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vsubfp ((vector float) (a1), (vector float) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vsubfp ((__vector float) (a1), (__vector float) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsubfp")) - - #define vec_vsubuwm(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector signed int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsubuwm"))))) - - #define vec_vsubuhm(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsubuhm"))))) - - #define vec_vsububm(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsububm"))))) - - #define vec_subc(a1, a2) \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubcuw ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubcuw ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_subc")) - - #define vec_subs(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsubsbs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsubsbs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsubsbs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsubshs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsubshs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsubshs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsubsws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsubsws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsubsws ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_subs"))))))))))))))))))) - - #define vec_vsubsws(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsubsws ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsubsws")) - - #define vec_vsubuws(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector signed int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsubuws")))) - - #define vec_vsubshs(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vsubshs ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsubshs")) - - #define vec_vsubuhs(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) (a1), (vector signed short) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) (a1), (vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsubuhs")))) - - #define vec_vsubsbs(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vsubsbs ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsubsbs")) - - #define vec_vsububs(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububs ((vector signed char) (a1), (vector signed char) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vsububs ((vector signed char) (a1), (vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsububs")))) - - #define vec_sum4s(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsum4ubs ((vector signed char) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsum4sbs ((vector signed char) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsum4shs ((vector signed short) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sum4s")))) - - #define vec_vsum4shs(a1, a2) \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsum4shs ((vector signed short) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsum4shs")) - - #define vec_vsum4sbs(a1, a2) \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsum4sbs ((vector signed char) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsum4sbs")) - - #define vec_vsum4ubs(a1, a2) \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vsum4ubs ((vector signed char) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_vsum4ubs")) - - #define vec_sum2s(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsum2sws ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsum2sws ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sum2s")) - - #define vec_sums(a1, a2) \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vsumsws ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vsumsws ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_sums")) - - #define vec_trunc(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -- ((vector float) __builtin_altivec_vrfiz ((vector float) (a1))), \ -+__ch (__un_args_eq (__vector float, (a1)), \ -+ ((__vector float) __builtin_altivec_vrfiz ((__vector float) (a1))), \ - __builtin_altivec_compiletime_error ("vec_trunc")) - - #define vec_unpackh(a1) \ --__ch (__un_args_eq (vector signed char, (a1)), \ -- ((vector signed short) __builtin_altivec_vupkhsb ((vector signed char) (a1))), \ --__ch (__un_args_eq (vector bool char, (a1)), \ -- ((vector bool short) __builtin_altivec_vupkhsb ((vector signed char) (a1))), \ --__ch (__un_args_eq (vector pixel, (a1)), \ -- ((vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) (a1))), \ --__ch (__un_args_eq (vector signed short, (a1)), \ -- ((vector signed int) __builtin_altivec_vupkhsh ((vector signed short) (a1))), \ --__ch (__un_args_eq (vector bool short, (a1)), \ -- ((vector bool int) __builtin_altivec_vupkhsh ((vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector signed char, (a1)), \ -+ ((__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \ -+__ch (__un_args_eq (__vector __bool char, (a1)), \ -+ ((__vector __bool short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \ -+__ch (__un_args_eq (__vector __pixel, (a1)), \ -+ ((__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector signed short, (a1)), \ -+ ((__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector __bool short, (a1)), \ -+ ((__vector __bool int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \ - __builtin_altivec_compiletime_error ("vec_unpackh")))))) - - #define vec_vupkhsh(a1) \ --__ch (__un_args_eq (vector signed short, (a1)), \ -- ((vector signed int) __builtin_altivec_vupkhsh ((vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector signed short, (a1)), \ -+ ((__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \ - __builtin_altivec_compiletime_error ("vec_vupkhsh")) - - #define vec_vupkhpx(a1) \ --__ch (__un_args_eq (vector unsigned short, (a1)), \ -- ((vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector unsigned short, (a1)), \ -+ ((__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) (a1))), \ - __builtin_altivec_compiletime_error ("vec_vupkhpx")) - - #define vec_vupkhsb(a1) \ --__ch (__un_args_eq (vector signed char, (a1)), \ -- ((vector signed short) __builtin_altivec_vupkhsb ((vector signed char) (a1))), \ -+__ch (__un_args_eq (__vector signed char, (a1)), \ -+ ((__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \ - __builtin_altivec_compiletime_error ("vec_vupkhsb")) - - #define vec_unpackl(a1) \ --__ch (__un_args_eq (vector signed char, (a1)), \ -- ((vector signed short) __builtin_altivec_vupklsb ((vector signed char) (a1))), \ --__ch (__un_args_eq (vector bool char, (a1)), \ -- ((vector bool short) __builtin_altivec_vupklsb ((vector signed char) (a1))), \ --__ch (__un_args_eq (vector pixel, (a1)), \ -- ((vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) (a1))), \ --__ch (__un_args_eq (vector signed short, (a1)), \ -- ((vector signed int) __builtin_altivec_vupklsh ((vector signed short) (a1))), \ --__ch (__un_args_eq (vector bool short, (a1)), \ -- ((vector bool int) __builtin_altivec_vupklsh ((vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector signed char, (a1)), \ -+ ((__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \ -+__ch (__un_args_eq (__vector __bool char, (a1)), \ -+ ((__vector __bool short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \ -+__ch (__un_args_eq (__vector __pixel, (a1)), \ -+ ((__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector signed short, (a1)), \ -+ ((__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector __bool short, (a1)), \ -+ ((__vector __bool int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \ - __builtin_altivec_compiletime_error ("vec_unpackl")))))) - - #define vec_vupklsh(a1) \ --__ch (__un_args_eq (vector signed short, (a1)), \ -- ((vector signed int) __builtin_altivec_vupklsh ((vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector signed short, (a1)), \ -+ ((__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \ - __builtin_altivec_compiletime_error ("vec_vupklsh")) - - #define vec_vupklpx(a1) \ --__ch (__un_args_eq (vector unsigned short, (a1)), \ -- ((vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) (a1))), \ -+__ch (__un_args_eq (__vector unsigned short, (a1)), \ -+ ((__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) (a1))), \ - __builtin_altivec_compiletime_error ("vec_vupklpx")) - - #define vec_vupklsb(a1) \ --__ch (__un_args_eq (vector signed char, (a1)), \ -- ((vector signed short) __builtin_altivec_vupklsb ((vector signed char) (a1))), \ -+__ch (__un_args_eq (__vector signed char, (a1)), \ -+ ((__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \ - __builtin_altivec_compiletime_error ("vec_vupklsb")) - - #define vec_xor(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector float, (a1), vector bool int, (a2)), \ -- ((vector float) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector float, (a2)), \ -- ((vector float) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- ((vector bool int) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- ((vector signed int) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- ((vector signed int) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- ((vector unsigned int) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- ((vector bool short) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- ((vector signed short) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- ((vector signed short) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- ((vector bool char) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- ((vector signed char) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- ((vector signed char) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- ((vector unsigned char) __builtin_altivec_vxor ((vector signed int) (a1), (vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector __bool int, (a2)), \ -+ ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector float, (a2)), \ -+ ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ ((__vector __bool int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ ((__vector __bool short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ ((__vector __bool char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \ - __builtin_altivec_compiletime_error ("vec_xor"))))))))))))))))))))))))) - - /* Predicates. */ - - #define vec_all_eq(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpeqfp_p (__CR6_LT, (vector float) (a1), (vector float) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpeqfp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \ - __builtin_altivec_compiletime_error ("vec_all_eq")))))))))))))))))))))))) - - #define vec_all_ge(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpgefp_p (__CR6_LT, (vector float) (a1), (vector float) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpgefp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \ - __builtin_altivec_compiletime_error ("vec_all_ge")))))))))))))))))))) - - #define vec_all_gt(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpgtfp_p (__CR6_LT, (vector float) (a1), (vector float) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpgtfp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \ - __builtin_altivec_compiletime_error ("vec_all_gt")))))))))))))))))))) - - #define vec_all_in(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpbfp_p (__CR6_EQ, (a1), (a2)), \ - __builtin_altivec_compiletime_error ("vec_all_in")) - - #define vec_all_le(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpgefp_p (__CR6_LT, (vector float) (a2), (vector float) (a1)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpgefp_p (__CR6_LT, (__vector float) (a2), (__vector float) (a1)), \ - __builtin_altivec_compiletime_error ("vec_all_le")))))))))))))))))))) - - #define vec_all_lt(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpgtfp_p (__CR6_LT, (vector float) (a2), (vector float) (a1)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpgtfp_p (__CR6_LT, (__vector float) (a2), (__vector float) (a1)), \ - __builtin_altivec_compiletime_error ("vec_all_lt")))))))))))))))))))) - - #define vec_all_nan(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -+__ch (__un_args_eq (__vector float, (a1)), \ - __builtin_altivec_vcmpeqfp_p (__CR6_EQ, (a1), (a1)), \ - __builtin_altivec_compiletime_error ("vec_all_nan")) - - #define vec_all_ne(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpeqfp_p (__CR6_EQ, (vector float) (a1), (vector float) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpeqfp_p (__CR6_EQ, (__vector float) (a1), (__vector float) (a2)), \ - __builtin_altivec_compiletime_error ("vec_all_ne")))))))))))))))))))))))) - - #define vec_all_nge(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpgefp_p (__CR6_EQ, (a1), (a2)), \ - __builtin_altivec_compiletime_error ("vec_all_nge")) - - #define vec_all_ngt(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpgtfp_p (__CR6_EQ, (a1), (a2)), \ - __builtin_altivec_compiletime_error ("vec_all_ngt")) - - #define vec_all_nle(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpgefp_p (__CR6_EQ, (a2), (a1)), \ - __builtin_altivec_compiletime_error ("vec_all_nle")) - - #define vec_all_nlt(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpgtfp_p (__CR6_EQ, (a2), (a1)), \ - __builtin_altivec_compiletime_error ("vec_all_nlt")) - - #define vec_all_numeric(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -+__ch (__un_args_eq (__vector float, (a1)), \ - __builtin_altivec_vcmpeqfp_p (__CR6_LT, (a1), (a1)), \ - __builtin_altivec_compiletime_error ("vec_all_numeric")) - - #define vec_any_eq(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, (vector float) (a1), (vector float) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \ - __builtin_altivec_compiletime_error ("vec_any_eq")))))))))))))))))))))))) - - #define vec_any_ge(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, (vector float) (a1), (vector float) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \ - __builtin_altivec_compiletime_error ("vec_any_ge")))))))))))))))))))) - - #define vec_any_gt(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, (vector float) (a1), (vector float) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \ - __builtin_altivec_compiletime_error ("vec_any_gt")))))))))))))))))))) - - #define vec_any_le(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, (vector float) (a2), (vector float) (a1)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, (__vector float) (a2), (__vector float) (a1)), \ - __builtin_altivec_compiletime_error ("vec_any_le")))))))))))))))))))) - - #define vec_any_lt(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (vector signed char) (a2), (vector signed char) (a1)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (vector signed short) (a2), (vector signed short) (a1)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (vector signed int) (a2), (vector signed int) (a1)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, (vector float) (a2), (vector float) (a1)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, (__vector float) (a2), (__vector float) (a1)), \ - __builtin_altivec_compiletime_error ("vec_any_lt")))))))))))))))))))) - - #define vec_any_nan(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -+__ch (__un_args_eq (__vector float, (a1)), \ - __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, (a1), (a1)), \ - __builtin_altivec_compiletime_error ("vec_any_nan")) - - #define vec_any_ne(a1, a2) \ --__ch (__bin_args_eq (vector bool char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool char, (a1), vector bool char, (a2)), \ -- __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool short, (a1), vector bool short, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector pixel, (a1), vector pixel, (a2)), \ -- __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector bool int, (a1), vector bool int, (a2)), \ -- __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) (a1), (vector signed int) (a2)), \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -- __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, (vector float) (a1), (vector float) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \ -+ __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \ -+ __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \ -+ __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ -+ __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, (__vector float) (a1), (__vector float) (a2)), \ - __builtin_altivec_compiletime_error ("vec_any_ne")))))))))))))))))))))))) - - #define vec_any_nge(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, (a1), (a2)), \ - __builtin_altivec_compiletime_error ("vec_any_nge")) - - #define vec_any_ngt(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, (a1), (a2)), \ - __builtin_altivec_compiletime_error ("vec_any_ngt")) - - #define vec_any_nle(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, (a2), (a1)), \ - __builtin_altivec_compiletime_error ("vec_any_nle")) - - #define vec_any_nlt(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, (a2), (a1)), \ - __builtin_altivec_compiletime_error ("vec_any_nlt")) - - #define vec_any_numeric(a1) \ --__ch (__un_args_eq (vector float, (a1)), \ -+__ch (__un_args_eq (__vector float, (a1)), \ - __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, (a1), (a1)), \ - __builtin_altivec_compiletime_error ("vec_any_numeric")) - - #define vec_any_out(a1, a2) \ --__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \ -+__ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \ - __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, (a1), (a2)), \ - __builtin_altivec_compiletime_error ("vec_any_out")) - diff --git a/gcc-bug-reporting.patch b/gcc-bug-reporting.patch deleted file mode 100644 index ddc23c92..00000000 --- a/gcc-bug-reporting.patch +++ /dev/null @@ -1,31 +0,0 @@ -============================================================ -Index: gcc/gccbug.in ---- gcc/gccbug.in 12 Jan 2003 14:24:16 -0000 1.15.28.1 -+++ gcc/gccbug.in 18 Aug 2003 16:54:46 -0000 -@@ -28,7 +28,7 @@ VERSION=3.113 - SUBMITTER=net - - # The default mail address for PR submissions. --GNATS_ADDR=gcc-gnats@gcc.gnu.org -+GNATS_ADDR=feedback@suse.de - - # The default release for this host. - DEFAULT_RELEASE="@gcc_version_full@" -@@ -305,6 +305,7 @@ Subject: - From: $FROM - Reply-To: $REPLYTO - Cc: $CC -+X-Feedback-Type: GCC-Bug - X-send-pr-version: $VERSION - X-GNATS-Notify: - -============================================================ -Index: gcc/version.c ---- gcc/version.c 14 Aug 2003 13:20:18 -0000 1.1778.2.30 -+++ gcc/version.c 18 Aug 2003 16:54:46 -0000 -@@ -15,4 +15,4 @@ const char version_string[] = "3.3.1-ham - forward us bugs reported to you, if you determine that they are - not bugs in your modifications.) */ - --const char bug_report_url[] = ""; -+const char bug_report_url[] = ""; diff --git a/gcc-c99-double-inline.diff b/gcc-c99-double-inline.diff deleted file mode 100644 index 1a7ec705..00000000 --- a/gcc-c99-double-inline.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- gcc/c-decl.c.orig 2003-03-12 18:05:07.000000000 +0100 -+++ gcc/c-decl.c 2003-03-12 18:07:18.000000000 +0100 -@@ -3549,7 +3549,8 @@ grokdeclarator (declarator, declspecs, d - } - else if (specbits & (1 << (int) i)) - { -- if (i == RID_CONST || i == RID_VOLATILE || i == RID_RESTRICT) -+ if (i == RID_CONST || i == RID_VOLATILE || i == RID_RESTRICT -+ || i == RID_INLINE) - { - if (!flag_isoc99) - pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id)); diff --git a/gcc-c99numbers.diff b/gcc-c99numbers.diff deleted file mode 100644 index f2a24dae..00000000 --- a/gcc-c99numbers.diff +++ /dev/null @@ -1,17 +0,0 @@ -Index: gcc/cppexp.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/cppexp.c,v -retrieving revision 1.136 -diff -u -p -r1.136 cppexp.c ---- gcc/cppexp.c 19 Dec 2002 05:18:04 -0000 1.136 -+++ gcc/cppexp.c 13 Mar 2003 20:41:04 -0000 -@@ -175,7 +175,8 @@ cpp_classify_number (pfile, token) - str++; - - /* Require at least one hex digit to classify it as hex. */ -- if ((*str == 'x' || *str == 'X') && ISXDIGIT (str[1])) -+ if ((*str == 'x' || *str == 'X') -+ && (str[1] == '.' || ISXDIGIT (str[1]))) - { - radix = 16; - str++; diff --git a/gcc-compact-dwarf2.patch b/gcc-compact-dwarf2.patch deleted file mode 100644 index b36b2a44..00000000 --- a/gcc-compact-dwarf2.patch +++ /dev/null @@ -1,446 +0,0 @@ -This is Andi's backport for unused types pruning. I (matz) have only added -the option to disable it again. - - -From: Andi Kleen -Subject: More compact dwarf2 information for gcc (with patch) -Date: Sun, 2 Mar 2003 07:43:14 +0100 - - -I ported Scott Snyder's dwarf2 compression patch that was recently -posted on the gcc mailing list to the SuSE gcc. What it does is to -not dump types to the debugging information that are not referenced -to dwarf2. - -The main change compared to the patch (which was against 3.4 mainline) -was to not use varrays which do not seem to exist in that tree. -I just cloned the file_table dynamic array instead. - -I enabled it by default. In theory it makes a difference when you try -to reference a type that is not used in the program from gdb, -but referencing just types seems to be somewhat pointless -to me (especially when such a obscure feature eats >100MB of disk space -in the build), so I just enabled it by default. - -gcc also seems to have an -feliminate-dwarf2-dups option which may -further help (but is off by default for some reason). Perhaps -it can be considered for turning on too? Or is there some problem -with it I am missing? - -Just applying the patch makes a nice difference (without --feliminate-dwarf2-dups) - -e.g. this is a simple x86-64 kernel compilation with -g. The tree -is stripped down with only minimal drivers enabled. - -before: - -build tree size 528M --rwxr-xr-x 1 ak users 44M 2003-03-02 02:25 vmlinux -random object file: -1356440 276 -rw-r--r-- 2 ak users 276312 Mar 2 01:45 ./kernel/sys - -after: -ld tree size 411M --rwxr-xr-x 1 ak users 30M 2003-03-02 07:26 vmlinux - --rw-r--r-- 2 ak users 206096 2003-03-02 07:22 kernel/sys.o - - -Both the final executable and the object files shrink nicely. -Also the compilation is faster because gcc has to do much less IO -(compilation with -g seems to be mostly IO bound) - -Can we please consider this patch for inclusion into the 3.3 SuSE gcc ? - --Andi - -Index: gcc/flags.h -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/flags.h,v -retrieving revision 1.93.2.13 -diff -u -p -r1.93.2.13 flags.h ---- gcc/flags.h 2 Feb 2004 16:25:40 -0000 1.93.2.13 -+++ gcc/flags.h 21 May 2004 12:58:25 -0000 -@@ -677,6 +677,10 @@ extern int flag_speculative_prefetching; - - extern int flag_eliminate_dwarf2_dups; - -+/* Nonzero means we should do unused type elimination. */ -+ -+extern int flag_eliminate_unused_debug_types; -+ - /* Nonzero means to collect statistics which might be expensive - and to print them when we are done. */ - extern int flag_detailed_statistics; -Index: gcc/toplev.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/toplev.c,v -retrieving revision 1.688.2.50 -diff -u -p -r1.688.2.50 toplev.c ---- gcc/toplev.c 21 Apr 2004 15:17:24 -0000 1.688.2.50 -+++ gcc/toplev.c 21 May 2004 12:58:26 -0000 -@@ -383,6 +383,10 @@ tree current_function_func_begin_label; - - int flag_eliminate_dwarf2_dups = 0; - -+/* Nonzero if doing unused type elimination. */ -+ -+int flag_eliminate_unused_debug_types = 1; -+ - /* Nonzero if generating code to do profiling. */ - - int profile_flag = 0; -@@ -1054,6 +1058,8 @@ static const lang_independent_options f_ - { - {"eliminate-dwarf2-dups", &flag_eliminate_dwarf2_dups, 1, - N_("Perform DWARF2 duplicate elimination") }, -+ {"eliminate-unused-debug-types", &flag_eliminate_unused_debug_types, 1, -+ N_("Eliminate debug info of unused types") }, - {"float-store", &flag_float_store, 1, - N_("Do not store floats in registers") }, - {"volatile", &flag_volatile, 1, -Index: gcc/dwarf2out.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v -retrieving revision 1.389.2.20 -diff -u -p -r1.389.2.20 dwarf2out.c ---- gcc/dwarf2out.c 29 Apr 2004 15:20:33 -0000 1.389.2.20 -+++ gcc/dwarf2out.c 21 May 2004 12:58:26 -0000 -@@ -3397,6 +3397,7 @@ struct file_table - - /* Filenames referenced by this compilation unit. */ - static struct file_table file_table; -+static struct file_table file_table_emitted; - - /* Local pointer to the name of the main input file. Initialized in - dwarf2out_init. */ -@@ -3796,6 +3797,14 @@ static void output_loc_list PARAMS ((dw - static char *gen_internal_sym PARAMS ((const char *)); - static void mark_limbo_die_list PARAMS ((void *)); - -+static void prune_unmark_dies PARAMS ((dw_die_ref)); -+static void prune_unused_types_mark PARAMS ((dw_die_ref, int)); -+static void prune_unused_types_walk PARAMS ((dw_die_ref)); -+static void prune_unused_types_walk_attribs PARAMS ((dw_die_ref)); -+static void prune_unused_types_prune PARAMS ((dw_die_ref)); -+static void prune_unused_types PARAMS ((void)); -+static unsigned long maybe_emit_file PARAMS ((int)); -+ - /* Section names used to hold DWARF debugging information. */ - #ifndef DEBUG_INFO_SECTION - #define DEBUG_INFO_SECTION ".debug_info" -@@ -5172,6 +5181,7 @@ splice_child_die (parent, child) - break; - } - -+ child->die_parent = parent; - child->die_sib = parent->die_child; - parent->die_child = child; - } -@@ -12746,13 +12756,21 @@ lookup_filename (file_name) - file_table.in_use = i + 1; - file_table.last_lookup_index = i; - -- if (DWARF2_ASM_LINE_DEBUG_INFO) -+ /* Prepare to add a new table entry by making sure there is enough space in -+ the table to do so. If not, expand the current table. */ -+ if (i >= file_table_emitted.allocated) - { -- fprintf (asm_out_file, "\t.file %u ", i); -- output_quoted_string (asm_out_file, file_name); -- fputc ('\n', asm_out_file); -+ file_table_emitted.allocated = i + FILE_TABLE_INCREMENT; -+ file_table_emitted.table = (char **) -+ xrealloc (file_table_emitted.table, -+ file_table_emitted.allocated * sizeof (char *)); - } - -+ /* Add the new entry to the end of the filename table. */ -+ file_table_emitted.table[i] = NULL; -+ file_table_emitted.in_use = i + 1; -+ file_table_emitted.last_lookup_index = i; -+ - return i; - } - -@@ -12763,9 +12781,38 @@ init_file_table () - file_table.table = (char **) xcalloc (FILE_TABLE_INCREMENT, sizeof (char *)); - file_table.allocated = FILE_TABLE_INCREMENT; - -+ file_table_emitted.table = (char **) xcalloc (FILE_TABLE_INCREMENT, sizeof (char *)); -+ file_table_emitted.allocated = FILE_TABLE_INCREMENT; -+ - /* Skip the first entry - file numbers begin at 1. */ - file_table.in_use = 1; - file_table.last_lookup_index = 0; -+ -+ file_table_emitted.in_use = 1; -+ file_table_emitted.last_lookup_index = 0; -+} -+ -+static unsigned long -+maybe_emit_file (fileno) -+ int fileno; -+{ -+ static int emitcount = 0; -+ if (DWARF2_ASM_LINE_DEBUG_INFO && fileno > 0) -+ { -+ if (!file_table_emitted.table[fileno]) -+ { -+ file_table_emitted.table[fileno] = (char *)++emitcount; -+ fprintf (asm_out_file, "\t.file %lu ", -+ (unsigned long) -+ file_table_emitted.table[fileno]); -+ output_quoted_string (asm_out_file, -+ file_table.table[fileno]); -+ fputc ('\n', asm_out_file); -+ } -+ return (unsigned long)file_table_emitted.table[fileno]; -+ } -+ else -+ return fileno; - } - - /* Called by the final INSN scan whenever we see a var location. We -@@ -12847,6 +12894,8 @@ dwarf2out_source_line (line, filename) - { - unsigned file_num = lookup_filename (filename); - -+ file_num = maybe_emit_file (file_num); -+ - /* Emit the .loc directive understood by GNU as. */ - fprintf (asm_out_file, "\t.loc %d %d 0\n", file_num, line); - -@@ -12932,6 +12981,7 @@ dwarf2out_start_source_file (lineno, fil - dw2_asm_output_data (1, DW_MACINFO_start_file, "Start new file"); - dw2_asm_output_data_uleb128 (lineno, "Included from line number %d", - lineno); -+ maybe_emit_file (lookup_filename (filename)); - dw2_asm_output_data_uleb128 (lookup_filename (filename), - "Filename we just started"); - } -@@ -13122,6 +13172,213 @@ output_indirect_string (pfile, h, v) - return 1; - } - -+ -+/* Clear the marks for a die and its children. -+ Be cool if the mark isn't set. */ -+ -+static void -+prune_unmark_dies (die) -+ dw_die_ref die; -+{ -+ dw_die_ref c; -+ die->die_mark = 0; -+ for (c = die->die_child; c; c = c->die_sib) -+ prune_unmark_dies (c); -+} -+ -+ -+/* Given DIE that we're marking as used, find any other dies -+ it references as attributes and mark them as used. */ -+ -+static void -+prune_unused_types_walk_attribs (die) -+ dw_die_ref die; -+{ -+ dw_attr_ref a; -+ -+ for (a = die->die_attr; a != NULL; a = a->dw_attr_next) -+ { -+ if (a->dw_attr_val.val_class == dw_val_class_die_ref) -+ { -+ /* A reference to another DIE. -+ Make sure that it will get emitted. */ -+ prune_unused_types_mark (a->dw_attr_val.v.val_die_ref.die, 1); -+ } -+ else if (a->dw_attr == DW_AT_decl_file) -+ { -+ /* A reference to a file. Make sure the file name is emitted. */ -+ a->dw_attr_val.v.val_unsigned = -+ maybe_emit_file (a->dw_attr_val.v.val_unsigned); -+ } -+ } -+} -+ -+ -+/* Mark DIE as being used. If DOKIDS is true, then walk down -+ to DIE's children. */ -+ -+static void -+prune_unused_types_mark (die, dokids) -+ dw_die_ref die; -+ int dokids; -+{ -+ dw_die_ref c; -+ -+ if (die->die_mark == 0) { -+ /* We haven't done this node yet. Mark it as used. */ -+ die->die_mark = 1; -+ -+ /* We also have to mark its parents as used. -+ (But we don't want to mark our parents' kids due to this.) */ -+ if (die->die_parent) -+ prune_unused_types_mark (die->die_parent, 0); -+ -+ /* Mark any referenced nodes. */ -+ prune_unused_types_walk_attribs (die); -+ } -+ -+ if (dokids && die->die_mark != 2) -+ { -+ /* We need to walk the children, but haven't done so yet. -+ Remember that we've walked the kids. */ -+ die->die_mark = 2; -+ -+ /* Walk them. */ -+ for (c = die->die_child; c; c = c->die_sib) -+ { -+ /* If this is an array type, we need to make sure our -+ kids get marked, even if they're types. */ -+ if (die->die_tag == DW_TAG_array_type) -+ prune_unused_types_mark (c, 1); -+ else -+ prune_unused_types_walk (c); -+ } -+ } -+} -+ -+ -+/* Walk the tree DIE and mark types that we actually use. */ -+ -+static void -+prune_unused_types_walk (die) -+ dw_die_ref die; -+{ -+ dw_die_ref c; -+ -+ /* Don't do anything if this node is already marked. */ -+ if (die->die_mark) -+ return; -+ -+ switch (die->die_tag) { -+ case DW_TAG_const_type: -+ case DW_TAG_packed_type: -+ case DW_TAG_pointer_type: -+ case DW_TAG_reference_type: -+ case DW_TAG_volatile_type: -+ case DW_TAG_typedef: -+ case DW_TAG_array_type: -+ case DW_TAG_structure_type: -+ case DW_TAG_union_type: -+ case DW_TAG_class_type: -+ case DW_TAG_friend: -+ case DW_TAG_variant_part: -+ case DW_TAG_enumeration_type: -+ case DW_TAG_subroutine_type: -+ case DW_TAG_string_type: -+ case DW_TAG_set_type: -+ case DW_TAG_subrange_type: -+ case DW_TAG_ptr_to_member_type: -+ case DW_TAG_file_type: -+ /* It's a type node --- don't mark it. */ -+ return; -+ -+ default: -+ /* Mark everything else. */ -+ break; -+ } -+ -+ die->die_mark = 1; -+ -+ /* Now, mark any dies referenced from here. */ -+ prune_unused_types_walk_attribs (die); -+ -+ /* Mark children. */ -+ for (c = die->die_child; c; c = c->die_sib) -+ prune_unused_types_walk (c); -+} -+ -+ -+/* Remove from the tree DIE any dies that aren't marked. */ -+ -+static void -+prune_unused_types_prune (die) -+ dw_die_ref die; -+{ -+ dw_die_ref c, p, n; -+ if (!die->die_mark) -+ abort(); -+ -+ p = NULL; -+ for (c = die->die_child; c; c = n) -+ { -+ n = c->die_sib; -+ if (c->die_mark) -+ { -+ prune_unused_types_prune (c); -+ p = c; -+ } -+ else -+ { -+ if (p) -+ p->die_sib = n; -+ else -+ die->die_child = n; -+ free_die (c); -+ } -+ } -+} -+ -+ -+/* Remove dies representing declarations that we never use. */ -+ -+static void -+prune_unused_types () -+{ -+ unsigned int i; -+ limbo_die_node *node; -+ -+ /* Clear all the marks. */ -+ prune_unmark_dies (comp_unit_die); -+ for (node = limbo_die_list; node; node = node->next) -+ prune_unmark_dies (node->die); -+ -+ /* Set the mark on nodes that are actually used. */ -+ prune_unused_types_walk (comp_unit_die); -+ for (node = limbo_die_list; node; node = node->next) -+ prune_unused_types_walk (node->die); -+ -+ /* Also set the mark on nodes referenced from the -+ pubname_table or arange_table. */ -+ for (i=0; i < pubname_table_in_use; i++) -+ { -+ prune_unused_types_mark (pubname_table[i].die, 1); -+ } -+ for (i=0; i < arange_table_in_use; i++) -+ { -+ prune_unused_types_mark (arange_table[i], 1); -+ } -+ -+ /* Get rid of nodes that aren't marked. */ -+ prune_unused_types_prune (comp_unit_die); -+ for (node = limbo_die_list; node; node = node->next) -+ prune_unused_types_prune (node->die); -+ -+ /* Leave the marks clear. */ -+ prune_unmark_dies (comp_unit_die); -+ for (node = limbo_die_list; node; node = node->next) -+ prune_unmark_dies (node->die); -+} -+ - /* Output stuff that dwarf requires at the end of every file, - and generate the DWARF-2 debugging info. */ - -@@ -13196,6 +13453,9 @@ dwarf2out_finish (input_filename) - /* We need to reverse all the dies before break_out_includes, or - we'll see the end of an include file before the beginning. */ - reverse_all_dies (comp_unit_die); -+ -+ if (flag_eliminate_unused_debug_types) -+ prune_unused_types (); - - /* Generate separate CUs for each of the include files we've seen. - They will go into limbo_die_list. */ diff --git a/gcc-configure.patch b/gcc-configure.patch deleted file mode 100644 index b3160e9e..00000000 --- a/gcc-configure.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- gcc/config.gcc.~1.259.4.26.~ 2004-06-22 21:47:05.000000000 +0200 -+++ gcc/config.gcc 2004-08-02 00:46:20.468908063 +0200 -@@ -175,6 +175,7 @@ - # system normally uses GNU ld. - - out_file= -+md_file= - xmake_file= - tmake_file= - extra_headers= diff --git a/gcc-cse-mem-expr.patch b/gcc-cse-mem-expr.patch deleted file mode 100644 index 40973adb..00000000 --- a/gcc-cse-mem-expr.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up gcc/cse.c.orig gcc/cse.c ---- gcc/cse.c.orig 2003-08-11 00:02:24.000000000 +0200 -+++ gcc/cse.c 2003-07-31 23:49:21.000000000 +0200 -@@ -6682,7 +6682,8 @@ invalidate_skipped_set (dest, set, data) - a BLKmode or nonscalar memory reference or a reference to a - variable address. */ - && (MEM_IN_STRUCT_P (dest) || GET_MODE (dest) == BLKmode -- || cse_rtx_varies_p (XEXP (dest, 0), 0))) -+ || cse_rtx_varies_p (XEXP (dest, 0), 0)) -+ && !MEM_EXPR (dest)) - { - invalidate_memory (); - return; diff --git a/gcc-emit-note.patch b/gcc-emit-note.patch deleted file mode 100644 index 52d8f9ba..00000000 --- a/gcc-emit-note.patch +++ /dev/null @@ -1,27 +0,0 @@ - -Index: gcc/expr.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/expr.c,v -retrieving revision 1.492.2.19 -diff -c -3 -p -r1.492.2.19 expr.c -*** gcc/expr.c 14 Aug 2003 13:20:12 -0000 1.492.2.19 ---- gcc/expr.c 5 Sep 2003 11:03:33 -0000 -*************** emit_block_move_via_loop (x, y, size, al -*** 2066,2073 **** - if (tmp != iter) - emit_move_insn (iter, tmp); - -- emit_note (NULL, NOTE_INSN_LOOP_CONT); - emit_label (cmp_label); - - emit_cmp_and_jump_insns (iter, size, LT, NULL_RTX, iter_mode, - true, top_label); ---- 2066,2073 ---- - if (tmp != iter) - emit_move_insn (iter, tmp); - - emit_label (cmp_label); -+ emit_note (NULL, NOTE_INSN_LOOP_CONT); - - emit_cmp_and_jump_insns (iter, size, LT, NULL_RTX, iter_mode, - true, top_label); diff --git a/gcc-ffi.patch b/gcc-ffi.patch deleted file mode 100644 index 758823fa..00000000 --- a/gcc-ffi.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libffi/src/ia64/ffi.c 11 Mar 2004 15:27:24 +0100 1.3.18.1 -+++ libffi/src/ia64/ffi.c 17 Apr 2004 10:09:06 +0200 -@@ -65,6 +65,7 @@ static size_t float_type_size(unsigned s - #endif - default: - FFI_ASSERT(0); -+ abort(); - } - } - diff --git a/gcc-fworking-directory.patch b/gcc-fworking-directory.patch deleted file mode 100644 index a91f6465..00000000 --- a/gcc-fworking-directory.patch +++ /dev/null @@ -1,446 +0,0 @@ -2003-08-05 Alexandre Oliva - - * c.opt: Introduce -fworking-directory. - * doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it. - * c-common.h (flag_working_directory): Declare. - * c-common.c (flag_working_directory): Define. - * c-opts.c (c_common_handle_options): Set it. - (sanitize_cpp_opts): Set... - * cpplib.h (struct cpp_options): ... working_directory option. - (struct cpp_callbacks): Add dir_change. - * cppinit.c (read_original_filename): Call... - (read_original_directory): New. Look for # 1 "directory//" - and process it. - (cpp_read_main_file): Call dir_change callback if working_directory - option is set. - * gcc.c (cpp_unique_options): Pass -g*. - * c-lex.c (cb_dir_change): New. - (init_c_lex): Set dir_change callback. - * toplev.c (src_pwd): New static variable. - (set_src_pwd, get_src_pwd): New functions. - * toplev.h (get_src_pwd, set_src_pwd): Declare. - * dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd(). - * dwarf2out.c (gen_compile_unit_die): Likewise. - * dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise. - -================================================================================ ---- gcc-3.3.4/gcc/c-common.c -+++ gcc-3.3.4/gcc/c-common.c -@@ -548,6 +548,13 @@ - - int flag_weak = 1; - -+/* 0 means we want the preprocessor to not emit line directives for -+ the current working directory. 1 means we want it to do it. -1 -+ means we should decide depending on whether debugging information -+ is being emitted or not. */ -+ -+int flag_working_directory = -1; -+ - /* Nonzero to use __cxa_atexit, rather than atexit, to register - destructors for local statics and global objects. */ - ---- gcc-3.3.4/gcc/c-common.h -+++ gcc-3.3.4/gcc/c-common.h -@@ -711,6 +711,13 @@ - - extern int flag_weak; - -+/* 0 means we want the preprocessor to not emit line directives for -+ the current working directory. 1 means we want it to do it. -1 -+ means we should decide depending on whether debugging information -+ is being emitted or not. */ -+ -+extern int flag_working_directory; -+ - /* Nonzero to use __cxa_atexit, rather than atexit, to register - destructors for local statics and global objects. */ - ---- gcc-3.3.4/gcc/c-lex.c -+++ gcc-3.3.4/gcc/c-lex.c -@@ -82,6 +82,7 @@ - static void update_header_times PARAMS ((const char *)); - static int dump_one_header PARAMS ((splay_tree_node, void *)); - static void cb_line_change PARAMS ((cpp_reader *, const cpp_token *, int)); -+static void cb_dir_change PARAMS ((cpp_reader *, const char *)); - static void cb_ident PARAMS ((cpp_reader *, unsigned int, - const cpp_string *)); - static void cb_file_change PARAMS ((cpp_reader *, const struct line_map *)); -@@ -119,6 +120,7 @@ - cb = cpp_get_callbacks (parse_in); - - cb->line_change = cb_line_change; -+ cb->dir_change = cb_dir_change; - cb->ident = cb_ident; - cb->file_change = cb_file_change; - cb->def_pragma = cb_def_pragma; -@@ -206,6 +208,13 @@ - return 0; - } - -+static void -+cb_dir_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const char *dir) -+{ -+ if (! set_src_pwd (dir)) -+ warning ("too late for # directive to set debug directory"); -+} -+ - void - dump_time_statistics () - { ---- gcc-3.3.4/gcc/c-opts.c -+++ gcc-3.3.4/gcc/c-opts.c -@@ -124,6 +124,7 @@ - OPT("MQ", CL_ALL | CL_ARG, OPT_MQ) \ - OPT("MT", CL_ALL | CL_ARG, OPT_MT) \ - OPT("P", CL_ALL, OPT_P) \ -+ OPT("fworking-directory", CL_ALL, OPT_fworking_directory) \ - OPT("Wabi", CL_CXX, OPT_Wabi) \ - OPT("Wall", CL_ALL, OPT_Wall) \ - OPT("Wbad-function-cast", CL_C, OPT_Wbad_function_cast) \ -@@ -686,6 +687,10 @@ - cpp_opts->no_line_commands = 1; - break; - -+ case OPT_fworking_directory: -+ flag_working_directory = on; -+ break; -+ - case OPT_Wabi: - warn_abi = on; - break; -@@ -1587,6 +1592,15 @@ - and/or -Wtraditional, whatever the ordering. */ - cpp_opts->warn_long_long - = warn_long_long && ((!flag_isoc99 && pedantic) || warn_traditional); -+ -+ /* If we're generating preprocessor output, emit current directory -+ if explicitly requested or if debugging information is enabled. -+ ??? Maybe we should only do it for debugging formats that -+ actually output the current directory? */ -+ if (flag_working_directory == -1) -+ flag_working_directory = (debug_info_level != DINFO_LEVEL_NONE); -+ cpp_opts->working_directory -+ = flag_preprocess_only && flag_working_directory; - } - - /* Set the C 89 standard (with 1994 amendments if C94, without GNU -@@ -1790,6 +1804,10 @@ - -dI Include #include directives in the output\n\ - "), stdout); - fputs (_("\ -+ -fworking-directory Generate a #line directive pointing at the\n\ -+ current working directory\n\ -+"), stdout); -+ fputs (_("\ - -f[no-]preprocessed Treat the input file as already preprocessed\n\ - -ftabstop= Distance between tab stops for column reporting\n\ - -P Do not generate #line directives\n\ ---- gcc-3.3.4/gcc/cppinit.c -+++ gcc-3.3.4/gcc/cppinit.c -@@ -107,6 +107,7 @@ - static void free_chain PARAMS ((struct pending_option *)); - static void init_standard_includes PARAMS ((cpp_reader *)); - static void read_original_filename PARAMS ((cpp_reader *)); -+static void read_original_directory PARAMS ((cpp_reader *)); - static void new_pending_directive PARAMS ((struct cpp_pending *, - const char *, - cl_directive_handler)); -@@ -1026,6 +1027,24 @@ - if (CPP_OPTION (pfile, preprocessed)) - read_original_filename (pfile); - -+ if (CPP_OPTION (pfile, working_directory)) -+ { -+ const char *name = pfile->map->to_file; -+ const char *dir = getpwd (); -+ char *dir_with_slashes = alloca (strlen (dir) + 3); -+ -+ memcpy (dir_with_slashes, dir, strlen (dir)); -+ memcpy (dir_with_slashes + strlen (dir), "//", 3); -+ -+ if (pfile->cb.dir_change) -+ pfile->cb.dir_change (pfile, dir); -+ /* Emit file renames that will be recognized by -+ read_directory_filename, since dir_change doesn't output -+ anything. */ -+ _cpp_do_file_change (pfile, LC_RENAME, dir_with_slashes, 1, 0); -+ _cpp_do_file_change (pfile, LC_RENAME, name, 1, 0); -+ } -+ - return pfile->map->to_file; - } - -@@ -1051,6 +1070,7 @@ - if (token1->type == CPP_NUMBER) - { - _cpp_handle_directive (pfile, token->flags & PREV_WHITE); -+ read_original_directory (pfile); - return; - } - } -@@ -1059,6 +1079,61 @@ - _cpp_backup_tokens (pfile, 1); - } - -+/* For preprocessed files, if the tokens following the first filename -+ line is of the form # "/path/name//", handle the -+ directive so we know the original current directory. */ -+static void -+read_original_directory (pfile) -+ cpp_reader *pfile; -+{ -+ const cpp_token *hash, *token; -+ -+ /* Lex ahead; if the first tokens are of the form # NUM, then -+ process the directive, otherwise back up. */ -+ hash = _cpp_lex_direct (pfile); -+ if (hash->type != CPP_HASH) -+ { -+ _cpp_backup_tokens (pfile, 1); -+ return; -+ } -+ -+ token = _cpp_lex_direct (pfile); -+ -+ if (token->type != CPP_NUMBER) -+ { -+ _cpp_backup_tokens (pfile, 2); -+ return; -+ } -+ -+ token = _cpp_lex_direct (pfile); -+ -+ if (token->type != CPP_STRING -+ || ! (token->val.str.len >= 5 -+ && token->val.str.text[token->val.str.len-2] == '/' -+ && token->val.str.text[token->val.str.len-3] == '/')) -+ { -+ _cpp_backup_tokens (pfile, 3); -+ return; -+ } -+ -+ if (pfile->cb.dir_change) -+ { -+ char *debugdir = alloca (token->val.str.len - 3); -+ -+ memcpy (debugdir, (const char *) token->val.str.text + 1, -+ token->val.str.len - 4); -+ debugdir[token->val.str.len - 4] = '\0'; -+ -+ pfile->cb.dir_change (pfile, debugdir); -+ } -+ -+ /* We want to process the fake line changes as regular changes, to -+ get them output. */ -+ _cpp_backup_tokens (pfile, 3); -+ -+ CPP_OPTION (pfile, working_directory) = false; -+} -+ - /* Handle pending command line options: -D, -U, -A, -imacros and - -include. This should be called after debugging has been properly - set up in the front ends. */ ---- gcc-3.3.4/gcc/cpplib.h -+++ gcc-3.3.4/gcc/cpplib.h -@@ -407,6 +407,11 @@ - - /* Nonzero means __STDC__ should have the value 0 in system headers. */ - unsigned char stdc_0_in_system_headers; -+ -+ /* Nonzero means output a directory line marker right after the -+ initial file name line marker, and before a duplicate initial -+ line marker. */ -+ bool working_directory; - }; - - /* Call backs. */ -@@ -415,6 +420,7 @@ - /* Called when a new line of preprocessed output is started. */ - void (*line_change) PARAMS ((cpp_reader *, const cpp_token *, int)); - void (*file_change) PARAMS ((cpp_reader *, const struct line_map *)); -+ void (*dir_change) PARAMS ((cpp_reader *, const char *)); - void (*include) PARAMS ((cpp_reader *, unsigned int, - const unsigned char *, const cpp_token *)); - void (*define) PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *)); ---- gcc-3.3.4/gcc/dbxout.c -+++ gcc-3.3.4/gcc/dbxout.c -@@ -438,7 +438,8 @@ - if (use_gnu_debug_info_extensions) - #endif - { -- if (!cwd && (cwd = getpwd ()) && (!*cwd || cwd[strlen (cwd) - 1] != '/')) -+ if (!cwd && (cwd = get_src_pwd ()) -+ && (!*cwd || cwd[strlen (cwd) - 1] != '/')) - cwd = concat (cwd, FILE_NAME_JOINER, NULL); - if (cwd) - { ---- gcc-3.3.4/gcc/doc/cpp.texi -+++ gcc-3.3.4/gcc/doc/cpp.texi -@@ -4066,7 +4066,9 @@ - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-W}@var{warn}@dots{}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] -- [@option{-MP}] [@option{-MQ} @var{target}@dots{}] [@option{-MT} @var{target}@dots{}] -+ [@option{-MP}] [@option{-MQ} @var{target}@dots{}] -+ [@option{-MT} @var{target}@dots{}] -+ [@option{-P}] [@option{-fno-working-directory}] - [@option{-x} @var{language}] [@option{-std=}@var{standard}] - @var{infile} @var{outfile} - ---- gcc-3.3.4/gcc/doc/cppopts.texi -+++ gcc-3.3.4/gcc/doc/cppopts.texi -@@ -1,4 +1,4 @@ --@c Copyright (c) 1999, 2000, 2001, 2002 -+@c Copyright (c) 1999, 2000, 2001, 2002, 2003 - @c Free Software Foundation, Inc. - @c This is part of the CPP and GCC manuals. - @c For copying conditions, see the file gcc.texi. -@@ -470,6 +470,22 @@ - line. If the value is less than 1 or greater than 100, the option is - ignored. The default is 8. - -+@item -fworking-directory -+@opindex fworking-directory -+@opindex fno-working-directory -+Enable generation of linemarkers in the preprocessor output that will -+let the compiler know the current working directory at the time of -+preprocessing. When this option is enabled, the preprocessor will -+emit, after the initial linemarker, a second linemarker with the -+current working directory followed by two slashes. GCC will use this -+directory, when it's present in the preprocessed input, as the -+directory emitted as the current working directory in some debugging -+information formats. This option is implicitly enabled if debugging -+information is enabled, but this can be inhibited with the negated -+form @option{-fno-working-directory}. If the @option{-P} flag is -+present in the command line, this option has no effect, since no -+@code{#line} directives are emitted whatsoever. -+ - @item -fno-show-column - @opindex fno-show-column - Do not print column numbers in diagnostics. This may be necessary if ---- gcc-3.3.4/gcc/doc/invoke.texi -+++ gcc-3.3.4/gcc/doc/invoke.texi -@@ -294,7 +294,8 @@ - -include @var{file} -imacros @var{file} @gol - -iprefix @var{file} -iwithprefix @var{dir} @gol - -iwithprefixbefore @var{dir} -isystem @var{dir} @gol ---M -MM -MF -MG -MP -MQ -MT -nostdinc -P -remap @gol -+-M -MM -MF -MG -MP -MQ -MT -nostdinc @gol -+-P -fworking-directory -remap @gol - -trigraphs -undef -U@var{macro} -Wp,@var{option}} - - @item Assembler Option ---- gcc-3.3.4/gcc/dwarf2out.c -+++ gcc-3.3.4/gcc/dwarf2out.c -@@ -11764,7 +11764,7 @@ - { - dw_die_ref die; - char producer[250]; -- const char *wd = getpwd (); -+ const char *wd = get_src_pwd (); - const char *language_string = lang_hooks.name; - int language; - -@@ -13222,7 +13222,7 @@ - - if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL) - { -- char *wd = getpwd (); -+ char *wd = get_src_pwd (); - unsigned i; - - if (wd != NULL) ---- gcc-3.3.4/gcc/dwarfout.c -+++ gcc-3.3.4/gcc/dwarfout.c -@@ -4147,7 +4147,7 @@ - stmt_list_attribute (LINE_BEGIN_LABEL); - - { -- const char *wd = getpwd (); -+ const char *wd = get_src_pwd (); - if (wd) - comp_dir_attribute (wd); - } -@@ -6272,7 +6272,7 @@ - ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SFNAMES_SECTION); - ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL); - { -- const char *pwd = getpwd (); -+ const char *pwd = get_src_pwd (); - char *dirname; - - if (!pwd) ---- gcc-3.3.4/gcc/gcc.c -+++ gcc-3.3.4/gcc/gcc.c -@@ -725,7 +725,7 @@ - in turn cause preprocessor symbols to be defined specially. */ - static const char *cpp_options = - "%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*}\ -- %{O*} %{undef}"; -+ %{g*} %{O*} %{undef}"; - - /* This contains cpp options which are not passed when the preprocessor - output will be used by another program. */ ---- gcc-3.3.4/gcc/toplev.c -+++ gcc-3.3.4/gcc/toplev.c -@@ -1711,6 +1711,46 @@ - FILE *rtl_dump_file = NULL; - FILE *cgraph_dump_file = NULL; - -+/* The current working directory of a translation. It's generally the -+ directory from which compilation was initiated, but a preprocessed -+ file may specify the original directory in which it was -+ created. */ -+ -+static const char *src_pwd; -+ -+/* Initialize src_pwd with the given string, and return true. If it -+ was already initialized, return false. As a special case, it may -+ be called with a NULL argument to test whether src_pwd has NOT been -+ initialized yet. */ -+ -+bool -+set_src_pwd (const char *pwd) -+{ -+ if (src_pwd) -+ { -+ if (strcmp (src_pwd, pwd) == 0) -+ return true; -+ else -+ return false; -+ } -+ -+ src_pwd = xstrdup (pwd); -+ return true; -+} -+ -+/* Return the directory from which the translation unit was initiated, -+ in case set_src_pwd() was not called before to assign it a -+ different value. */ -+ -+const char * -+get_src_pwd (void) -+{ -+ if (! src_pwd) -+ src_pwd = getpwd (); -+ -+ return src_pwd; -+} -+ - /* Decode the string P as an integral parameter. - If the string is indeed an integer return its numeric value else - issue an Invalid Option error for the option PNAME and return DEFVAL. ---- gcc-3.3.4/gcc/toplev.h -+++ gcc-3.3.4/gcc/toplev.h -@@ -133,4 +133,10 @@ - extern int exact_log2_wide PARAMS ((unsigned HOST_WIDE_INT)); - extern int floor_log2_wide PARAMS ((unsigned HOST_WIDE_INT)); - -+/* Functions used to get and set GCC's notion of in what directory -+ compilation was started. */ -+ -+extern const char *get_src_pwd (void); -+extern bool set_src_pwd (const char *); -+ - #endif /* ! GCC_TOPLEV_H */ diff --git a/gcc-gcc-3.3-ppc64.patch b/gcc-gcc-3.3-ppc64.patch deleted file mode 100644 index ccfca68c..00000000 --- a/gcc-gcc-3.3-ppc64.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- gcc-3.3/libtool.m4.ppc64 2003-07-03 22:58:43.000000000 +0200 -+++ gcc-3.3/libtool.m4 2003-07-03 22:59:06.000000000 +0200 -@@ -202,6 +202,9 @@ - ppc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; -+ powerpc64-*linux*) -+ LD="${LD-ld} -m elf32ppclinux" -+ ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; -@@ -218,6 +221,9 @@ - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; -+ powerpc64-*linux*) -+ LD="${LD-ld} -m elf64ppc" -+ ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; diff --git a/gcc-gcc-3.3.5-hammer.patch.bz2 b/gcc-gcc-3.3.5-hammer.patch.bz2 deleted file mode 100644 index 2db901f0..00000000 --- a/gcc-gcc-3.3.5-hammer.patch.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:220ba46c8020c6ea1013b2711b602df4a4b52028a0406d434c93ff8f8f922628 -size 986481 diff --git a/gcc-gcc-noalias-warn.diff b/gcc-gcc-noalias-warn.diff deleted file mode 100644 index 9855bdae..00000000 --- a/gcc-gcc-noalias-warn.diff +++ /dev/null @@ -1,41 +0,0 @@ -Index: boehm-gc/finalize.c -=================================================================== -RCS file: /cvs/gcc/gcc/boehm-gc/finalize.c,v -retrieving revision 1.11.28.1 -diff -u -p -r1.11.28.1 finalize.c ---- boehm-gc/finalize.c 24 Jan 2004 11:05:54 -0000 1.11.28.1 -+++ boehm-gc/finalize.c 9 Feb 2004 16:07:25 -0000 -@@ -164,6 +164,7 @@ signed_word * log_size_ptr; - int index; - struct disappearing_link * new_dl; - DCL_LOCK_STATE; -+ struct disappearing_link *** dl_head_adr = &dl_head; - - if ((word)link & (ALIGNMENT-1)) - ABORT("Bad arg to GC_general_register_disappearing_link"); -@@ -176,7 +177,7 @@ signed_word * log_size_ptr; - # ifndef THREADS - DISABLE_SIGNALS(); - # endif -- GC_grow_table((struct hash_chain_entry ***)(&dl_head), -+ GC_grow_table((struct hash_chain_entry ***)dl_head_adr, - &log_dl_table_size); - # ifdef CONDPRINT - if (GC_print_stats) { -@@ -339,6 +340,7 @@ finalization_mark_proc * mp; - struct finalizable_object *new_fo; - hdr *hhdr; - DCL_LOCK_STATE; -+ struct finalizable_object *** fo_head_adr = &fo_head; - - # ifdef THREADS - DISABLE_SIGNALS(); -@@ -349,7 +351,7 @@ finalization_mark_proc * mp; - # ifndef THREADS - DISABLE_SIGNALS(); - # endif -- GC_grow_table((struct hash_chain_entry ***)(&fo_head), -+ GC_grow_table((struct hash_chain_entry ***)fo_head_adr, - &log_fo_table_size); - # ifdef CONDPRINT - if (GC_print_stats) { diff --git a/gcc-gcc32-ada-addr2line.patch b/gcc-gcc32-ada-addr2line.patch deleted file mode 100644 index fea26126..00000000 --- a/gcc-gcc32-ada-addr2line.patch +++ /dev/null @@ -1,30 +0,0 @@ -============================================================ -Index: gcc/ada/adaint.c ---- gcc/ada/adaint.c 31 May 2002 18:08:22 -0000 1.10 -+++ gcc/ada/adaint.c 22 Oct 2002 14:13:58 -0000 -@@ -2244,17 +2244,6 @@ int _flush_cache() - } - #endif - --#if defined (CROSS_COMPILE) \ -- || (! (defined (sparc) && defined (sun) && defined (__SVR4)) \ -- && ! defined (linux) \ -- && ! defined (hpux) \ -- && ! (defined (__alpha__) && defined (__osf__)) \ -- && ! defined (__MINGW32__)) -- --/* Dummy function to satisfy g-trasym.o. Currently Solaris sparc, HP/UX, -- GNU/Linux, Tru64 & Windows provide a non-dummy version of this procedure in -- libaddr2line.a. */ -- - void - convert_addresses (addrs, n_addr, buf, len) - void *addrs ATTRIBUTE_UNUSED; -@@ -2264,7 +2253,6 @@ convert_addresses (addrs, n_addr, buf, l - { - *len = 0; - } --#endif - - #if defined (_WIN32) - int __gnat_argument_needs_quote = 1; diff --git a/gcc-gcc32-ada-link.patch b/gcc-gcc32-ada-link.patch deleted file mode 100644 index 8eb41884..00000000 --- a/gcc-gcc32-ada-link.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- gcc/ada/link.c.jj Tue May 7 12:50:23 2002 -+++ gcc/ada/link.c Wed Jun 5 14:45:32 2002 -@@ -158,11 +158,11 @@ const char *object_library_extension = " - - #elif defined (linux) - const char *object_file_option = ""; --const char *run_path_option = "-Wl,-rpath,"; --char shared_libgnat_default = STATIC; -+const char *run_path_option = ""; -+char shared_libgnat_default = SHARED; - int link_max = 2147483647; - unsigned char objlist_file_supported = 0; --unsigned char using_gnu_linker = 0; -+unsigned char using_gnu_linker = 1; - const char *object_library_extension = ".a"; - - #elif defined (__svr4__) && defined (i386) ---- gcc/ada/Makefile.in.jj Wed Jun 5 16:06:56 2002 -+++ gcc/ada/Makefile.in Wed Jun 5 16:27:33 2002 -@@ -1214,6 +1214,33 @@ ifeq ($(strip $(filter-out %86 linux%,$( - endif - endif - -+ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),) -+ MLIB_TGT=5lml-tgt -+ SYMLIB= -+ THREADSLIB=-lpthread -+ GNATLIB_SHARED=gnatlib-shared-dual -+ GMEM_LIB=gmemlib -+ LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/')) -+endif -+ -+ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),) -+ MLIB_TGT=5lml-tgt -+ SYMLIB= -+ THREADSLIB=-lpthread -+ GNATLIB_SHARED=gnatlib-shared-dual -+ GMEM_LIB=gmemlib -+ LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/')) -+endif -+ -+ifeq ($(strip $(filter-out ia64 linux%,$(arch) $(osys))),) -+ MLIB_TGT=5lml-tgt -+ SYMLIB= -+ THREADSLIB=-lpthread -+ GNATLIB_SHARED=gnatlib-shared-dual -+ GMEM_LIB=gmemlib -+ LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/')) -+endif -+ - ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),) - ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),) - LIBGNAT_TARGET_PAIRS = \ ---- gcc/ada/gnat_rm.texi.jj Tue Apr 23 20:27:39 2002 -+++ gcc/ada/gnat_rm.texi Thu Jun 6 14:30:21 2002 -@@ -31,6 +31,10 @@ - @settitle GNAT Reference Manual - @setchapternewpage odd - @syncodeindex fn cp -+@dircategory Programming -+@direntry -+* gnat_rm: (gnat_rm). GNAT Reference Manual -+@end direntry - - @titlepage - ---- gcc/ada/gnat_ug.texi.jj Tue May 7 12:50:03 2002 -+++ gcc/ada/gnat_ug.texi Thu Jun 6 14:30:33 2002 -@@ -75,6 +75,11 @@ - @syncodeindex fn cp - @c %**end of header - -+@dircategory Programming -+@direntry -+* gnat_ug: (gnat_ug). GNAT User's Guide -+@end direntry -+ - @titlepage - - @ifset vms diff --git a/gcc-gcse-volatile.patch b/gcc-gcse-volatile.patch deleted file mode 100644 index e83aef3e..00000000 --- a/gcc-gcse-volatile.patch +++ /dev/null @@ -1,62 +0,0 @@ -Hello, - -in the appended testcase (obtained from linux kernel), the following -bug occurred: load motion decides to optimize non-volatile instance -of src_pte, and not to take volatile instance into account. When -checking for availability, we however consider these instances to be equal, -which causes us to believe that the second load of pte is redundant. - -The patch fixes it. - -Zdenek - -typedef struct { unsigned long pte_low; } pte_t; -static inline void clear_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( - "btrl %1,%0" - :"=m" ((*(volatile long *) addr)) - :"Ir" (nr)); -} -static inline void ptep_set_wrprotect(pte_t *ptep) { clear_bit(1, ptep); } -int copy_page_range(void) -{ - pte_t * src_pte; - pte_t pte = *src_pte; - - if (pte.pte_low) { - ptep_set_wrprotect(src_pte); - pte = *src_pte; - } - - foo (pte); - - return 0; -} - -Changelog: - * gcse.c (expr_equiv_p): Don't consider anything to be equal to - volatile mem. - -Index: gcse.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/gcse.c,v -retrieving revision 1.222.2.18 -diff -c -3 -p -r1.222.2.18 gcse.c -*** gcc/gcse.c 15 Aug 2003 13:21:01 -0000 1.222.2.18 ---- gcc/gcse.c 29 Aug 2003 22:33:15 -0000 -*************** expr_equiv_p (x, y) -*** 1844,1849 **** ---- 1844,1853 ---- - due to it being set with the different alias set. */ - if (MEM_ALIAS_SET (x) != MEM_ALIAS_SET (y)) - return 0; -+ -+ /* A volatile mem should not be considered equivalent to any other. */ -+ if (MEM_VOLATILE_P (x) || MEM_VOLATILE_P (y)) -+ return 0; - break; - - /* For commutative operations, check both orders. */ - - diff --git a/gcc-head-tail.patch b/gcc-head-tail.patch deleted file mode 100644 index 16f360c4..00000000 --- a/gcc-head-tail.patch +++ /dev/null @@ -1,86 +0,0 @@ -Index: gcc/configure.in -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/configure.in,v -retrieving revision 1.627.2.13 -diff -u -p -a -u -p -a -r1.627.2.13 gcc/configure.in ---- gcc/configure.in 25 Jun 2003 23:14:55 -0000 1.627.2.13 -+++ gcc/configure.in 22 Jul 2003 17:58:51 -0000 -@@ -1613,7 +1613,7 @@ elif test x$gcc_cv_as != x; then - # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. - # This is irritatingly difficult to feature test for. Look for - # the date string after the version number. -- ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` -+ ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n 1` - if echo "$ld_ver" | grep GNU > /dev/null; then - changequote(,)dnl - ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` -@@ -1688,7 +1688,7 @@ EOF - # ??? There exists an elf-specific test that will crash - # the assembler. Perhaps it's better to figure out whether - # arbitrary sections are supported and try the test. -- as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` -+ as_ver=`$gcc_cv_as --version 2>/dev/null | head -n 1` - if echo "$as_ver" | grep GNU > /dev/null; then - changequote(,)dnl - as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` -@@ -1716,7 +1716,7 @@ if test x$gcc_cv_gas_major_version != x - fi - elif test x$gcc_cv_as != x; then - # Check if this is GAS. -- as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` -+ as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n 1` - rm -f a.out 2> /dev/null - if echo "$as_ver" | grep GNU > /dev/null; then - # Versions up to and including 2.11.0 may mis-optimize -@@ -1769,7 +1769,7 @@ EOF - # and we got the correct data, then succeed. - if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ - && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ -- | tail -3 > conftest.got \ -+ | tail -n 3 > conftest.got \ - && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ - || cmp conftest.big conftest.got > /dev/null 2>&1; } - then -Index: gcc/configure -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/configure,v -retrieving revision 1.641.2.14 -diff -u -p -a -u -p -a -r1.641.2.14 gcc/configure ---- gcc/configure 25 Jun 2003 23:14:53 -0000 1.641.2.14 -+++ gcc/configure 22 Jul 2003 17:59:30 -0000 -@@ -7130,7 +7130,7 @@ elif test x$gcc_cv_as != x; then - # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. - # This is irritatingly difficult to feature test for. Look for - # the date string after the version number. -- ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` -+ ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n 1` - if echo "$ld_ver" | grep GNU > /dev/null; then - ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` - ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` -@@ -7206,7 +7206,7 @@ EOF - # ??? There exists an elf-specific test that will crash - # the assembler. Perhaps it's better to figure out whether - # arbitrary sections are supported and try the test. -- as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` -+ as_ver=`$gcc_cv_as --version 2>/dev/null | head -n 1` - if echo "$as_ver" | grep GNU > /dev/null; then - as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` - as_major=`echo $as_ver | sed 's/\..*//'` -@@ -7235,7 +7235,7 @@ if test x$gcc_cv_gas_major_version != x - fi - elif test x$gcc_cv_as != x; then - # Check if this is GAS. -- as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` -+ as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n 1` - rm -f a.out 2> /dev/null - if echo "$as_ver" | grep GNU > /dev/null; then - # Versions up to and including 2.11.0 may mis-optimize -@@ -7288,7 +7288,7 @@ EOF - # and we got the correct data, then succeed. - if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ - && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ -- | tail -3 > conftest.got \ -+ | tail -n 3 > conftest.got \ - && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ - || cmp conftest.big conftest.got > /dev/null 2>&1; } - then diff --git a/gcc-hppa.patch b/gcc-hppa.patch deleted file mode 100644 index edf3f7eb..00000000 --- a/gcc-hppa.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- gcc/config/pa/pa.c 2004/07/12 14:49:07 1.1 -+++ gcc/config/pa/pa.c 2004/07/12 14:53:02 -@@ -8367,4 +8367,14 @@ - fputs (",DATA\n", stream); - } - } -+ -+void -+optimization_options (level, size) -+ int level; -+ int size ATTRIBUTE_UNUSED; -+{ -+ if (level > 2) -+ flag_unroll_loops = 1; -+} -+ - #include "gt-pa.h" ---- gcc/config/pa/pa.h 2004/07/12 14:49:04 1.1 -+++ gcc/config/pa/pa.h 2004/07/12 14:56:58 -@@ -2039,3 +2039,7 @@ - /* We need a libcall to canonicalize function pointers on TARGET_ELF32. */ - #define CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL \ - "__canonicalize_funcptr_for_compare" -+ -+/* Define this to change the optimizations performed by default. */ -+#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \ -+ optimization_options ((LEVEL), (SIZE)) diff --git a/gcc-ia64intrin.patch b/gcc-ia64intrin.patch deleted file mode 100644 index 63ec8c18..00000000 --- a/gcc-ia64intrin.patch +++ /dev/null @@ -1,149 +0,0 @@ ---- gcc/config/ia64/ia64intrin.h 25 Apr 2003 14:26:35 +0200 1.4 -+++ gcc/config/ia64/ia64intrin.h 16 Apr 2004 15:03:13 +0200 -@@ -14,114 +14,114 @@ extern long __sync_val_compare_and_swap_ - #define __sync_val_compare_and_swap(PTR, OLD, NEW) \ - ((sizeof (*(PTR)) == sizeof(int)) \ - ? (__typeof__(*(PTR))) \ -- __sync_val_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW)) \ -+ __sync_val_compare_and_swap_si((int *)(void *)(PTR),(int)(OLD),(int)(NEW)) \ - : (__typeof__(*(PTR))) \ -- __sync_val_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW))) -+ __sync_val_compare_and_swap_di((long *)(void *)(PTR),(long)(OLD),(long)(NEW))) - - extern int __sync_bool_compare_and_swap_si (int *, int, int); - extern int __sync_bool_compare_and_swap_di (long *, long, long); - #define __sync_bool_compare_and_swap(PTR, OLD, NEW) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? __sync_bool_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW)) \ -- : __sync_bool_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW))) -+ ? __sync_bool_compare_and_swap_si((int *)(void *)(PTR),(int)(OLD),(int)(NEW)) \ -+ : __sync_bool_compare_and_swap_di((long *)(void *)(PTR),(long)(OLD),(long)(NEW))) - - extern void __sync_lock_release_si (int *); - extern void __sync_lock_release_di (long *); - #define __sync_lock_release(PTR) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? __sync_lock_release_si((int *)(PTR)) \ -- : __sync_lock_release_di((long *)(PTR))) -+ ? __sync_lock_release_si((int *)(void *)(PTR)) \ -+ : __sync_lock_release_di((long *)(void *)(PTR))) - - extern int __sync_lock_test_and_set_si (int *, int); - extern long __sync_lock_test_and_set_di (long *, long); - #define __sync_lock_test_and_set(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_lock_test_and_set_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_lock_test_and_set_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_lock_test_and_set_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_lock_test_and_set_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_fetch_and_add_si (int *, int); - extern long __sync_fetch_and_add_di (long *, long); - #define __sync_fetch_and_add(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_fetch_and_add_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_fetch_and_add_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_fetch_and_add_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_fetch_and_add_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_fetch_and_sub_si (int *, int); - extern long __sync_fetch_and_sub_di (long *, long); - #define __sync_fetch_and_sub(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_fetch_and_sub_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_fetch_and_sub_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_fetch_and_sub_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_fetch_and_sub_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_fetch_and_and_si (int *, int); - extern long __sync_fetch_and_and_di (long *, long); - #define __sync_fetch_and_and(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_fetch_and_and_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_fetch_and_and_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_fetch_and_and_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_fetch_and_and_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_fetch_and_or_si (int *, int); - extern long __sync_fetch_and_or_di (long *, long); - #define __sync_fetch_and_or(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_fetch_and_or_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_fetch_and_or_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_fetch_and_or_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_fetch_and_or_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_fetch_and_xor_si (int *, int); - extern long __sync_fetch_and_xor_di (long *, long); - #define __sync_fetch_and_xor(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_fetch_and_xor_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_fetch_and_xor_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_fetch_and_xor_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_fetch_and_xor_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_fetch_and_nand_si (int *, int); - extern long __sync_fetch_and_nand_di (long *, long); - #define __sync_fetch_and_nand(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_fetch_and_nand_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_fetch_and_nand_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_fetch_and_nand_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_fetch_and_nand_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_add_and_fetch_si (int *, int); - extern long __sync_add_and_fetch_di (long *, long); - #define __sync_add_and_fetch(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_add_and_fetch_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_add_and_fetch_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_add_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_add_and_fetch_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_sub_and_fetch_si (int *, int); - extern long __sync_sub_and_fetch_di (long *, long); - #define __sync_sub_and_fetch(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_sub_and_fetch_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_sub_and_fetch_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_sub_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_sub_and_fetch_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_and_and_fetch_si (int *, int); - extern long __sync_and_and_fetch_di (long *, long); - #define __sync_and_and_fetch(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_and_and_fetch_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_and_and_fetch_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_and_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_and_and_fetch_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_or_and_fetch_si (int *, int); - extern long __sync_or_and_fetch_di (long *, long); - #define __sync_or_and_fetch(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_or_and_fetch_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_or_and_fetch_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_or_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_or_and_fetch_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_xor_and_fetch_si (int *, int); - extern long __sync_xor_and_fetch_di (long *, long); - #define __sync_xor_and_fetch(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_xor_and_fetch_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_xor_and_fetch_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_xor_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_xor_and_fetch_di((long *)(void *)(PTR),(long)(VAL))) - - extern int __sync_nand_and_fetch_si (int *, int); - extern long __sync_nand_and_fetch_di (long *, long); - #define __sync_nand_and_fetch(PTR,VAL) \ - ((sizeof (*(PTR)) == sizeof(int)) \ -- ? (__typeof__(*(PTR))) __sync_nand_and_fetch_si((int *)(PTR),(int)(VAL)) \ -- : (__typeof__(*(PTR))) __sync_nand_and_fetch_di((long *)(PTR),(long)(VAL))) -+ ? (__typeof__(*(PTR))) __sync_nand_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \ -+ : (__typeof__(*(PTR))) __sync_nand_and_fetch_di((long *)(void *)(PTR),(long)(VAL))) - - #ifdef __cplusplus - } diff --git a/gcc-libgc.patch b/gcc-libgc.patch deleted file mode 100644 index 3c748cbd..00000000 --- a/gcc-libgc.patch +++ /dev/null @@ -1,547 +0,0 @@ -Index: boehm-gc/Makefile.am -=================================================================== -RCS file: /cvs/gcc/gcc/boehm-gc/Makefile.am,v -retrieving revision 1.36.2.2 -diff -u -p -a -r1.36.2.2 Makefile.am ---- boehm-gc/Makefile.am 24 Jan 2004 11:05:53 -0000 1.36.2.2 -+++ boehm-gc/Makefile.am 30 Mar 2004 11:17:02 -0000 -@@ -16,6 +16,7 @@ MULTISUBDIR = - MULTIDO = true - MULTICLEAN = true - -+toolexeclib_LTLIBRARIES = libgc.la - noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la - - if POWERPC_DARWIN -@@ -38,13 +39,18 @@ mips_sgi_mach_dep.s mips_ultrix_mach_dep - rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \ - sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s - -+libgc_la_SOURCES = $(GC_SOURCES) - libgcjgc_la_SOURCES = $(GC_SOURCES) - libgcjgc_convenience_la_SOURCES = $(GC_SOURCES) -+EXTRA_libgc_la_SOURCES = $(GC_SOURCES) - EXTRA_libgcjgc_la_SOURCES = $(EXTRA_GC_SOURCES) - EXTRA_libgcjgc_convenience_la_SOURCES = $(EXTRA_GC_SOURCES) - - # Include THREADLIBS here to ensure that the correct versions of - # linuxthread semaphore functions get linked: -+libgc_la_LIBADD = @addobjs@ $(THREADLIBS) -+libgc_la_DEPENDENCIES = @addobjs@ -+libgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir) - libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS) - libgcjgc_la_DEPENDENCIES = @addobjs@ - libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir) -@@ -137,12 +143,12 @@ CONFIG_STATUS_DEPENDENCIES = $(srcdir)/c - .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \ - maintainer-clean-multi - --all-am: all-multi --install-am: install-multi --mostlyclean-am: mostlyclean-multi --clean-am: clean-multi --distclean-am: distclean-multi --maintainer-clean-am: maintainer-clean-multi -+all-recursive: all-multi -+install-recursive: install-multi -+mostlyclean-recursive: mostlyclean-multi -+clean-recursive: clean-multi -+distclean-recursive: distclean-multi -+maintainer-clean-recursive: maintainer-clean-multi - - all-multi: - : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do -Index: boehm-gc/Makefile.in -=================================================================== -RCS file: /cvs/gcc/gcc/boehm-gc/Makefile.in,v -retrieving revision 1.40.2.3 -diff -u -p -a -r1.40.2.3 Makefile.in ---- boehm-gc/Makefile.in 24 Jan 2004 11:05:54 -0000 1.40.2.3 -+++ boehm-gc/Makefile.in 30 Mar 2004 11:17:02 -0000 -@@ -1,4 +1,4 @@ --# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am - - # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation -@@ -113,33 +113,29 @@ MULTISUBDIR = - MULTIDO = true - MULTICLEAN = true - -+toolexeclib_LTLIBRARIES = libgc.la - noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la --@POWERPC_DARWIN_TRUE@asm_libgc_sources = @POWERPC_DARWIN_TRUE@powerpc_darwin_mach_dep.s -+@POWERPC_DARWIN_TRUE@asm_libgc_sources = powerpc_darwin_mach_dep.s - @POWERPC_DARWIN_FALSE@asm_libgc_sources = - --GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ --dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c \ --malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \ --obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \ --solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \ --backgraph.c win32_threads.c \ --pthread_support.c pthread_stop_world.c darwin_stop_world.c \ --$(asm_libgc_sources) -+GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c backgraph.c win32_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c $(asm_libgc_sources) - - --EXTRA_GC_SOURCES = alpha_mach_dep.S \ --mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \ --rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \ --sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s -+EXTRA_GC_SOURCES = alpha_mach_dep.S mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s - - -+libgc_la_SOURCES = $(GC_SOURCES) - libgcjgc_la_SOURCES = $(GC_SOURCES) - libgcjgc_convenience_la_SOURCES = $(GC_SOURCES) -+EXTRA_libgc_la_SOURCES = $(GC_SOURCES) - EXTRA_libgcjgc_la_SOURCES = $(EXTRA_GC_SOURCES) - EXTRA_libgcjgc_convenience_la_SOURCES = $(EXTRA_GC_SOURCES) - - # Include THREADLIBS here to ensure that the correct versions of - # linuxthread semaphore functions get linked: -+libgc_la_LIBADD = @addobjs@ $(THREADLIBS) -+libgc_la_DEPENDENCIES = @addobjs@ -+libgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir) - libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS) - libgcjgc_la_DEPENDENCIES = @addobjs@ - libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir) -@@ -162,52 +158,14 @@ TESTS = gctest - - all_objs = @addobjs@ $(libgcjgc_la_OBJECTS) - --LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \ -- $(AM_CPPFLAGS) $(CPPFLAGS) \ -- $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) -+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) - - LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@ - - # Work around what appears to be a GNU make bug handling MAKEFLAGS - # values defined in terms of make variables, as is the case for CC and - # friends when we are called from the top level Makefile. --AM_MAKEFLAGS = \ -- "AR_FLAGS=$(AR_FLAGS)" \ -- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ -- "CFLAGS=$(CFLAGS)" \ -- "CXXFLAGS=$(CXXFLAGS)" \ -- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ -- "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ -- "INSTALL=$(INSTALL)" \ -- "INSTALL_DATA=$(INSTALL_DATA)" \ -- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ -- "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ -- "LDFLAGS=$(LDFLAGS)" \ -- "LIBCFLAGS=$(LIBCFLAGS)" \ -- "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ -- "MAKE=$(MAKE)" \ -- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ -- "PICFLAG=$(PICFLAG)" \ -- "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ -- "SHELL=$(SHELL)" \ -- "EXPECT=$(EXPECT)" \ -- "RUNTEST=$(RUNTEST)" \ -- "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ -- "exec_prefix=$(exec_prefix)" \ -- "infodir=$(infodir)" \ -- "libdir=$(libdir)" \ -- "prefix=$(prefix)" \ -- "tooldir=$(tooldir)" \ -- "AR=$(AR)" \ -- "AS=$(AS)" \ -- "CC=$(CC)" \ -- "CXX=$(CXX)" \ -- "LD=$(LD)" \ -- "LIBCFLAGS=$(LIBCFLAGS)" \ -- "NM=$(NM)" \ -- "PICFLAG=$(PICFLAG)" \ -- "RANLIB=$(RANLIB)" \ -- "DESTDIR=$(DESTDIR)" -+AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "EXPECT=$(EXPECT)" "RUNTEST=$(RUNTEST)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "NM=$(NM)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "DESTDIR=$(DESTDIR)" - - - CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host -@@ -215,13 +173,24 @@ CONFIG_STATUS_DEPENDENCIES = $(srcdir)/c - MAKEOVERRIDES = - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - CONFIG_CLEAN_FILES = --LTLIBRARIES = $(noinst_LTLIBRARIES) -+LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) - - - DEFS = @DEFS@ -I. -I$(srcdir) - CPPFLAGS = @CPPFLAGS@ - LDFLAGS = @LDFLAGS@ - LIBS = @LIBS@ -+@POWERPC_DARWIN_TRUE@libgcjgc_la_OBJECTS = allchblk.lo alloc.lo \ -+@POWERPC_DARWIN_TRUE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \ -+@POWERPC_DARWIN_TRUE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \ -+@POWERPC_DARWIN_TRUE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \ -+@POWERPC_DARWIN_TRUE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \ -+@POWERPC_DARWIN_TRUE@os_dep.lo pcr_interface.lo ptr_chck.lo \ -+@POWERPC_DARWIN_TRUE@real_malloc.lo reclaim.lo solaris_pthreads.lo \ -+@POWERPC_DARWIN_TRUE@solaris_threads.lo specific.lo stubborn.lo \ -+@POWERPC_DARWIN_TRUE@typd_mlc.lo backgraph.lo win32_threads.lo \ -+@POWERPC_DARWIN_TRUE@pthread_support.lo pthread_stop_world.lo \ -+@POWERPC_DARWIN_TRUE@darwin_stop_world.lo powerpc_darwin_mach_dep.lo - @POWERPC_DARWIN_FALSE@libgcjgc_la_OBJECTS = allchblk.lo alloc.lo \ - @POWERPC_DARWIN_FALSE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \ - @POWERPC_DARWIN_FALSE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \ -@@ -233,18 +202,18 @@ LIBS = @LIBS@ - @POWERPC_DARWIN_FALSE@typd_mlc.lo backgraph.lo win32_threads.lo \ - @POWERPC_DARWIN_FALSE@pthread_support.lo pthread_stop_world.lo \ - @POWERPC_DARWIN_FALSE@darwin_stop_world.lo --@POWERPC_DARWIN_TRUE@libgcjgc_la_OBJECTS = allchblk.lo alloc.lo \ --@POWERPC_DARWIN_TRUE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \ --@POWERPC_DARWIN_TRUE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \ --@POWERPC_DARWIN_TRUE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \ --@POWERPC_DARWIN_TRUE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \ --@POWERPC_DARWIN_TRUE@os_dep.lo pcr_interface.lo ptr_chck.lo \ -+libgcjgc_convenience_la_LDFLAGS = -+@POWERPC_DARWIN_TRUE@libgcjgc_convenience_la_OBJECTS = allchblk.lo \ -+@POWERPC_DARWIN_TRUE@alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \ -+@POWERPC_DARWIN_TRUE@dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \ -+@POWERPC_DARWIN_TRUE@headers.lo aix_irix_threads.lo malloc.lo \ -+@POWERPC_DARWIN_TRUE@mallocx.lo mark.lo mark_rts.lo misc.lo new_hblk.lo \ -+@POWERPC_DARWIN_TRUE@obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo \ - @POWERPC_DARWIN_TRUE@real_malloc.lo reclaim.lo solaris_pthreads.lo \ - @POWERPC_DARWIN_TRUE@solaris_threads.lo specific.lo stubborn.lo \ - @POWERPC_DARWIN_TRUE@typd_mlc.lo backgraph.lo win32_threads.lo \ - @POWERPC_DARWIN_TRUE@pthread_support.lo pthread_stop_world.lo \ - @POWERPC_DARWIN_TRUE@darwin_stop_world.lo powerpc_darwin_mach_dep.lo --libgcjgc_convenience_la_LDFLAGS = - @POWERPC_DARWIN_FALSE@libgcjgc_convenience_la_OBJECTS = allchblk.lo \ - @POWERPC_DARWIN_FALSE@alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \ - @POWERPC_DARWIN_FALSE@dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \ -@@ -256,32 +225,43 @@ libgcjgc_convenience_la_LDFLAGS = - @POWERPC_DARWIN_FALSE@specific.lo stubborn.lo typd_mlc.lo backgraph.lo \ - @POWERPC_DARWIN_FALSE@win32_threads.lo pthread_support.lo \ - @POWERPC_DARWIN_FALSE@pthread_stop_world.lo darwin_stop_world.lo --@POWERPC_DARWIN_TRUE@libgcjgc_convenience_la_OBJECTS = allchblk.lo \ --@POWERPC_DARWIN_TRUE@alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \ --@POWERPC_DARWIN_TRUE@dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \ --@POWERPC_DARWIN_TRUE@headers.lo aix_irix_threads.lo malloc.lo \ --@POWERPC_DARWIN_TRUE@mallocx.lo mark.lo mark_rts.lo misc.lo new_hblk.lo \ --@POWERPC_DARWIN_TRUE@obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo \ -+@POWERPC_DARWIN_TRUE@libgc_la_OBJECTS = allchblk.lo alloc.lo \ -+@POWERPC_DARWIN_TRUE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \ -+@POWERPC_DARWIN_TRUE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \ -+@POWERPC_DARWIN_TRUE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \ -+@POWERPC_DARWIN_TRUE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \ -+@POWERPC_DARWIN_TRUE@os_dep.lo pcr_interface.lo ptr_chck.lo \ - @POWERPC_DARWIN_TRUE@real_malloc.lo reclaim.lo solaris_pthreads.lo \ - @POWERPC_DARWIN_TRUE@solaris_threads.lo specific.lo stubborn.lo \ - @POWERPC_DARWIN_TRUE@typd_mlc.lo backgraph.lo win32_threads.lo \ - @POWERPC_DARWIN_TRUE@pthread_support.lo pthread_stop_world.lo \ - @POWERPC_DARWIN_TRUE@darwin_stop_world.lo powerpc_darwin_mach_dep.lo -+@POWERPC_DARWIN_FALSE@libgc_la_OBJECTS = allchblk.lo alloc.lo \ -+@POWERPC_DARWIN_FALSE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \ -+@POWERPC_DARWIN_FALSE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \ -+@POWERPC_DARWIN_FALSE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \ -+@POWERPC_DARWIN_FALSE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \ -+@POWERPC_DARWIN_FALSE@os_dep.lo pcr_interface.lo ptr_chck.lo \ -+@POWERPC_DARWIN_FALSE@real_malloc.lo reclaim.lo solaris_pthreads.lo \ -+@POWERPC_DARWIN_FALSE@solaris_threads.lo specific.lo stubborn.lo \ -+@POWERPC_DARWIN_FALSE@typd_mlc.lo backgraph.lo win32_threads.lo \ -+@POWERPC_DARWIN_FALSE@pthread_support.lo pthread_stop_world.lo \ -+@POWERPC_DARWIN_FALSE@darwin_stop_world.lo - check_PROGRAMS = gctest$(EXEEXT) - gctest_DEPENDENCIES = ./libgcjgc.la - COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - DIST_COMMON = ChangeLog Makefile.am Makefile.in acinclude.m4 aclocal.m4 \ - config.guess config.sub configure configure.in install-sh ltconfig \ --ltmain.sh mkinstalldirs -+ltmain.sh missing mkinstalldirs - - - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - --TAR = gtar -+TAR = tar - GZIP_ENV = --best --SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) $(libgcjgc_convenience_la_SOURCES) $(EXTRA_libgcjgc_convenience_la_SOURCES) --OBJECTS = $(libgcjgc_la_OBJECTS) $(libgcjgc_convenience_la_OBJECTS) -+SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) $(libgcjgc_convenience_la_SOURCES) $(EXTRA_libgcjgc_convenience_la_SOURCES) $(libgc_la_SOURCES) $(EXTRA_libgc_la_SOURCES) -+OBJECTS = $(libgcjgc_la_OBJECTS) $(libgcjgc_convenience_la_OBJECTS) $(libgc_la_OBJECTS) - - all: all-redirect - .SUFFIXES: -@@ -310,6 +290,31 @@ distclean-noinstLTLIBRARIES: - - maintainer-clean-noinstLTLIBRARIES: - -+mostlyclean-toolexeclibLTLIBRARIES: -+ -+clean-toolexeclibLTLIBRARIES: -+ -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES) -+ -+distclean-toolexeclibLTLIBRARIES: -+ -+maintainer-clean-toolexeclibLTLIBRARIES: -+ -+install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) -+ @$(NORMAL_INSTALL) -+ $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir) -+ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \ -+ if test -f $$p; then \ -+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \ -+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \ -+ else :; fi; \ -+ done -+ -+uninstall-toolexeclibLTLIBRARIES: -+ @$(NORMAL_UNINSTALL) -+ list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \ -+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \ -+ done -+ - .c.o: - $(COMPILE) -c $< - -@@ -357,6 +362,9 @@ libgcjgc.la: $(libgcjgc_la_OBJECTS) $(li - libgcjgc_convenience.la: $(libgcjgc_convenience_la_OBJECTS) $(libgcjgc_convenience_la_DEPENDENCIES) - $(LINK) $(libgcjgc_convenience_la_LDFLAGS) $(libgcjgc_convenience_la_OBJECTS) $(libgcjgc_convenience_la_LIBADD) $(LIBS) - -+libgc.la: $(libgc_la_OBJECTS) $(libgc_la_DEPENDENCIES) -+ $(LINK) -rpath $(toolexeclibdir) $(libgc_la_LDFLAGS) $(libgc_la_OBJECTS) $(libgc_la_LIBADD) $(LIBS) -+ - mostlyclean-checkPROGRAMS: - - clean-checkPROGRAMS: -@@ -553,7 +561,7 @@ installcheck-am: - installcheck: installcheck-recursive - install-info-am: - install-info: install-info-recursive --install-exec-am: -+install-exec-am: install-toolexeclibLTLIBRARIES - install-exec: install-exec-recursive - - install-data-am: -@@ -562,7 +570,7 @@ install-data: install-data-recursive - install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - install: install-recursive --uninstall-am: -+uninstall-am: uninstall-toolexeclibLTLIBRARIES - uninstall: uninstall-recursive - all-am: Makefile $(LTLIBRARIES) - all-redirect: all-recursive -@@ -570,6 +578,7 @@ install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install - installdirs: installdirs-recursive - installdirs-am: -+ $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir) - - - mostlyclean-generic: -@@ -581,19 +590,21 @@ distclean-generic: - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - - maintainer-clean-generic: --mostlyclean-am: mostlyclean-noinstLTLIBRARIES mostlyclean-compile \ -+mostlyclean-am: mostlyclean-noinstLTLIBRARIES \ -+ mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \ - mostlyclean-libtool mostlyclean-checkPROGRAMS \ - mostlyclean-tags mostlyclean-generic - - mostlyclean: mostlyclean-recursive - --clean-am: clean-noinstLTLIBRARIES clean-compile clean-libtool \ -- clean-checkPROGRAMS clean-tags clean-generic \ -- mostlyclean-am -+clean-am: clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES \ -+ clean-compile clean-libtool clean-checkPROGRAMS \ -+ clean-tags clean-generic mostlyclean-am - - clean: clean-recursive - --distclean-am: distclean-noinstLTLIBRARIES distclean-compile \ -+distclean-am: distclean-noinstLTLIBRARIES \ -+ distclean-toolexeclibLTLIBRARIES distclean-compile \ - distclean-libtool distclean-checkPROGRAMS \ - distclean-tags distclean-generic clean-am - -rm -f libtool -@@ -602,6 +613,7 @@ distclean: distclean-recursive - -rm -f config.status - - maintainer-clean-am: maintainer-clean-noinstLTLIBRARIES \ -+ maintainer-clean-toolexeclibLTLIBRARIES \ - maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-checkPROGRAMS maintainer-clean-tags \ - maintainer-clean-generic distclean-am -@@ -613,6 +625,9 @@ maintainer-clean: maintainer-clean-recur - - .PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \ - clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \ -+mostlyclean-toolexeclibLTLIBRARIES distclean-toolexeclibLTLIBRARIES \ -+clean-toolexeclibLTLIBRARIES maintainer-clean-toolexeclibLTLIBRARIES \ -+uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \ - mostlyclean-compile distclean-compile clean-compile \ - maintainer-clean-compile mostlyclean-libtool distclean-libtool \ - clean-libtool maintainer-clean-libtool mostlyclean-checkPROGRAMS \ -@@ -647,12 +662,12 @@ include/gc_mark.h @addincludes@ - .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \ - maintainer-clean-multi - --all-am: all-multi --install-am: install-multi --mostlyclean-am: mostlyclean-multi --clean-am: clean-multi --distclean-am: distclean-multi --maintainer-clean-am: maintainer-clean-multi -+all-recursive: all-multi -+install-recursive: install-multi -+mostlyclean-recursive: mostlyclean-multi -+clean-recursive: clean-multi -+distclean-recursive: distclean-multi -+maintainer-clean-recursive: maintainer-clean-multi - - all-multi: - : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do -Index: boehm-gc/include/Makefile.am -=================================================================== -RCS file: /cvs/gcc/gcc/boehm-gc/include/Makefile.am,v -retrieving revision 1.1.40.1 -diff -u -p -a -r1.1.40.1 Makefile.am ---- boehm-gc/include/Makefile.am 12 Jan 2003 14:24:07 -0000 1.1.40.1 -+++ boehm-gc/include/Makefile.am 30 Mar 2004 11:17:02 -0000 -@@ -1,6 +1,6 @@ - AUTOMAKE_OPTIONS = foreign - --noinst_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \ -+include_HEADERS = gc.h gc_backptr.h gc_config_macros.h gc_local_alloc.h \ - gc_pthread_redirects.h gc_cpp.h - - -Index: boehm-gc/include/Makefile.in -=================================================================== -RCS file: /cvs/gcc/gcc/boehm-gc/include/Makefile.in,v -retrieving revision 1.3.30.2 -diff -u -p -a -r1.3.30.2 Makefile.in ---- boehm-gc/include/Makefile.in 24 Jan 2004 11:05:56 -0000 1.3.30.2 -+++ boehm-gc/include/Makefile.in 30 Mar 2004 11:17:02 -0000 -@@ -1,4 +1,4 @@ --# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am - - # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation -@@ -103,29 +103,43 @@ toolexeclibdir = @toolexeclibdir@ - - AUTOMAKE_OPTIONS = foreign - --noinst_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \ -- gc_pthread_redirects.h gc_cpp.h -+include_HEADERS = gc.h gc_backptr.h gc_config_macros.h gc_local_alloc.h gc_pthread_redirects.h gc_cpp.h - - CONFIG_CLEAN_FILES = --HEADERS = $(noinst_HEADERS) -+HEADERS = $(include_HEADERS) - - DIST_COMMON = Makefile.am Makefile.in - - - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - --TAR = gtar -+TAR = tar - GZIP_ENV = --best - all: all-redirect - .SUFFIXES: - $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) -- cd $(top_srcdir) && $(AUTOMAKE) --cygnus include/Makefile -+ cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile - --Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -+install-includeHEADERS: $(include_HEADERS) -+ @$(NORMAL_INSTALL) -+ $(mkinstalldirs) $(DESTDIR)$(includedir) -+ @list='$(include_HEADERS)'; for p in $$list; do \ -+ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ -+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \ -+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \ -+ done -+ -+uninstall-includeHEADERS: -+ @$(NORMAL_UNINSTALL) -+ list='$(include_HEADERS)'; for p in $$list; do \ -+ rm -f $(DESTDIR)$(includedir)/$$p; \ -+ done -+ - tags: TAGS - - ID: $(HEADERS) $(SOURCES) $(LISP) -@@ -160,8 +174,13 @@ distdir = $(top_builddir)/$(PACKAGE)-$(V - subdir = include - - distdir: $(DISTFILES) -+ here=`cd $(top_builddir) && pwd`; \ -+ top_distdir=`cd $(top_distdir) && pwd`; \ -+ distdir=`cd $(distdir) && pwd`; \ -+ cd $(top_srcdir) \ -+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign include/Makefile - @for file in $(DISTFILES); do \ -- if test -f $$file; then d=.; else d=$(srcdir); fi; \ -+ d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ -@@ -174,28 +193,27 @@ info-am: - info: info-am - dvi-am: - dvi: dvi-am --check-am: -+check-am: all-am - check: check-am - installcheck-am: - installcheck: installcheck-am --install-info-am: --install-info: install-info-am - install-exec-am: - install-exec: install-exec-am - --install-data-am: -+install-data-am: install-includeHEADERS - install-data: install-data-am - - install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - install: install-am --uninstall-am: -+uninstall-am: uninstall-includeHEADERS - uninstall: uninstall-am - all-am: Makefile $(HEADERS) - all-redirect: all-am - install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install - installdirs: -+ $(mkinstalldirs) $(DESTDIR)$(includedir) - - - mostlyclean-generic: -@@ -227,12 +245,12 @@ maintainer-clean-am: maintainer-clean-t - - maintainer-clean: maintainer-clean-am - --.PHONY: tags mostlyclean-tags distclean-tags clean-tags \ --maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \ --installcheck-am installcheck install-info-am install-info \ --install-exec-am install-exec install-data-am install-data install-am \ --install uninstall-am uninstall all-redirect all-am all installdirs \ --mostlyclean-generic distclean-generic clean-generic \ -+.PHONY: uninstall-includeHEADERS install-includeHEADERS tags \ -+mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ -+distdir info-am info dvi-am dvi check check-am installcheck-am \ -+installcheck install-exec-am install-exec install-data-am install-data \ -+install-am install uninstall-am uninstall all-redirect all-am all \ -+installdirs mostlyclean-generic distclean-generic clean-generic \ - maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - diff --git a/gcc-o_creat.dif b/gcc-o_creat.dif deleted file mode 100644 index a1d3d657..00000000 --- a/gcc-o_creat.dif +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc/collect2.c -+++ gcc/collect2.c 2007/12/10 12:45:07 -@@ -1572,7 +1572,7 @@ - if (redir) - { - /* Open response file. */ -- redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT); -+ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0644); - - /* Duplicate the stdout and stderr file handles - so they can be restored later. */ diff --git a/gcc-ppc-nof.patch b/gcc-ppc-nof.patch deleted file mode 100644 index 0a2e414c..00000000 --- a/gcc-ppc-nof.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -ru gcc-3.3.2/gcc/config/rs6000/t-linux64bi /gcc-3.3.2/gcc/config/rs6000/t-linux64bi ---- gcc-3.3.2/gcc/config/rs6000/t-linux64bi 2004-02-11 20:41:25.000000000 +0000 -+++ gcc-3.3.2/gcc/config/rs6000/t-linux64bi 2004-02-11 17:33:38.000000000 +0000 -@@ -9,13 +9,12 @@ - - SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc64.ver - --MULTILIB_OPTIONS = m64/m32 msoft-float --MULTILIB_DIRNAMES = 64 32 nof -+MULTILIB_OPTIONS = m64/m32 -+MULTILIB_DIRNAMES = 64 32 - MULTILIB_EXTRA_OPTS = fPIC mstrict-align --MULTILIB_EXCEPTIONS = m64/msoft-float --MULTILIB_EXCLUSIONS = m64/!m32/msoft-float --MULTILIB_OSDIRNAMES = ../lib64 ../lib nof --MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT) -+MULTILIB_EXCEPTIONS = -+MULTILIB_EXCLUSIONS = -+MULTILIB_OSDIRNAMES = ../lib64 ../lib - - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. -diff -ru gcc-3.3.2/gcc/config/rs6000/t-linuxbi /gcc-3.3.2/gcc/config/rs6000/t-linuxbi ---- gcc-3.3.2/gcc/config/rs6000/t-linuxbi 2004-02-11 20:41:25.000000000 +0000 -+++ gcc-3.3.2/gcc/config/rs6000/t-linuxbi 2004-02-11 11:15:51.000000000 +0000 -@@ -9,13 +9,12 @@ - - SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc64.ver - --MULTILIB_OPTIONS = m64/m32 msoft-float --MULTILIB_DIRNAMES = 64 32 nof -+MULTILIB_OPTIONS = m64/m32 -+MULTILIB_DIRNAMES = 64 32 - MULTILIB_EXTRA_OPTS = fPIC mstrict-align --MULTILIB_EXCEPTIONS = m64/msoft-float --MULTILIB_EXCLUSIONS = m64/!m32/msoft-float --MULTILIB_OSDIRNAMES = ../lib64 ../lib nof --MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT) -+MULTILIB_EXCEPTIONS = -+MULTILIB_EXCLUSIONS = -+MULTILIB_OSDIRNAMES = ../lib64 ../lib - - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. diff --git a/gcc-ppc-nostartfileprefix.patch b/gcc-ppc-nostartfileprefix.patch deleted file mode 100644 index 67569701..00000000 --- a/gcc-ppc-nostartfileprefix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ur gcc-3.3.2/gcc/config/rs6000/linux64.h gcc-3.3.2/gcc/config/rs6000/linux64.h ---- gcc-3.3.2/gcc/config/rs6000/linux64.h 2003-11-28 09:14:56.000000000 +0000 -+++ gcc-3.3.2/gcc/config/rs6000/linux64.h 2003-11-28 08:56:36.000000000 +0000 -@@ -398,12 +398,12 @@ - #if !defined (CROSS_COMPILE) || defined (NATIVE_CROSS) - #if DEFAULT_ARCH64_P - #define STARTFILE_PREFIX_SPEC "\ -- %{!m32: " STANDARD_STARTFILE_PREFIX "../lib64/ /lib64/ /usr/lib64/} \ -- %{m32: " STANDARD_STARTFILE_PREFIX " /lib/ /usr/lib/}" -+ %{!m32: /lib64/ /usr/lib64/} \ -+ %{m32: /lib/ /usr/lib/}" - #else - #define STARTFILE_PREFIX_SPEC "\ -- %{!m64: " STANDARD_STARTFILE_PREFIX " /lib/ /usr/lib/} \ -- %{m64: " STANDARD_STARTFILE_PREFIX "../lib64/ /lib64/ /usr/lib64/}" -+ %{!m64: /lib/ /usr/lib/} \ -+ %{m64: /lib64/ /usr/lib64/}" - #endif - #endif - diff --git a/gcc-stl-multiple-defs.diff b/gcc-stl-multiple-defs.diff deleted file mode 100644 index 0818fce9..00000000 --- a/gcc-stl-multiple-defs.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- libstdc++-v3/include/bits/stl_tree.h.orig 2005-01-20 11:11:09.000000000 +0000 -+++ libstdc++-v3/include/bits/stl_tree.h 2005-01-20 11:05:06.000000000 +0000 -@@ -302,7 +302,7 @@ namespace std - __x->_M_parent = __y; - } - -- void -+ inline void - _Rb_tree_rebalance(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root) - { - __x->_M_color = _M_red; -@@ -357,7 +357,7 @@ namespace std - __root->_M_color = _M_black; - } - -- _Rb_tree_node_base* -+ inline _Rb_tree_node_base* - _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* __z, - _Rb_tree_node_base*& __root, - _Rb_tree_node_base*& __leftmost, diff --git a/gcc-suse46595.diff b/gcc-suse46595.diff deleted file mode 100644 index 53a50084..00000000 --- a/gcc-suse46595.diff +++ /dev/null @@ -1,45 +0,0 @@ -Index: semantics.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v -retrieving revision 1.282.2.13 -diff -u -p -r1.282.2.13 semantics.c ---- gcc/cp/semantics.c 5 May 2004 13:05:50 -0000 1.282.2.13 -+++ gcc/cp/semantics.c 1 Oct 2004 13:21:06 -0000 -@@ -2455,6 +2455,18 @@ expand_or_defer_fn (fn) - if (flag_unit_at_a_time && cgraph_global_info_ready) - abort (); - -+ /* If this function is marked with the constructor attribute, add it -+ to the list of functions to be called along with constructors -+ from static duration objects. */ -+ if (DECL_STATIC_CONSTRUCTOR (fn)) -+ static_ctors = tree_cons (NULL_TREE, fn, static_ctors); -+ -+ /* If this function is marked with the destructor attribute, add it -+ to the list of functions to be called along with destructors from -+ static duration objects. */ -+ if (DECL_STATIC_DESTRUCTOR (fn)) -+ static_dtors = tree_cons (NULL_TREE, fn, static_dtors); -+ - if (flag_unit_at_a_time && !cgraph_global_info_ready) - { - if (at_eof) -@@ -2673,18 +2685,6 @@ genrtl_finish_function (fn) - if (ctype && TREE_ASM_WRITTEN (fn)) - note_debug_info_needed (ctype); - #endif -- -- /* If this function is marked with the constructor attribute, add it -- to the list of functions to be called along with constructors -- from static duration objects. */ -- if (DECL_STATIC_CONSTRUCTOR (fn)) -- static_ctors = tree_cons (NULL_TREE, fn, static_ctors); -- -- /* If this function is marked with the destructor attribute, add it -- to the list of functions to be called along with destructors from -- static duration objects. */ -- if (DECL_STATIC_DESTRUCTOR (fn)) -- static_dtors = tree_cons (NULL_TREE, fn, static_dtors); - - --function_depth; - diff --git a/gcc-swig-alias.patch b/gcc-swig-alias.patch deleted file mode 100644 index 6aebb0d8..00000000 --- a/gcc-swig-alias.patch +++ /dev/null @@ -1,31 +0,0 @@ - * alias.c (init_alias_analysis): Don't check for - prologue_epilogue_contains. - -Index: alias.c -=================================================================== -RCS file: /cvs/gcc/gcc/gcc/alias.c,v -retrieving revision 1.180.2.5 -diff -c -3 -p -r1.180.2.5 alias.c -*** gcc/alias.c 14 Aug 2003 13:20:09 -0000 1.180.2.5 ---- gcc/alias.c 21 Aug 2003 23:17:21 -0000 -*************** init_alias_analysis () -*** 2810,2815 **** ---- 2810,2816 ---- - { - rtx note, set; - -+ #if 0 - #if defined (HAVE_prologue) || defined (HAVE_epilogue) - /* The prologue/epilogue insns are not threaded onto the - insn chain until after reload has completed. Thus, -*************** init_alias_analysis () -*** 2818,2823 **** ---- 2819,2825 ---- - if (reload_completed - && prologue_epilogue_contains (insn)) - continue; -+ #endif - #endif - - /* If this insn has a noalias note, process it, Otherwise, - diff --git a/gcc-unwind-ia64.patch b/gcc-unwind-ia64.patch deleted file mode 100644 index 47919ee4..00000000 --- a/gcc-unwind-ia64.patch +++ /dev/null @@ -1,41 +0,0 @@ -From nobody Fri Jun 18 12:05:46 2004 -From: Jakub Jelinek -Subject: [PATCH] Fix ia64 _Unwind_Backtrace -To: Jim Wilson -Cc: gcc-patches@gcc.gnu.org -Date: Tue, 8 Jun 2004 08:19:45 +0200 - -Hi! - -_Unwind_Backtrace on ia64 happily goes through a frame with IP 0 and might -crash later. - .save rp, r0 -in _start is used to terminate the chain, so we should stop right there. -Without this patch, GCC assumes there is a leaf function without unwind info -at address 0. -I looked at libunwind and it special cases RP == 0 as well. -Ok for 3.3/3.4/HEAD? - -2004-06-08 Jakub Jelinek - - * config/ia64/unwind-ia64.c (uw_frame_state_for): Don't assume a - leaf function without unwind info at RP 0. - ---- gcc/config/ia64/unwind-ia64.c.jj 2004-04-01 18:43:56.000000000 +0200 -+++ gcc/config/ia64/unwind-ia64.c 2004-06-08 10:26:50.673203249 +0200 -@@ -1783,8 +1783,10 @@ uw_frame_state_for (struct _Unwind_Conte - an unwind table entry. - - This can only happen in the frame after unwinding through a signal -- handler. Avoid infinite looping by requiring that B0 != RP. */ -- if (context->br_loc[0] && *context->br_loc[0] != context->rp) -+ handler. Avoid infinite looping by requiring that B0 != RP. -+ RP == 0 terminates the chain. */ -+ if (context->br_loc[0] && *context->br_loc[0] != context->rp -+ && context->rp != 0) - { - fs->curr.reg[UNW_REG_RP].where = UNW_WHERE_BR; - fs->curr.reg[UNW_REG_RP].when = -1; - - Jakub - diff --git a/linkerscripts.patch b/linkerscripts.patch deleted file mode 100644 index 5dcb4788..00000000 --- a/linkerscripts.patch +++ /dev/null @@ -1,276 +0,0 @@ ---- i386.ld -+++ i386.ld -@@ -1,116 +1,164 @@ --/* ld script to make i386 Linux kernel -- * Written by Martin Mares ; -- */ --OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") -+/* Default linker script, for normal executables */ -+OUTPUT_FORMAT("elf32-i386", "elf32-i386", -+ "elf32-i386") - OUTPUT_ARCH(i386) --SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/alpha-unknown-linux-gnu/lib); - ENTRY(_start) -+SEARCH_DIR("/usr/i586-suse-linux/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); - SECTIONS - { - /* Read-only sections, merged into text segment: */ -- . = 0x60000000 + SIZEOF_HEADERS; -- .interp : { *(.interp) } -- .hash : { *(.hash) } -- .dynsym : { *(.dynsym) } -- .dynstr : { *(.dynstr) } -- .gnu.version : { *(.gnu.version) } -- .gnu.version_d : { *(.gnu.version_d) } -- .gnu.version_r : { *(.gnu.version_r) } -- .rel.text : -- { *(.rel.text) *(.rel.gnu.linkonce.t*) } -- .rela.text : -- { *(.rela.text) *(.rela.gnu.linkonce.t*) } -- .rel.data : -- { *(.rel.data) *(.rel.gnu.linkonce.d*) } -- .rela.data : -- { *(.rela.data) *(.rela.gnu.linkonce.d*) } -- .rel.rodata : -- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } -- .rela.rodata : -- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } -- .rel.got : { *(.rel.got) } -- .rela.got : { *(.rela.got) } -- .rel.ctors : { *(.rel.ctors) } -- .rela.ctors : { *(.rela.ctors) } -- .rel.dtors : { *(.rel.dtors) } -- .rela.dtors : { *(.rela.dtors) } -- .rel.init : { *(.rel.init) } -- .rela.init : { *(.rela.init) } -- .rel.fini : { *(.rel.fini) } -- .rela.fini : { *(.rela.fini) } -- .rel.bss : { *(.rel.bss) } -- .rela.bss : { *(.rela.bss) } -- .rel.plt : { *(.rel.plt) } -- .rela.plt : { *(.rela.plt) } -- .init : { *(.init) } =0x47ff041f -- .text : -+ PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS; -+ .interp : { *(.interp) } -+ .hash : { *(.hash) } -+ .dynsym : { *(.dynsym) } -+ .dynstr : { *(.dynstr) } -+ .gnu.version : { *(.gnu.version) } -+ .gnu.version_d : { *(.gnu.version_d) } -+ .gnu.version_r : { *(.gnu.version_r) } -+ .rel.init : { *(.rel.init) } -+ .rela.init : { *(.rela.init) } -+ .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } -+ .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } -+ .rel.fini : { *(.rel.fini) } -+ .rela.fini : { *(.rela.fini) } -+ .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } -+ .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } -+ .rel.data.rel.ro : { *(.rel.data.rel.ro*) } -+ .rela.data.rel.ro : { *(.rel.data.rel.ro*) } -+ .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } -+ .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } -+ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } -+ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } -+ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } -+ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } -+ .rel.ctors : { *(.rel.ctors) } -+ .rela.ctors : { *(.rela.ctors) } -+ .rel.dtors : { *(.rel.dtors) } -+ .rela.dtors : { *(.rela.dtors) } -+ .rel.got : { *(.rel.got) } -+ .rela.got : { *(.rela.got) } -+ .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } -+ .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } -+ .rel.plt : { *(.rel.plt) } -+ .rela.plt : { *(.rela.plt) } -+ .init : - { -- *(.text) -+ KEEP (*(.init)) -+ } =0x90909090 -+ .plt : { *(.plt) } -+ .text : -+ { -+ *(.text .stub .text.* .gnu.linkonce.t.*) -+ KEEP (*(.text.*personality*)) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) -- *(.gnu.linkonce.t*) -- } =0x47ff041f -- _etext = .; -+ } =0x90909090 -+ .fini : -+ { -+ KEEP (*(.fini)) -+ } =0x90909090 -+ PROVIDE (__etext = .); -+ PROVIDE (_etext = .); - PROVIDE (etext = .); -- .fini : { *(.fini) } =0x47ff041f -- . = ALIGN(32 / 8); -- PROVIDE (__preinit_array_start = .); -- .preinit_array : { *(.preinit_array) } -- PROVIDE (__preinit_array_end = .); -- PROVIDE (__init_array_start = .); -- .init_array : { *(.init_array) } -- PROVIDE (__init_array_end = .); -- PROVIDE (__fini_array_start = .); -- .fini_array : { *(.fini_array) } -- PROVIDE (__fini_array_end = .); -- .rodata : { *(.rodata) *(.gnu.linkonce.r*) } -- .rodata1 : { *(.rodata1) } -- .reginfo : { *(.reginfo) } -+ .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } -+ .rodata1 : { *(.rodata1) } -+ .eh_frame_hdr : { *(.eh_frame_hdr) } -+ .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } -+ .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ -- . = ALIGN(0x100000) + (. & (0x100000 - 1)); -- .data : -+ . = ALIGN (0x1000) - ((0x1000 - .) & (0x1000 - 1)); . = DATA_SEGMENT_ALIGN (0x1000, 0x1000); -+ /* Exception handling */ -+ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } -+ .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } -+ /* Thread Local Storage sections */ -+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } -+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } -+ .preinit_array : -+ { -+ PROVIDE_HIDDEN (__preinit_array_start = .); -+ KEEP (*(.preinit_array)) -+ PROVIDE_HIDDEN (__preinit_array_end = .); -+ } -+ .init_array : -+ { -+ PROVIDE_HIDDEN (__init_array_start = .); -+ KEEP (*(.init_array)) -+ PROVIDE_HIDDEN (__init_array_end = .); -+ } -+ .fini_array : -+ { -+ PROVIDE_HIDDEN (__fini_array_start = .); -+ KEEP (*(.fini_array)) -+ PROVIDE_HIDDEN (__fini_array_end = .); -+ } -+ .ctors : -+ { -+ /* gcc uses crtbegin.o to find the start of -+ the constructors, so we make sure it is -+ first. Because this is a wildcard, it -+ doesn't matter if the user does not -+ actually link against crtbegin.o; the -+ linker won't look for a file to match a -+ wildcard. The wildcard also means that it -+ doesn't matter which directory crtbegin.o -+ is in. */ -+ KEEP (*crtbegin*.o(.ctors)) -+ /* We don't want to include the .ctor section from -+ from the crtend.o file until after the sorted ctors. -+ The .ctor section from the crtend file contains the -+ end of ctors marker and it must be last */ -+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) -+ KEEP (*(SORT(.ctors.*))) -+ KEEP (*(.ctors)) -+ } -+ .dtors : -+ { -+ KEEP (*crtbegin*.o(.dtors)) -+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) -+ KEEP (*(SORT(.dtors.*))) -+ KEEP (*(.dtors)) -+ } -+ .jcr : { KEEP (*(.jcr)) } -+ .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } -+ .dynamic : { *(.dynamic) } -+ .got : { *(.got) } -+ . = DATA_SEGMENT_RELRO_END (12, .); -+ .got.plt : { *(.got.plt) } -+ .data : - { -- *(.data) -- *(.gnu.linkonce.d*) -- CONSTRUCTORS -- } -- .data1 : { *(.data1) } -- .ctors : -- { -- *(.ctors) -- } -- .dtors : -- { -- *(.dtors) -- } -- .plt : { *(.plt) } -- .got : { *(.got.plt) *(.got) } -- .dynamic : { *(.dynamic) } -- /* We want the small data sections together, so single-instruction offsets -- can access them all, and initialized data all before uninitialized, so -- we can shorten the on-disk segment size. */ -- .sdata : { *(.sdata) } -- _edata = .; -- PROVIDE (edata = .); -+ *(.data .data.* .gnu.linkonce.d.*) -+ KEEP (*(.gnu.linkonce.d.*personality*)) -+ SORT(CONSTRUCTORS) -+ } -+ .data1 : { *(.data1) } -+ _edata = .; PROVIDE (edata = .); - __bss_start = .; -- .sbss : { *(.sbss) *(.scommon) } -- .bss : -+ .bss : - { - *(.dynbss) -- *(.bss) -+ *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) -+ /* Align here to ensure that the .bss section occupies space up to -+ _end. Align after .bss to ensure correct alignment even if the -+ .bss section disappears because there are no input sections. -+ FIXME: Why do we need it? When there is no .bss section, we don't -+ pad the .data section. */ -+ . = ALIGN(. != 0 ? 32 / 8 : 1); - } -- _end = . ; -+ . = ALIGN(32 / 8); -+ . = ALIGN(32 / 8); -+ _end = .; - PROVIDE (end = .); -+ . = DATA_SEGMENT_END (.); - /* Stabs debugging sections. */ -- .stab 0 : { *(.stab) } -- .stabstr 0 : { *(.stabstr) } -- .stab.excl 0 : { *(.stab.excl) } -- .stab.exclstr 0 : { *(.stab.exclstr) } -- .stab.index 0 : { *(.stab.index) } -+ .stab 0 : { *(.stab) } -+ .stabstr 0 : { *(.stabstr) } -+ .stab.excl 0 : { *(.stab.excl) } -+ .stab.exclstr 0 : { *(.stab.exclstr) } -+ .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } -- .comment 0 : { *(.comment) } -+ .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ -@@ -124,7 +172,7 @@ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ -- .debug_info 0 : { *(.debug_info) } -+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } -@@ -136,5 +184,5 @@ - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } -- /* These must appear regardless of . */ -+ /DISCARD/ : { *(.note.GNU-stack) } - } diff --git a/qemu-0.7.1-armfpaex.patch b/qemu-0.7.1-armfpaex.patch deleted file mode 100644 index 4e32824c..00000000 --- a/qemu-0.7.1-armfpaex.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- linux-user/main.c -+++ linux-user/main.c -@@ -377,19 +377,55 @@ - { - TaskState *ts = env->opaque; - uint32_t opcode; -+ int rc; - - /* we handle the FPU emulation here, as Linux */ - /* we get the opcode */ - /* FIXME - what to do if get_user() fails? */ - get_user_u32(opcode, env->regs[15]); - -- if (EmulateAll(opcode, &ts->fpa, env) == 0) { -+ if ((rc=EmulateAll(opcode, &ts->fpa, env)) == 0) { - info.si_signo = SIGILL; - info.si_errno = 0; - info.si_code = TARGET_ILL_ILLOPN; - info._sifields._sigfault._addr = env->regs[15]; - queue_signal(info.si_signo, &info); -- } else { -+ } else if (rc < 0) { /* FP exception */ -+ int arm_fpe=0; -+ /* translate softfloat flags to FPSR flags */ -+ if(-rc & float_flag_invalid) arm_fpe |= BIT_IOC; -+ if(-rc & float_flag_divbyzero) arm_fpe |= BIT_DZC; -+ if(-rc & float_flag_overflow) arm_fpe |= BIT_OFC; -+ if(-rc & float_flag_underflow) arm_fpe |= BIT_UFC; -+ if(-rc & float_flag_inexact) arm_fpe |= BIT_IXC; -+ -+ FPSR fpsr = ts->fpa.fpsr; -+ //printf("fpsr 0x%x, arm_fpe 0x%x\n",fpsr,arm_fpe); -+ -+ if(fpsr & (arm_fpe << 16)) /* exception enabled? */ -+ { -+ info.si_signo = SIGFPE; -+ info.si_errno = 0; -+ /* ordered by priority, least first */ -+ if(arm_fpe & BIT_IXC) info.si_code = TARGET_FPE_FLTRES; -+ if(arm_fpe & BIT_UFC) info.si_code = TARGET_FPE_FLTUND; -+ if(arm_fpe & BIT_OFC) info.si_code = TARGET_FPE_FLTOVF; -+ if(arm_fpe & BIT_DZC) info.si_code = TARGET_FPE_FLTDIV; -+ if(arm_fpe & BIT_IOC) info.si_code = TARGET_FPE_FLTINV; -+ info._sifields._sigfault._addr = env->regs[15]; -+ queue_signal(info.si_signo, &info); -+ } -+ else -+ env->regs[15] += 4; -+ -+ /* accumulate unenabled exceptions */ -+ if((!(fpsr & BIT_IXE)) && (arm_fpe & BIT_IXC)) fpsr |= BIT_IXC; -+ if((!(fpsr & BIT_UFE)) && (arm_fpe & BIT_UFC)) fpsr |= BIT_UFC; -+ if((!(fpsr & BIT_OFE)) && (arm_fpe & BIT_OFC)) fpsr |= BIT_OFC; -+ if((!(fpsr & BIT_DZE)) && (arm_fpe & BIT_DZC)) fpsr |= BIT_DZC; -+ if((!(fpsr & BIT_IOE)) && (arm_fpe & BIT_IOC)) fpsr |= BIT_IOC; -+ ts->fpa.fpsr=fpsr; -+ } else { /* everything OK */ - /* increment PC */ - env->regs[15] += 4; - } ---- target-arm/nwfpe/fpa11.c -+++ target-arm/nwfpe/fpa11.c -@@ -162,6 +162,8 @@ - fpa11->initflag = 1; - } - -+ set_float_exception_flags(0, &fpa11->fp_status); -+ - if (TEST_OPCODE(opcode,MASK_CPRT)) - { - //fprintf(stderr,"emulating CPRT\n"); -@@ -191,6 +193,11 @@ - } - - // restore_flags(flags); -+ if(nRc == 1 && get_float_exception_flags(&fpa11->fp_status)) -+ { -+ //printf("fef 0x%x\n",float_exception_flags); -+ nRc=-get_float_exception_flags(&fpa11->fp_status); -+ } - - //printf("returning %d\n",nRc); - return(nRc); diff --git a/qemu-0.8.3-gcc4.patch b/qemu-0.8.3-gcc4.patch deleted file mode 100644 index b15eb2eb..00000000 --- a/qemu-0.8.3-gcc4.patch +++ /dev/null @@ -1,904 +0,0 @@ -2007-02-17 Gwenole Beauchesne - - * target-i386/op.c (op_imull_EAX_T0, op_imulw_T0_T1, - op_imull_T0_T1): Add FORCE_RET() since CC_SRC involves a - compare-branch that may be optimized into a beqlr on ppc. - -2005-06-02 Gwenole Beauchesne - - * dyngen.c (trace_i386_insn): Fix push/imul case with 8-bit - immediate. - -2005-05-11 Paul Brook - - * gcc4 host support. - -================================================================================ ---- qemu/dyngen-exec.h -+++ qemu/dyngen-exec.h -@@ -194,7 +194,12 @@ - #endif - - /* force GCC to generate only one epilog at the end of the function */ -+#if defined(__i386__) || defined(__x86_64__) -+/* Also add 4 bytes of padding so that we can replace the ret with a jmp. */ -+#define FORCE_RET() __asm__ __volatile__("nop;nop;nop;nop" : : : "memory"); -+#else - #define FORCE_RET() __asm__ __volatile__("" : : : "memory"); -+#endif - - #ifndef OPPROTO - #define OPPROTO -@@ -244,11 +249,18 @@ - #endif - - #if defined(__i386__) --#define EXIT_TB() asm volatile ("ret") --#define GOTO_LABEL_PARAM(n) asm volatile ("jmp " ASM_NAME(__op_gen_label) #n) -+/* Dyngen will replace hlt instructions with a ret instruction. Inserting a -+ ret directly would confuse dyngen. */ -+#define EXIT_TB() asm volatile ("hlt") -+/* Dyngen will replace cli with 0x9e (jmp). -+ We generate the offset manually. */ -+#define GOTO_LABEL_PARAM(n) \ -+ asm volatile ("cli;.long " ASM_NAME(__op_gen_label) #n " - 1f;1:") - #elif defined(__x86_64__) --#define EXIT_TB() asm volatile ("ret") --#define GOTO_LABEL_PARAM(n) asm volatile ("jmp " ASM_NAME(__op_gen_label) #n) -+/* The same as i386. */ -+#define EXIT_TB() asm volatile ("hlt") -+#define GOTO_LABEL_PARAM(n) \ -+ asm volatile ("cli;.long " ASM_NAME(__op_gen_label) #n " - 1f;1:") - #elif defined(__powerpc__) - #define EXIT_TB() asm volatile ("blr") - #define GOTO_LABEL_PARAM(n) asm volatile ("b " ASM_NAME(__op_gen_label) #n) ---- qemu/dyngen.c -+++ qemu/dyngen.c -@@ -32,6 +32,8 @@ - - #include "config-host.h" - -+//#define DEBUG_OP -+ - /* NOTE: we test CONFIG_WIN32 instead of _WIN32 to enabled cross - compilation */ - #if defined(CONFIG_WIN32) -@@ -1429,6 +1431,644 @@ - #endif - - -+#if defined(HOST_I386) || defined(HOST_X86_64) -+ -+/* This byte is the first byte of an instruction. */ -+#define FLAG_INSN (1 << 0) -+/* This byte has been processed as part of an instruction. */ -+#define FLAG_SCANNED (1 << 1) -+/* This instruction is a return instruction. Gcc cometimes generates prefix -+ bytes, so may be more than one byte long. */ -+#define FLAG_RET (1 << 2) -+/* This is either the target of a jump, or the preceeding instruction uses -+ a pc-relative offset. */ -+#define FLAG_TARGET (1 << 3) -+/* This is a magic instruction that needs fixing up. */ -+#define FLAG_EXIT (1 << 4) -+#define MAX_EXITS 5 -+ -+static void -+bad_opcode(const char *name, uint32_t op) -+{ -+ error("Unsupported opcode %0*x in %s", (op > 0xff) ? 4 : 2, op, name); -+} -+ -+/* Mark len bytes as scanned, Returns insn_size + len. Reports an error -+ if these bytes have already been scanned. */ -+static int -+eat_bytes(const char *name, char *flags, int insn, int insn_size, int len) -+{ -+ while (len > 0) { -+ /* This should never occur in sane code. */ -+ if (flags[insn + insn_size] & FLAG_SCANNED) -+ error ("Overlapping instructions in %s", name); -+ flags[insn + insn_size] |= FLAG_SCANNED; -+ insn_size++; -+ len--; -+ } -+ return insn_size; -+} -+ -+static void -+trace_i386_insn (const char *name, uint8_t *start_p, char *flags, int insn, -+ int len) -+{ -+ uint8_t *ptr; -+ uint8_t op; -+ int modrm; -+ int is_prefix; -+ int op_size; -+ int addr_size; -+ int insn_size; -+ int is_ret; -+ int is_condjmp; -+ int is_jmp; -+ int is_exit; -+ int is_pcrel; -+ int immed; -+ int seen_rexw; -+ int32_t disp; -+ -+ ptr = start_p + insn; -+ /* nonzero if this insn has a ModR/M byte. */ -+ modrm = 1; -+ /* The size of the immediate value in this instruction. */ -+ immed = 0; -+ /* The operand size. */ -+ op_size = 4; -+ /* The address size */ -+ addr_size = 4; -+ /* The total length of this instruction. */ -+ insn_size = 0; -+ is_prefix = 1; -+ is_ret = 0; -+ is_condjmp = 0; -+ is_jmp = 0; -+ is_exit = 0; -+ seen_rexw = 0; -+ is_pcrel = 0; -+ -+ while (is_prefix) { -+ op = ptr[insn_size]; -+ insn_size = eat_bytes(name, flags, insn, insn_size, 1); -+ is_prefix = 0; -+ switch (op >> 4) { -+ case 0: -+ case 1: -+ case 2: -+ case 3: -+ if (op == 0x0f) { -+ /* two-byte opcode. */ -+ op = ptr[insn_size]; -+ insn_size = eat_bytes(name, flags, insn, insn_size, 1); -+ switch (op >> 4) { -+ case 0: -+ if ((op & 0xf) > 3) -+ modrm = 0; -+ break; -+ case 1: /* vector move or prefetch */ -+ case 2: /* various moves and vector compares. */ -+ case 4: /* cmov */ -+ case 5: /* vector instructions */ -+ case 6: -+ case 13: -+ case 14: -+ case 15: -+ break; -+ case 7: /* mmx */ -+ if (op & 0x77) /* emms */ -+ modrm = 0; -+ break; -+ case 3: /* wrmsr, rdtsc, rdmsr, rdpmc, sysenter, sysexit */ -+ modrm = 0; -+ break; -+ case 8: /* long conditional jump */ -+ is_condjmp = 1; -+ immed = op_size; -+ modrm = 0; -+ break; -+ case 9: /* setcc */ -+ break; -+ case 10: -+ switch (op & 0x7) { -+ case 0: /* push fs/gs */ -+ case 1: /* pop fs/gs */ -+ case 2: /* cpuid/rsm */ -+ modrm = 0; -+ break; -+ case 4: /* shld/shrd immediate */ -+ immed = 1; -+ break; -+ default: /* Normal instructions with a ModR/M byte. */ -+ break; -+ } -+ break; -+ case 11: -+ switch (op & 0xf) { -+ case 10: /* bt, bts, btr, btc */ -+ immed = 1; -+ break; -+ default: -+ /* cmpxchg, lss, btr, lfs, lgs, movzx, btc, bsf, bsr -+ undefined, and movsx */ -+ break; -+ } -+ break; -+ case 12: -+ if (op & 8) { -+ /* bswap */ -+ modrm = 0; -+ } else { -+ switch (op & 0x7) { -+ case 2: -+ case 4: -+ case 5: -+ case 6: -+ immed = 1; -+ break; -+ default: -+ break; -+ } -+ } -+ break; -+ } -+ } else if ((op & 0x07) <= 0x3) { -+ /* General arithmentic ax. */ -+ } else if ((op & 0x07) <= 0x5) { -+ /* General arithmetic ax, immediate. */ -+ if (op & 0x01) -+ immed = op_size; -+ else -+ immed = 1; -+ modrm = 0; -+ } else if ((op & 0x23) == 0x22) { -+ /* Segment prefix. */ -+ is_prefix = 1; -+ } else { -+ /* Segment register push/pop or DAA/AAA/DAS/AAS. */ -+ modrm = 0; -+ } -+ break; -+ -+#if defined(HOST_X86_64) -+ case 4: /* rex prefix. */ -+ is_prefix = 1; -+ /* The address/operand size is actually 64-bit, but the immediate -+ values in the instruction are still 32-bit. */ -+ op_size = 4; -+ addr_size = 4; -+ if (op & 8) -+ seen_rexw = 1; -+ break; -+#else -+ case 4: /* inc/dec register. */ -+#endif -+ case 5: /* push/pop general register. */ -+ modrm = 0; -+ break; -+ -+ case 6: -+ switch (op & 0x0f) { -+ case 0: /* pusha */ -+ case 1: /* popa */ -+ modrm = 0; -+ break; -+ case 2: /* bound */ -+ case 3: /* arpl */ -+ break; -+ case 4: /* FS */ -+ case 5: /* GS */ -+ is_prefix = 1; -+ break; -+ case 6: /* opcode size prefix. */ -+ op_size = 2; -+ is_prefix = 1; -+ break; -+ case 7: /* Address size prefix. */ -+ addr_size = 2; -+ is_prefix = 1; -+ break; -+ case 8: /* push immediate */ -+ immed = op_size; -+ modrm = 0; -+ break; -+ case 10: /* push 8-bit immediate */ -+ immed = 1; -+ modrm = 0; -+ break; -+ case 9: /* imul immediate */ -+ immed = op_size; -+ break; -+ case 11: /* imul 8-bit immediate */ -+ immed = 1; -+ break; -+ case 12: /* insb */ -+ case 13: /* insw */ -+ case 14: /* outsb */ -+ case 15: /* outsw */ -+ modrm = 0; -+ break; -+ } -+ break; -+ -+ case 7: /* Short conditional jump. */ -+ is_condjmp = 1; -+ immed = 1; -+ modrm = 0; -+ break; -+ -+ case 8: -+ if ((op & 0xf) <= 3) { -+ /* arithmetic immediate. */ -+ if ((op & 3) == 1) -+ immed = op_size; -+ else -+ immed = 1; -+ } -+ /* else test, xchg, mov, lea or pop general. */ -+ break; -+ -+ case 9: -+ /* Various single-byte opcodes with no modrm byte. */ -+ modrm = 0; -+ if (op == 10) { -+ /* Call */ -+ immed = 4; -+ } -+ break; -+ -+ case 10: -+ switch ((op & 0xe) >> 1) { -+ case 0: /* mov absoliute immediate. */ -+ case 1: -+ if (seen_rexw) -+ immed = 8; -+ else -+ immed = addr_size; -+ break; -+ case 4: /* test immediate. */ -+ if (op & 1) -+ immed = op_size; -+ else -+ immed = 1; -+ break; -+ default: /* Various string ops. */ -+ break; -+ } -+ modrm = 0; -+ break; -+ -+ case 11: /* move immediate to register */ -+ if (op & 8) { -+ if (seen_rexw) -+ immed = 8; -+ else -+ immed = op_size; -+ } else { -+ immed = 1; -+ } -+ modrm = 0; -+ break; -+ -+ case 12: -+ switch (op & 0xf) { -+ case 0: /* shift immediate */ -+ case 1: -+ immed = 1; -+ break; -+ case 2: /* ret immediate */ -+ immed = 2; -+ modrm = 0; -+ bad_opcode(name, op); -+ break; -+ case 3: /* ret */ -+ modrm = 0; -+ is_ret = 1; -+ case 4: /* les */ -+ case 5: /* lds */ -+ break; -+ case 6: /* mov immediate byte */ -+ immed = 1; -+ break; -+ case 7: /* mov immediate */ -+ immed = op_size; -+ break; -+ case 8: /* enter */ -+ /* TODO: Is this right? */ -+ immed = 3; -+ modrm = 0; -+ break; -+ case 10: /* retf immediate */ -+ immed = 2; -+ modrm = 0; -+ bad_opcode(name, op); -+ break; -+ case 13: /* int */ -+ immed = 1; -+ modrm = 0; -+ break; -+ case 11: /* retf */ -+ case 15: /* iret */ -+ modrm = 0; -+ bad_opcode(name, op); -+ break; -+ default: /* leave, int3 or into */ -+ modrm = 0; -+ break; -+ } -+ break; -+ -+ case 13: -+ if ((op & 0xf) >= 8) { -+ /* Coprocessor escape. For our purposes this is just a normal -+ instruction with a ModR/M byte. */ -+ } else if ((op & 0xf) >= 4) { -+ /* AAM, AAD or XLAT */ -+ modrm = 0; -+ } -+ /* else shift instruction */ -+ break; -+ -+ case 14: -+ switch ((op & 0xc) >> 2) { -+ case 0: /* loop or jcxz */ -+ is_condjmp = 1; -+ immed = 1; -+ break; -+ case 1: /* in/out immed */ -+ immed = 1; -+ break; -+ case 2: /* call or jmp */ -+ switch (op & 3) { -+ case 0: /* call */ -+ immed = op_size; -+ break; -+ case 1: /* long jump */ -+ immed = 4; -+ is_jmp = 1; -+ break; -+ case 2: /* far jmp */ -+ bad_opcode(name, op); -+ break; -+ case 3: /* short jmp */ -+ immed = 1; -+ is_jmp = 1; -+ break; -+ } -+ break; -+ case 3: /* in/out register */ -+ break; -+ } -+ modrm = 0; -+ break; -+ -+ case 15: -+ switch ((op & 0xe) >> 1) { -+ case 0: -+ case 1: -+ is_prefix = 1; -+ break; -+ case 2: -+ case 4: -+ case 5: -+ case 6: -+ modrm = 0; -+ /* Some privileged insns are used as markers. */ -+ switch (op) { -+ case 0xf4: /* hlt: Exit translation block. */ -+ is_exit = 1; -+ break; -+ case 0xfa: /* cli: Jump to label. */ -+ is_exit = 1; -+ immed = 4; -+ break; -+ case 0xfb: /* sti: TB patch jump. */ -+ /* Mark the insn for patching, but continue sscanning. */ -+ flags[insn] |= FLAG_EXIT; -+ immed = 4; -+ break; -+ } -+ break; -+ case 3: /* unary grp3 */ -+ if ((ptr[insn_size] & 0x38) == 0) { -+ if (op == 0xf7) -+ immed = op_size; -+ else -+ immed = 1; /* test immediate */ -+ } -+ break; -+ case 7: /* inc/dec grp4/5 */ -+ /* TODO: This includes indirect jumps. We should fail if we -+ encounter one of these. */ -+ break; -+ } -+ break; -+ } -+ } -+ -+ if (modrm) { -+ if (addr_size != 4) -+ error("16-bit addressing mode used in %s", name); -+ -+ disp = 0; -+ modrm = ptr[insn_size]; -+ insn_size = eat_bytes(name, flags, insn, insn_size, 1); -+ modrm &= 0xc7; -+ switch ((modrm & 0xc0) >> 6) { -+ case 0: -+ if (modrm == 5) -+ disp = 4; -+ break; -+ case 1: -+ disp = 1; -+ break; -+ case 2: -+ disp = 4; -+ break; -+ } -+ if ((modrm & 0xc0) != 0xc0 && (modrm & 0x7) == 4) { -+ /* SIB byte */ -+ if (modrm == 4 && (ptr[insn_size] & 0x7) == 5) { -+ disp = 4; -+ is_pcrel = 1; -+ } -+ insn_size = eat_bytes(name, flags, insn, insn_size, 1); -+ } -+ insn_size = eat_bytes(name, flags, insn, insn_size, disp); -+ } -+ insn_size = eat_bytes(name, flags, insn, insn_size, immed); -+ if (is_condjmp || is_jmp) { -+ if (immed == 1) { -+ disp = (int8_t)*(ptr + insn_size - 1); -+ } else { -+ disp = (((int32_t)*(ptr + insn_size - 1)) << 24) -+ | (((int32_t)*(ptr + insn_size - 2)) << 16) -+ | (((int32_t)*(ptr + insn_size - 3)) << 8) -+ | *(ptr + insn_size - 4); -+ } -+ disp += insn_size; -+ /* Jumps to external symbols point to the address of the offset -+ before relocation. */ -+ /* ??? These are probably a tailcall. We could fix them up by -+ replacing them with jmp to EOB + call, but it's easier to just -+ prevent the compiler generating them. */ -+ if (disp == 1) -+ error("Unconditional jump (sibcall?) in %s", name); -+ disp += insn; -+ if (disp < 0 || disp > len) -+ error("Jump outside instruction in %s", name); -+ -+ if ((flags[disp] & (FLAG_INSN | FLAG_SCANNED)) == FLAG_SCANNED) -+ error("Overlapping instructions in %s", name); -+ -+ flags[disp] |= (FLAG_INSN | FLAG_TARGET); -+ is_pcrel = 1; -+ } -+ if (is_pcrel) { -+ /* Mark the following insn as a jump target. This will stop -+ this instruction being moved. */ -+ flags[insn + insn_size] |= FLAG_TARGET; -+ } -+ if (is_ret) -+ flags[insn] |= FLAG_RET; -+ -+ if (is_exit) -+ flags[insn] |= FLAG_EXIT; -+ -+ if (!(is_jmp || is_ret || is_exit)) -+ flags[insn + insn_size] |= FLAG_INSN; -+} -+ -+/* Scan a function body. Returns the position of the return sequence. -+ Sets *patch_bytes to the number of bytes that need to be copied from that -+ location. If no patching is required (ie. the return is the last insn) -+ *patch_bytes will be set to -1. *plen is the number of code bytes to copy. -+ */ -+static int trace_i386_op(const char * name, uint8_t *start_p, int *plen, -+ int *patch_bytes, int *exit_addrs) -+{ -+ char *flags; -+ int more; -+ int insn; -+ int retpos; -+ int bytes; -+ int num_exits; -+ int len; -+ int last_insn; -+ -+ len = *plen; -+ flags = malloc(len + 1); -+ memset(flags, 0, len + 1); -+ flags[0] |= FLAG_INSN; -+ more = 1; -+ while (more) { -+ more = 0; -+ for (insn = 0; insn < len; insn++) { -+ if ((flags[insn] & (FLAG_INSN | FLAG_SCANNED)) == FLAG_INSN) { -+ trace_i386_insn(name, start_p, flags, insn, len); -+ more = 1; -+ } -+ } -+ } -+ -+ /* Strip any unused code at the end of the function. */ -+ while (len > 0 && flags[len - 1] == 0) -+ len--; -+ -+ retpos = -1; -+ num_exits = 0; -+ last_insn = 0; -+ for (insn = 0; insn < len; insn++) { -+ if (flags[insn] & FLAG_RET) { -+ /* ??? In theory it should be possible to handle multiple return -+ points. In practice it's not worth the effort. */ -+ if (retpos != -1) -+ error("Multiple return instructions in %s", name); -+ retpos = insn; -+ } -+ if (flags[insn] & FLAG_EXIT) { -+ if (num_exits == MAX_EXITS) -+ error("Too many block exits in %s", name); -+ exit_addrs[num_exits] = insn; -+ num_exits++; -+ } -+ if (flags[insn] & FLAG_INSN) -+ last_insn = insn; -+ } -+ -+ exit_addrs[num_exits] = -1; -+ if (retpos == -1) { -+ if (num_exits == 0) { -+ error ("No return instruction found in %s", name); -+ } else { -+ retpos = len; -+ last_insn = len; -+ } -+ } -+ -+ /* If the return instruction is the last instruction we can just -+ remove it. */ -+ if (retpos == last_insn) -+ *patch_bytes = -1; -+ else -+ *patch_bytes = 0; -+ -+ /* Back up over any nop instructions. */ -+ while (retpos > 0 -+ && (flags[retpos] & FLAG_TARGET) == 0 -+ && (flags[retpos - 1] & FLAG_INSN) != 0 -+ && start_p[retpos - 1] == 0x90) { -+ retpos--; -+ } -+ -+ if (*patch_bytes == -1) { -+ *plen = retpos; -+ free (flags); -+ return retpos; -+ } -+ *plen = len; -+ -+ /* The ret is in the middle of the function. Find four more bytes that -+ so the ret can be replaced by a jmp. */ -+ /* ??? Use a short jump where possible. */ -+ bytes = 4; -+ insn = retpos + 1; -+ /* We can clobber everything up to the next jump target. */ -+ while (insn < len && bytes > 0 && (flags[insn] & FLAG_TARGET) == 0) { -+ insn++; -+ bytes--; -+ } -+ if (bytes > 0) { -+ /* ???: Strip out nop blocks. */ -+ /* We can't do the replacement without clobbering anything important. -+ Copy preceeding instructions(s) to give us some space. */ -+ while (retpos > 0) { -+ /* If this byte is the target of a jmp we can't move it. */ -+ if (flags[retpos] & FLAG_TARGET) -+ break; -+ -+ (*patch_bytes)++; -+ bytes--; -+ retpos--; -+ -+ /* Break out of the loop if we have enough space and this is either -+ the first byte of an instruction or a pad byte. */ -+ if ((flags[retpos] & (FLAG_INSN | FLAG_SCANNED)) != FLAG_SCANNED -+ && bytes <= 0) { -+ break; -+ } -+ } -+ } -+ -+ if (bytes > 0) -+ error("Unable to replace ret with jmp in %s\n", name); -+ -+ free(flags); -+ return retpos; -+} -+ -+#endif -+ - #define MAX_ARGS 3 - - /* generate op code */ -@@ -1442,6 +2082,11 @@ - uint8_t args_present[MAX_ARGS]; - const char *sym_name, *p; - EXE_RELOC *rel; -+#if defined(HOST_I386) || defined(HOST_X86_64) -+ int patch_bytes; -+ int retpos; -+ int exit_addrs[MAX_EXITS]; -+#endif - - /* Compute exact size excluding prologue and epilogue instructions. - * Increment start_offset to skip epilogue instructions, then compute -@@ -1452,33 +2097,12 @@ - p_end = p_start + size; - start_offset = offset; - #if defined(HOST_I386) || defined(HOST_X86_64) --#ifdef CONFIG_FORMAT_COFF -- { -- uint8_t *p; -- p = p_end - 1; -- if (p == p_start) -- error("empty code for %s", name); -- while (*p != 0xc3) { -- p--; -- if (p <= p_start) -- error("ret or jmp expected at the end of %s", name); -- } -- copy_size = p - p_start; -- } --#else - { - int len; - len = p_end - p_start; -- if (len == 0) -- error("empty code for %s", name); -- if (p_end[-1] == 0xc3) { -- len--; -- } else { -- error("ret or jmp expected at the end of %s", name); -- } -+ retpos = trace_i386_op(name, p_start, &len, &patch_bytes, exit_addrs); - copy_size = len; - } --#endif - #elif defined(HOST_PPC) - { - uint8_t *p; -@@ -1710,6 +2334,13 @@ - } - - if (gen_switch == 2) { -+#if defined(HOST_I386) || defined(HOST_X86_64) -+ if (patch_bytes != -1) -+ copy_size += patch_bytes; -+#ifdef DEBUG_OP -+ copy_size += 2; -+#endif -+#endif - fprintf(outfile, "DEF(%s, %d, %d)\n", name + 3, nb_args, copy_size); - } else if (gen_switch == 1) { - -@@ -1915,7 +2546,43 @@ - #error unsupport object format - #endif - } -+ } -+ /* Replace the marker instructions with the actual opcodes. */ -+ for (i = 0; exit_addrs[i] != -1; i++) { -+ int op; -+ switch (p_start[exit_addrs[i]]) -+ { -+ case 0xf4: op = 0xc3; break; /* hlt -> ret */ -+ case 0xfa: op = 0xe9; break; /* cli -> jmp */ -+ case 0xfb: op = 0xe9; break; /* sti -> jmp */ -+ default: error("Internal error"); -+ } -+ fprintf(outfile, -+ " *(uint8_t *)(gen_code_ptr + %d) = 0x%x;\n", -+ exit_addrs[i], op); - } -+ /* Fix up the return instruction. */ -+ if (patch_bytes != -1) { -+ if (patch_bytes) { -+ fprintf(outfile, " memcpy(gen_code_ptr + %d," -+ "gen_code_ptr + %d, %d);\n", -+ copy_size, retpos, patch_bytes); -+ } -+ fprintf(outfile, -+ " *(uint8_t *)(gen_code_ptr + %d) = 0xe9;\n", -+ retpos); -+ fprintf(outfile, -+ " *(uint32_t *)(gen_code_ptr + %d) = 0x%x;\n", -+ retpos + 1, copy_size - (retpos + 5)); -+ -+ copy_size += patch_bytes; -+ } -+#ifdef DEBUG_OP -+ fprintf(outfile, -+ " *(uint16_t *)(gen_code_ptr + %d) = 0x9090;\n", -+ copy_size); -+ copy_size += 2; -+#endif - } - #elif defined(HOST_X86_64) - { -@@ -1949,6 +2616,42 @@ - } - } - } -+ /* Replace the marker instructions with the actual opcodes. */ -+ for (i = 0; exit_addrs[i] != -1; i++) { -+ int op; -+ switch (p_start[exit_addrs[i]]) -+ { -+ case 0xf4: op = 0xc3; break; /* hlt -> ret */ -+ case 0xfa: op = 0xe9; break; /* cli -> jmp */ -+ case 0xfb: op = 0xe9; break; /* sti -> jmp */ -+ default: error("Internal error"); -+ } -+ fprintf(outfile, -+ " *(uint8_t *)(gen_code_ptr + %d) = 0x%x;\n", -+ exit_addrs[i], op); -+ } -+ /* Fix up the return instruction. */ -+ if (patch_bytes != -1) { -+ if (patch_bytes) { -+ fprintf(outfile, " memcpy(gen_code_ptr + %d," -+ "gen_code_ptr + %d, %d);\n", -+ copy_size, retpos, patch_bytes); -+ } -+ fprintf(outfile, -+ " *(uint8_t *)(gen_code_ptr + %d) = 0xe9;\n", -+ retpos); -+ fprintf(outfile, -+ " *(uint32_t *)(gen_code_ptr + %d) = 0x%x;\n", -+ retpos + 1, copy_size - (retpos + 5)); -+ -+ copy_size += patch_bytes; -+ } -+#ifdef DEBUG_OP -+ fprintf(outfile, -+ " *(uint16_t *)(gen_code_ptr + %d) = 0x9090;\n", -+ copy_size); -+ copy_size += 2; -+#endif - } - #elif defined(HOST_PPC) - { ---- qemu/exec-all.h -+++ qemu/exec-all.h -@@ -339,14 +339,15 @@ - - #elif defined(__i386__) && defined(USE_DIRECT_JUMP) - --/* we patch the jump instruction directly */ -+/* we patch the jump instruction directly. Use sti in place of the actual -+ jmp instruction so that dyngen can patch in the correct result. */ - #define GOTO_TB(opname, tbparam, n)\ - do {\ - asm volatile (".section .data\n"\ - ASM_OP_LABEL_NAME(n, opname) ":\n"\ - ".long 1f\n"\ - ASM_PREVIOUS_SECTION \ -- "jmp " ASM_NAME(__op_jmp) #n "\n"\ -+ "sti;.long " ASM_NAME(__op_jmp) #n " - 1f\n"\ - "1:\n");\ - } while (0) - ---- qemu/target-i386/op.c -+++ qemu/target-i386/op.c -@@ -290,6 +290,7 @@ - EDX = (uint32_t)(res >> 32); - CC_DST = res; - CC_SRC = (res != (int32_t)res); -+ FORCE_RET(); - } - - void OPPROTO op_imulw_T0_T1(void) -@@ -299,6 +300,7 @@ - T0 = res; - CC_DST = res; - CC_SRC = (res != (int16_t)res); -+ FORCE_RET(); - } - - void OPPROTO op_imull_T0_T1(void) -@@ -308,6 +310,7 @@ - T0 = res; - CC_DST = res; - CC_SRC = (res != (int32_t)res); -+ FORCE_RET(); - } - - #ifdef TARGET_X86_64 diff --git a/qemu-0.9.1.tar.bz2 b/qemu-0.9.1.tar.bz2 deleted file mode 100644 index 902b355c..00000000 --- a/qemu-0.9.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a68d110ac86247b385b677d02fff2315ba42418469ead2d4f7e8bb48cfa928ba -size 2370923 diff --git a/qemu-20080703.tar.bz2 b/qemu-20080703.tar.bz2 new file mode 100644 index 00000000..70c88001 --- /dev/null +++ b/qemu-20080703.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30948f2476c9b854f4888521cc9252558fc99688fbe89fca98c19e963a6fb195 +size 2691429 diff --git a/qemu-cvs-futex.patch b/qemu-cvs-futex.patch deleted file mode 100644 index 06c36942..00000000 --- a/qemu-cvs-futex.patch +++ /dev/null @@ -1,126 +0,0 @@ -Index: qemu.bkp/linux-user/syscall.c -================================================================================ ---- qemu/linux-user/syscall.c -+++ qemu/linux-user/syscall.c -@@ -17,6 +17,8 @@ - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -+ -+#define __user - #include - #include - #include -@@ -60,6 +62,7 @@ - #define tchars host_tchars /* same as target */ - #define ltchars host_ltchars /* same as target */ - -+#include - #include - #include - #include -@@ -2715,6 +2718,92 @@ - unlock_user_struct(target_ts, target_addr, 1); - } - -+#ifdef BSWAP_NEEDED -+static int futex_op(int oldval, int op, int oparg) -+{ -+ int retval = oparg; -+ switch(op) { -+ case FUTEX_OP_SET: break; -+ case FUTEX_OP_ADD: retval += oparg; break; -+ case FUTEX_OP_OR: retval |= oparg; break; -+ case FUTEX_OP_ANDN: retval &= oparg; break; -+ case FUTEX_OP_XOR: retval ^= oparg; break; -+ } -+ return retval; -+} -+ -+static int futex_cmp(int oldval, int cmp, int cmparg) -+{ -+ switch(cmp) { -+ case FUTEX_OP_CMP_EQ: return oldval == cmparg; -+ case FUTEX_OP_CMP_NE: return oldval != cmparg; -+ case FUTEX_OP_CMP_LT: return oldval < cmparg; -+ case FUTEX_OP_CMP_LE: return oldval <= cmparg; -+ case FUTEX_OP_CMP_GT: return oldval > cmparg; -+ case FUTEX_OP_CMP_GE: return oldval >= cmparg; -+ } -+ return -1; -+} -+#endif -+ -+static long do_futex(target_ulong uaddr, int op, uint32_t val, -+ target_ulong utime, target_ulong uaddr2, -+ uint32_t val3) -+{ -+ struct timespec host_utime; -+ unsigned long val2 = utime; -+ long retval; -+ -+ if (utime && (op == FUTEX_WAIT || op == FUTEX_LOCK_PI)) { -+ target_to_host_timespec(&host_utime, utime); -+ val2 = (unsigned long)&host_utime; -+ } -+ -+#ifdef BSWAP_NEEDED -+ switch(op) { -+ case FUTEX_CMP_REQUEUE: -+ val3 = tswap32(val3); -+ case FUTEX_REQUEUE: -+ val2 = tswap32(val2); -+ case FUTEX_WAIT: -+ case FUTEX_WAKE: -+ case FUTEX_WAKE_OP: -+ val = tswap32(val); -+ case FUTEX_LOCK_PI: /* This one's icky, but comes out OK */ -+ case FUTEX_UNLOCK_PI: -+ break; -+ default: -+ gemu_log("qemu: Unsupported futex op %d\n", op); -+ return -TARGET_ENOSYS; -+ } -+ if (op == FUTEX_WAKE_OP) { -+ /* Need to munge the secondary operation (val3) */ -+ gemu_log("qemu: Tricky FUTEX_WAKE_OP - trying to emulate it\n"); -+ val3 = tswap32(val3); -+ int op2 = (val3 >> 28) & 0xf; -+ int cmp = (val3 >> 24) & 0xf; -+ int oparg = (val3 >> 12) & 0xfff; -+ int cmparg = val3 & 0xfff; -+ int shift = val3 & (FUTEX_OP_OPARG_SHIFT << 28); -+ int oldval; if(get_user_u32(oldval, uaddr2)) -+ return -TARGET_EFAULT; -+ if (shift) -+ oparg = 1 << oparg; -+ -+ put_user_u32(uaddr2,futex_op(oldval, op2, oparg)); -+ retval = syscall(__NR_futex, g2h(uaddr), FUTEX_WAKE, val, 0, 0, 0); -+ if(futex_cmp(oldval, cmp, cmparg)) { -+ retval = syscall(__NR_futex, g2h(uaddr2), FUTEX_WAKE, val2, 0, 0, 0); -+ } -+ } else { -+ retval = syscall(__NR_futex, g2h(uaddr), op, val, val2, g2h(uaddr2), val3); -+ } -+#else -+ retval = syscall(__NR_futex, g2h(uaddr), op, val, val2, g2h(uaddr2), val3); -+#endif -+ return retval; -+} -+ - /* do_syscall() should always have a single exit point at the end so - that actions, such as logging of syscall results, can be performed. - All errnos that do_syscall() returns must be -TARGET_. */ -@@ -5116,6 +5205,11 @@ - } - #endif - -+#ifdef TARGET_NR_futex -+ case TARGET_NR_futex: -+ ret = get_errno(do_futex(arg1, arg2, arg3, arg4, arg5, arg6)); -+ break; -+#endif - #if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address) - case TARGET_NR_set_tid_address: - ret = get_errno(set_tid_address((int *) arg1)); diff --git a/qemu-cvs-ia64.patch b/qemu-cvs-ia64.patch index 75fc71db..9975422b 100644 --- a/qemu-cvs-ia64.patch +++ b/qemu-cvs-ia64.patch @@ -1,6 +1,6 @@ --- Makefile.target +++ Makefile.target -@@ -111,6 +111,8 @@ +@@ -84,6 +84,8 @@ OP_CFLAGS+=$(call cc-option, -fno-reorder-blocks, "") OP_CFLAGS+=$(call cc-option, -fno-gcse, "") OP_CFLAGS+=$(call cc-option, -fno-tree-ch, "") @@ -9,18 +9,18 @@ OP_CFLAGS+=$(call cc-option, -fno-optimize-sibling-calls, "") OP_CFLAGS+=$(call cc-option, -fno-crossjumping, "") OP_CFLAGS+=$(call cc-option, -fno-align-labels, "") -@@ -185,8 +187,9 @@ +@@ -141,8 +143,9 @@ endif ifeq ($(ARCH),ia64) --BASE_CFLAGS+=-mno-sdata +-CFLAGS+=-mno-sdata -OP_CFLAGS+=-mno-sdata +OP_CFLAGS+=$(call cc-option, -mno-sched-ar-data-spec, "") -+BASE_CFLAGS+=-G0 -mno-sdata ++CFLAGS+=-G0 -mno-sdata +OP_CFLAGS+=-G0 -mno-sdata - BASE_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld endif + ifeq ($(ARCH),arm) --- target-alpha/op.c +++ target-alpha/op.c @@ -18,8 +18,6 @@ diff --git a/qemu-cvs-ipc.patch b/qemu-cvs-ipc.patch index 9ffb9b49..5b4366a8 100644 --- a/qemu-cvs-ipc.patch +++ b/qemu-cvs-ipc.patch @@ -2,16 +2,16 @@ Index: qemu/linux-user/syscall.c ================================================================================ --- qemu/linux-user/syscall.c +++ qemu/linux-user/syscall.c -@@ -29,7 +29,7 @@ - #include +@@ -30,7 +30,7 @@ #include #include + #include -#include +#include #include #include #include -@@ -46,6 +46,9 @@ +@@ -47,6 +47,9 @@ #include #include #include @@ -21,17 +21,17 @@ Index: qemu/linux-user/syscall.c #include #include #include -@@ -164,6 +167,7 @@ - #define __NR_sys_utimensat __NR_utimensat - #define __NR_sys_clone __NR_clone +@@ -153,6 +156,7 @@ + + #define __NR_sys_sched_getaffinity __NR_sched_getaffinity +#define __NR_sys_ipc __NR_ipc - - #if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) - #define __NR__llseek __NR_lseek -@@ -235,6 +239,10 @@ - #ifdef __NR_sys_clone - _syscall5(int,sys_clone, int, flags, void *, child_stack, int *, parent_tidptr, void *, newtls, int *, child_tidptr) + #define __NR_sys_uname __NR_uname + #define __NR_sys_faccessat __NR_faccessat + #define __NR_sys_fchmodat __NR_fchmodat +@@ -243,6 +247,10 @@ + #if defined(TARGET_NR_tkill) && defined(__NR_tkill) + _syscall2(int,sys_tkill,int,tid,int,sig) #endif +#ifdef __NR_ipc +_syscall6(int,sys_ipc, long, call, long, first, long, second, long, third, void *, ptr, long, fifth) @@ -40,7 +40,7 @@ Index: qemu/linux-user/syscall.c #ifdef __NR_sys_sched_getaffinity _syscall3(int,sys_sched_getaffinity,pid_t,pid,unsigned int,cpusetsize,void*,mask) #endif -@@ -1464,6 +1472,21 @@ +@@ -1614,6 +1622,21 @@ abi_ulong __unused2; }; @@ -62,7 +62,7 @@ Index: qemu/linux-user/syscall.c struct target_semid_ds { struct target_ipc_perm sem_perm; -@@ -1476,6 +1499,18 @@ +@@ -1626,6 +1649,18 @@ abi_ulong __unused4; }; @@ -81,7 +81,7 @@ Index: qemu/linux-user/syscall.c static inline abi_long target_to_host_ipc_perm(struct ipc_perm *host_ip, abi_ulong target_addr) { -@@ -1514,6 +1549,43 @@ +@@ -1664,6 +1699,43 @@ return 0; } @@ -125,7 +125,7 @@ Index: qemu/linux-user/syscall.c static inline abi_long target_to_host_semid_ds(struct semid_ds *host_sd, abi_ulong target_addr) { -@@ -1544,6 +1616,32 @@ +@@ -1694,6 +1766,32 @@ return 0; } @@ -158,7 +158,7 @@ Index: qemu/linux-user/syscall.c union semun { int val; struct semid_ds *buf; -@@ -1556,6 +1654,10 @@ +@@ -1706,6 +1804,10 @@ unsigned short int *array; }; @@ -169,7 +169,7 @@ Index: qemu/linux-user/syscall.c static inline abi_long target_to_host_semun(int cmd, union semun *host_su, abi_ulong target_addr, -@@ -1568,7 +1670,15 @@ +@@ -1718,7 +1820,15 @@ case IPC_SET: if (!lock_user_struct(VERIFY_READ, target_su, target_addr, 1)) return -TARGET_EFAULT; @@ -186,7 +186,7 @@ Index: qemu/linux-user/syscall.c host_su->buf = ds; unlock_user_struct(target_su, target_addr, 0); break; -@@ -1604,7 +1714,14 @@ +@@ -1754,7 +1864,14 @@ case IPC_SET: if (lock_user_struct(VERIFY_WRITE, target_su, target_addr, 0)) return -TARGET_EFAULT; @@ -202,7 +202,7 @@ Index: qemu/linux-user/syscall.c unlock_user_struct(target_su, target_addr, 1); break; case GETVAL: -@@ -1632,7 +1749,8 @@ +@@ -1782,7 +1899,8 @@ { union semun arg; struct semid_ds dsarg; @@ -212,7 +212,7 @@ Index: qemu/linux-user/syscall.c abi_long ret = 0; switch( cmd ) { -@@ -1661,13 +1779,23 @@ +@@ -1811,13 +1929,23 @@ ret = get_errno(semctl(first, second, cmd, arg)); host_to_target_semun(cmd,ptr,&arg,&dsarg); break; @@ -237,7 +237,7 @@ Index: qemu/linux-user/syscall.c } return ret; -@@ -1691,6 +1819,41 @@ +@@ -1841,6 +1969,41 @@ abi_ulong __unused5; }; @@ -279,7 +279,7 @@ Index: qemu/linux-user/syscall.c static inline abi_long target_to_host_msqid_ds(struct msqid_ds *host_md, abi_ulong target_addr) { -@@ -1919,11 +2082,59 @@ +@@ -2069,11 +2232,59 @@ case IPCOP_shmctl: switch(second) { case IPC_RMID: diff --git a/qemu-cvs-mmap-amd64.patch b/qemu-cvs-mmap-amd64.patch index 38791b4b..a0dc6da4 100644 --- a/qemu-cvs-mmap-amd64.patch +++ b/qemu-cvs-mmap-amd64.patch @@ -1,7 +1,7 @@ Index: qemu/linux-user/mmap.c ================================================================================ ---- qemu-0.9.1/linux-user/mmap.c -+++ qemu-0.9.1/linux-user/mmap.c +--- qemu/linux-user/mmap.c ++++ qemu/linux-user/mmap.c @@ -27,6 +27,10 @@ #include "qemu.h" @@ -12,8 +12,8 @@ Index: qemu/linux-user/mmap.c + //#define DEBUG_MMAP - /* NOTE: all the constants are the HOST ones, but addresses are target. */ -@@ -119,7 +123,7 @@ + #if defined(USE_NPTL) +@@ -211,7 +215,7 @@ if (prot1 == 0) { /* no page was there, so we allocate one */ void *p = mmap(host_start, qemu_host_page_size, prot, @@ -22,12 +22,12 @@ Index: qemu/linux-user/mmap.c if (p == MAP_FAILED) return -1; prot1 = prot; -@@ -422,7 +426,7 @@ - unsigned long host_addr; +@@ -551,7 +555,7 @@ + mmap_lock(); /* XXX: use 5 args syscall */ - host_addr = (long)mremap(g2h(old_addr), old_size, new_size, flags); + host_addr = (long)mremap(g2h(old_addr), old_size, new_size, flags | MAP_32BIT); - if (host_addr == -1) - return -1; - new_addr = h2g(host_addr); + if (host_addr == -1) { + new_addr = -1; + } else { diff --git a/qemu-cvs-mplayer.patch b/qemu-cvs-mplayer.patch deleted file mode 100644 index e324edda..00000000 --- a/qemu-cvs-mplayer.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: qemu/linux-user/mmap.c -================================================================================ ---- qemu/linux-user/mmap.c -+++ qemu/linux-user/mmap.c -@@ -49,8 +49,10 @@ - end = start + len; - if (end < start) - return -EINVAL; -- if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC)) -- return -EINVAL; -+ if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC)) { -+ gemu_log("WARNING: dirty hack in mprotect: setting prot (%#x -> %#x)\n", prot, prot & (PROT_READ | PROT_WRITE | PROT_EXEC)); -+ prot &= (PROT_READ | PROT_WRITE | PROT_EXEC); -+ } - if (len == 0) - return 0; - diff --git a/qemu-cvs-newpath.patch b/qemu-cvs-newpath.patch index 48d08627..63689e35 100644 --- a/qemu-cvs-newpath.patch +++ b/qemu-cvs-newpath.patch @@ -91,7 +91,7 @@ Index: qemu.bkp/linux-user/path.c - return root; -} - --/* This needs to be done after tree is stabalized (ie. no more reallocs!). */ +-/* This needs to be done after tree is stabilized (ie. no more reallocs!). */ -static void set_parents(struct pathelem *child, struct pathelem *parent) -{ - unsigned int i; diff --git a/qemu-cvs-noppcemb.patch b/qemu-cvs-noppcemb.patch deleted file mode 100644 index 449cce20..00000000 --- a/qemu-cvs-noppcemb.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: qemu-0.9.0/configure -================================================================================ ---- qemu-0.9.1/configure -+++ qemu-0.9.1/configure -@@ -526,7 +526,7 @@ - if test -z "$target_list" ; then - # these targets are portable - if [ "$softmmu" = "yes" ] ; then -- target_list="i386-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu m68k-softmmu sh4-softmmu sh4eb-softmmu cris-softmmu" -+ target_list="i386-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu m68k-softmmu sh4-softmmu sh4eb-softmmu cris-softmmu z80-softmmu" - fi - # the following are Linux specific - if [ "$linux_user" = "yes" ] ; then diff --git a/qemu-cvs-sched_getaffinity.patch b/qemu-cvs-sched_getaffinity.patch index 0ecbb3ce..e3c11e84 100644 --- a/qemu-cvs-sched_getaffinity.patch +++ b/qemu-cvs-sched_getaffinity.patch @@ -2,17 +2,17 @@ Index: qemu.bkp/linux-user/syscall.c ================================================================================ --- qemu/linux-user/syscall.c +++ qemu/linux-user/syscall.c -@@ -163,6 +163,7 @@ - #define __NR_sys_unlinkat __NR_unlinkat - #define __NR_sys_utimensat __NR_utimensat - #define __NR_sys_clone __NR_clone -+#define __NR_sys_sched_getaffinity __NR_sched_getaffinity +@@ -152,6 +152,7 @@ + } - #if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) - #define __NR__llseek __NR_lseek -@@ -234,6 +235,9 @@ - #ifdef __NR_sys_clone - _syscall5(int,sys_clone, int, flags, void *, child_stack, int *, parent_tidptr, void *, newtls, int *, child_tidptr) + ++#define __NR_sys_sched_getaffinity __NR_sched_getaffinity + #define __NR_sys_uname __NR_uname + #define __NR_sys_faccessat __NR_faccessat + #define __NR_sys_fchmodat __NR_fchmodat +@@ -242,6 +243,9 @@ + #if defined(TARGET_NR_tkill) && defined(__NR_tkill) + _syscall2(int,sys_tkill,int,tid,int,sig) #endif +#ifdef __NR_sys_sched_getaffinity +_syscall3(int,sys_sched_getaffinity,pid_t,pid,unsigned int,cpusetsize,void*,mask) @@ -20,8 +20,8 @@ Index: qemu.bkp/linux-user/syscall.c #ifdef __NR_exit_group _syscall1(int,exit_group,int,error_code) #endif -@@ -5254,6 +5258,17 @@ - break; +@@ -5857,6 +5861,17 @@ + break; #endif +#ifdef TARGET_NR_sched_getaffinity diff --git a/qemu-cvs-tls.patch b/qemu-cvs-tls.patch deleted file mode 100644 index e44c23aa..00000000 --- a/qemu-cvs-tls.patch +++ /dev/null @@ -1,141 +0,0 @@ -Index: qemu.bkp/linux-user/main.c -================================================================================ ---- qemu-0.9.1/linux-user/syscall.c -+++ qemu-0.9.1/linux-user/syscall.c -@@ -159,6 +159,7 @@ - #define __NR_sys_tkill __NR_tkill - #define __NR_sys_unlinkat __NR_unlinkat - #define __NR_sys_utimensat __NR_utimensat -+#define __NR_sys_clone __NR_clone - - #if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) - #define __NR__llseek __NR_lseek -@@ -227,6 +228,9 @@ - #if defined(TARGET_NR_tkill) && defined(__NR_tkill) - _syscall2(int,sys_tkill,int,tid,int,sig) - #endif -+#ifdef __NR_sys_clone -+_syscall5(int,sys_clone, int, flags, void *, child_stack, int *, parent_tidptr, void *, newtls, int *, child_tidptr) -+#endif - #ifdef __NR_exit_group - _syscall1(int,exit_group,int,error_code) - #endif -@@ -2705,15 +2783,20 @@ - - /* do_fork() Must return host values and target errnos (unlike most - do_*() functions). */ --int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp) -+int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp, abi_ulong parent_tidptr, abi_ulong newtls, abi_ulong child_tidptr) - { - int ret; -+ unsigned long parent_tid = gettid(); - TaskState *ts; - uint8_t *new_stack; - CPUState *new_env; -+#if defined(TARGET_I386) -+ uint64_t *new_gdt_table; -+#endif - - if (flags & CLONE_VM) { - ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE); -+ if (!ts) return -ENOMEM; - memset(ts, 0, sizeof(TaskState)); - new_stack = ts->stack; - ts->used = 1; -@@ -2725,6 +2808,27 @@ - #if defined(TARGET_I386) - if (!newsp) - newsp = env->regs[R_ESP]; -+ new_gdt_table = malloc(9 * 8); -+ if (!new_gdt_table) { -+ free(new_env); -+ return -ENOMEM; -+ } -+ /* Copy main GDT table from parent, but clear TLS entries */ -+ memcpy(new_gdt_table, g2h(env->gdt.base), 6 * 8); -+ memset(&new_gdt_table[6], 0, 3 * 8); -+ new_env->gdt.base = h2g(new_gdt_table); -+ if (flags & CLONE_SETTLS) { -+ ret = do_set_thread_area(new_env, newtls); -+ if (ret) { -+ free(new_gdt_table); -+ free(new_env); -+ return ret; -+ } -+ } -+ -+ cpu_x86_load_seg(new_env, R_FS, new_env->segs[R_FS].selector); -+ cpu_x86_load_seg(new_env, R_GS, new_env->segs[R_GS].selector); -+ - new_env->regs[R_ESP] = newsp; - new_env->regs[R_EAX] = 0; - #elif defined(TARGET_ARM) -@@ -2782,15 +2886,27 @@ - #endif - new_env->opaque = ts; - #ifdef __ia64__ -- ret = __clone2(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env); -+ ret = __clone2(clone_func, new_stack + NEW_STACK_SIZE, flags & ~(CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID), new_env); - #else -- ret = clone(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env); -+ ret = clone(clone_func, new_stack + NEW_STACK_SIZE, flags & ~(CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID), new_env); - #endif - } else { - /* if no CLONE_VM, we consider it is a fork */ -- if ((flags & ~CSIGNAL) != 0) -- return -EINVAL; -- ret = fork(); -+ ret = sys_clone(flags & ~(CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID), 0, g2h(parent_tidptr), NULL, g2h(child_tidptr)); -+ } -+ /* Store child thread ID at location parent_tidptr in parent and child memory. -+ Currently this is only done in client memory */ -+ if(flags & CLONE_PARENT_SETTID) { -+ put_user_u32(parent_tidptr, parent_tid); -+ } -+ -+ /* Store child thread ID at location child_tidptr in child memory. */ -+ if(flags & CLONE_CHILD_SETTID) { -+ if(ret==0) { /* only in client memory for fork() */ -+ put_user_u32(child_tidptr, gettid()); -+ } else if(flags & CLONE_VM) { /* real threads need it too */ -+ put_user_u32(child_tidptr, ret); -+ } - } - return ret; - } -@@ -3073,7 +3189,7 @@ - _mcleanup(); - #endif - gdb_exit(cpu_env, arg1); -- /* XXX: should free thread stack and CPU env */ -+ /* XXX: should free thread stack, GDT and CPU env */ - _exit(arg1); - ret = 0; /* avoid warning */ - break; -@@ -3115,7 +3231,7 @@ - ret = do_brk(arg1); - break; - case TARGET_NR_fork: -- ret = get_errno(do_fork(cpu_env, SIGCHLD, 0)); -+ ret = get_errno(do_fork(cpu_env, SIGCHLD, 0, 0,0,0)); - break; - #ifdef TARGET_NR_waitpid - case TARGET_NR_waitpid: -@@ -4477,7 +4593,7 @@ - ret = get_errno(fsync(arg1)); - break; - case TARGET_NR_clone: -- ret = get_errno(do_fork(cpu_env, arg1, arg2)); -+ ret = get_errno(do_fork(cpu_env, arg1, arg2,arg3,arg4,arg5)); - break; - #ifdef __NR_exit_group - /* new thread calls */ -@@ -4897,7 +5013,7 @@ - #endif - #ifdef TARGET_NR_vfork - case TARGET_NR_vfork: -- ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0)); -+ ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0, 0,0,0)); - break; - #endif - #ifdef TARGET_NR_ugetrlimit diff --git a/qemu-img-vmdk-scsi.patch b/qemu-img-vmdk-scsi.patch index 10e27227..9939d0d3 100644 --- a/qemu-img-vmdk-scsi.patch +++ b/qemu-img-vmdk-scsi.patch @@ -1,8 +1,8 @@ Index: qemu-0.9.1/block-vmdk.c -=================================================================== ---- qemu-0.9.1.orig/block-vmdk.c -+++ qemu-0.9.1/block-vmdk.c -@@ -717,7 +717,7 @@ static int vmdk_create(const char *filen +================================================================================ +--- qemu/block-vmdk.c ++++ qemu/block-vmdk.c +@@ -719,7 +719,7 @@ "ddb.geometry.cylinders = \"%lu\"\n" "ddb.geometry.heads = \"16\"\n" "ddb.geometry.sectors = \"63\"\n" @@ -11,7 +11,7 @@ Index: qemu-0.9.1/block-vmdk.c char desc[1024]; const char *real_filename, *temp_str; -@@ -790,7 +790,9 @@ static int vmdk_create(const char *filen +@@ -792,7 +792,9 @@ if ((temp_str = strrchr(real_filename, ':')) != NULL) real_filename = temp_str + 1; sprintf(desc, desc_template, time(NULL), (unsigned long)total_size, @@ -22,10 +22,8 @@ Index: qemu-0.9.1/block-vmdk.c /* write the descriptor */ lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET); -Index: qemu-0.9.1/block_int.h -=================================================================== ---- qemu-0.9.1.orig/block_int.h -+++ qemu-0.9.1/block_int.h +--- qemu/block_int.h ++++ qemu/block_int.h @@ -29,6 +29,7 @@ #define BLOCK_FLAG_ENCRYPT 1 #define BLOCK_FLAG_COMPRESS 2 @@ -34,23 +32,21 @@ Index: qemu-0.9.1/block_int.h struct BlockDriver { const char *format_name; -Index: qemu-0.9.1/qemu-img.c -=================================================================== ---- qemu-0.9.1.orig/qemu-img.c -+++ qemu-0.9.1/qemu-img.c -@@ -88,9 +88,9 @@ static void help(void) +--- qemu/qemu-img.c ++++ qemu/qemu-img.c +@@ -53,9 +53,9 @@ "QEMU disk image utility\n" "\n" "Command syntax:\n" - " create [-e] [-6] [-b base_image] [-f fmt] filename [size]\n" + " create [-e] [-s] [-6] [-b base_image] [-f fmt] filename [size]\n" " commit [-f fmt] filename\n" -- " convert [-c] [-e] [-6] [-f fmt] filename [filename2 [...]] [-O output_fmt] output_filename\n" -+ " convert [-c] [-e] [-s] [-6] [-f fmt] [-O output_fmt] filename [filename2 [...]] output_filename\n" +- " convert [-c] [-e] [-6] [-f fmt] [-O output_fmt] [-B output_base_image] filename [filename2 [...]] output_filename\n" ++ " convert [-c] [-e] [-s] [-6] [-f fmt] [-O output_fmt] [-B output_base_image] filename [filename2 [...]] output_filename\n" " info [-f fmt] filename\n" "\n" "Command parameters:\n" -@@ -104,6 +104,7 @@ static void help(void) +@@ -73,6 +73,7 @@ " 'output_fmt' is the destination format\n" " '-c' indicates that target image must be compressed (qcow format only)\n" " '-e' indicates that the target image must be encrypted (qcow format only)\n" @@ -58,7 +54,7 @@ Index: qemu-0.9.1/qemu-img.c " '-6' indicates that the target image must use compatibility level 6 (vmdk format only)\n" ); printf("\nSupported format:"); -@@ -242,7 +243,7 @@ static int img_create(int argc, char **a +@@ -211,7 +212,7 @@ flags = 0; for(;;) { @@ -67,7 +63,7 @@ Index: qemu-0.9.1/qemu-img.c if (c == -1) break; switch(c) { -@@ -258,6 +259,9 @@ static int img_create(int argc, char **a +@@ -227,6 +228,9 @@ case 'e': flags |= BLOCK_FLAG_ENCRYPT; break; @@ -77,7 +73,7 @@ Index: qemu-0.9.1/qemu-img.c case '6': flags |= BLOCK_FLAG_COMPAT6; break; -@@ -293,6 +297,8 @@ static int img_create(int argc, char **a +@@ -262,6 +266,8 @@ error("Unknown file format '%s'", fmt); printf("Formatting '%s', fmt=%s", filename, fmt); @@ -86,16 +82,16 @@ Index: qemu-0.9.1/qemu-img.c if (flags & BLOCK_FLAG_ENCRYPT) printf(", encrypted"); if (flags & BLOCK_FLAG_COMPAT6) -@@ -421,7 +427,7 @@ static int img_convert(int argc, char ** - out_fmt = "raw"; +@@ -398,7 +404,7 @@ + out_baseimg = NULL; flags = 0; for(;;) { -- c = getopt(argc, argv, "f:O:hce6"); -+ c = getopt(argc, argv, "f:O:hces6"); +- c = getopt(argc, argv, "f:O:B:hce6"); ++ c = getopt(argc, argv, "f:O:B:hces6"); if (c == -1) break; switch(c) { -@@ -440,6 +446,9 @@ static int img_convert(int argc, char ** +@@ -420,6 +426,9 @@ case 'e': flags |= BLOCK_FLAG_ENCRYPT; break; @@ -105,7 +101,7 @@ Index: qemu-0.9.1/qemu-img.c case '6': flags |= BLOCK_FLAG_COMPAT6; break; -@@ -471,6 +480,8 @@ static int img_convert(int argc, char ** +@@ -454,6 +463,8 @@ error("Compression not supported for this file format"); if (flags & BLOCK_FLAG_ENCRYPT && drv != &bdrv_qcow && drv != &bdrv_qcow2) error("Encryption not supported for this file format"); diff --git a/qemu-m68k.diff b/qemu-m68k.diff deleted file mode 100644 index 36aa4bab..00000000 --- a/qemu-m68k.diff +++ /dev/null @@ -1,2726 +0,0 @@ -Index: gdbstub.c -================================================================================ ---- gdbstub.c -+++ gdbstub.c -@@ -558,7 +558,9 @@ - for (i = 0; i < 8; i++) { - u.d = env->fregs[i]; - *(uint32_t *)ptr = tswap32(u.l.upper); -+ ptr += 4; - *(uint32_t *)ptr = tswap32(u.l.lower); -+ ptr += 8; - } - /* FP control regs (not implemented). */ - memset (ptr, 0, 3 * 4); -@@ -592,7 +594,9 @@ - ColdFire has 8-bit double precision registers. */ - for (i = 0; i < 8; i++) { - u.l.upper = tswap32(*(uint32_t *)ptr); -+ ptr += 4; - u.l.lower = tswap32(*(uint32_t *)ptr); -+ ptr += 8; - env->fregs[i] = u.d; - } - /* FP control regs (not implemented). */ ---- target-m68k/cpu.h -+++ target-m68k/cpu.h -@@ -89,6 +89,9 @@ - uint32_t div1; - uint32_t div2; - -+ /* Upper 32 bits of a 64bit operand for quad MUL/DIV. */ -+ uint32_t quadh; -+ - /* MMU status. */ - struct { - uint32_t ar; -@@ -135,14 +138,26 @@ - CC_OP_DYNAMIC, /* Use env->cc_op */ - CC_OP_FLAGS, /* CC_DEST = CVZN, CC_SRC = unused */ - CC_OP_LOGIC, /* CC_DEST = result, CC_SRC = unused */ -+ CC_OP_ADDB, /* CC_DEST = result, CC_SRC = source */ -+ CC_OP_ADDW, /* CC_DEST = result, CC_SRC = source */ - CC_OP_ADD, /* CC_DEST = result, CC_SRC = source */ -+ CC_OP_SUBB, /* CC_DEST = result, CC_SRC = source */ -+ CC_OP_SUBW, /* CC_DEST = result, CC_SRC = source */ - CC_OP_SUB, /* CC_DEST = result, CC_SRC = source */ -- CC_OP_CMPB, /* CC_DEST = result, CC_SRC = source */ -- CC_OP_CMPW, /* CC_DEST = result, CC_SRC = source */ -+ CC_OP_ADDXB, /* CC_DEST = result, CC_SRC = source */ -+ CC_OP_ADDXW, /* CC_DEST = result, CC_SRC = source */ - CC_OP_ADDX, /* CC_DEST = result, CC_SRC = source */ -+ CC_OP_SUBXB, /* CC_DEST = result, CC_SRC = source */ -+ CC_OP_SUBXW, /* CC_DEST = result, CC_SRC = source */ - CC_OP_SUBX, /* CC_DEST = result, CC_SRC = source */ -+ CC_OP_SHLB, /* CC_DEST = source, CC_SRC = shift */ -+ CC_OP_SHLW, /* CC_DEST = source, CC_SRC = shift */ - CC_OP_SHL, /* CC_DEST = source, CC_SRC = shift */ -+ CC_OP_SHRB, /* CC_DEST = source, CC_SRC = shift */ -+ CC_OP_SHRW, /* CC_DEST = source, CC_SRC = shift */ - CC_OP_SHR, /* CC_DEST = source, CC_SRC = shift */ -+ CC_OP_SARB, /* CC_DEST = source, CC_SRC = shift */ -+ CC_OP_SARW, /* CC_DEST = source, CC_SRC = shift */ - CC_OP_SAR, /* CC_DEST = source, CC_SRC = shift */ - }; - -@@ -191,6 +206,12 @@ - ISA revisions mentioned. */ - - enum m68k_features { -+ M68K_FEATURE_M68000, -+ M68K_FEATURE_M68020, -+ M68K_FEATURE_M68020_40, /* Features common to 68020 - 68040 */ -+ M68K_FEATURE_M68040, -+ M68K_FEATURE_M68020_60, /* Feature common to 68020 - 68060 */ -+ M68K_FEATURE_M68060, - M68K_FEATURE_CF_ISA_A, - M68K_FEATURE_CF_ISA_B, /* (ISA B or C). */ - M68K_FEATURE_CF_ISA_APLUSC, /* BIT/BITREV, FF1, STRLDSR (ISA A+ or C). */ -@@ -201,7 +222,9 @@ - M68K_FEATURE_CF_EMAC_B, /* Revision B EMAC (dual accumulate). */ - M68K_FEATURE_USP, /* User Stack Pointer. (ISA A+, B or C). */ - M68K_FEATURE_EXT_FULL, /* 68020+ full extension word. */ -- M68K_FEATURE_WORD_INDEX /* word sized address index registers. */ -+ M68K_FEATURE_WORD_INDEX, /* word sized address index registers. */ -+ M68K_FEATURE_SCALED_INDEX, /* scaled address index registers. */ -+ M68K_FEATURE_FPU - }; - - static inline int m68k_feature(CPUM68KState *env, int feature) -@@ -212,8 +235,8 @@ - void register_m68k_insns (CPUM68KState *env); - - #ifdef CONFIG_USER_ONLY --/* Linux uses 8k pages. */ --#define TARGET_PAGE_BITS 13 -+/* Linux uses 4k pages. */ -+#define TARGET_PAGE_BITS 12 - #else - /* Smallest TLB entry size is 1k. */ - #define TARGET_PAGE_BITS 10 ---- target-m68k/exec.h -+++ target-m68k/exec.h -@@ -48,6 +48,10 @@ - float64 helper_sub_cmpf64(CPUM68KState *env, float64 src0, float64 src1); - void helper_movec(CPUM68KState *env, int reg, uint32_t val); - -+extern const uint8_t rox8_table[64]; -+extern const uint8_t rox16_table[64]; -+extern const uint8_t rox32_table[64]; -+ - void cpu_loop_exit(void); - - static inline int cpu_halted(CPUState *env) { ---- target-m68k/helper.c -+++ target-m68k/helper.c -@@ -27,6 +27,10 @@ - #include "exec-all.h" - - enum m68k_cpuid { -+ M68K_CPUID_M68000, -+ M68K_CPUID_M68020, -+ M68K_CPUID_M68040, -+ M68K_CPUID_M68060, - M68K_CPUID_M5206, - M68K_CPUID_M5208, - M68K_CPUID_CFV4E, -@@ -39,6 +43,10 @@ - }; - - static m68k_def_t m68k_cpu_defs[] = { -+ {"m68000", M68K_CPUID_M68000}, -+ {"m68020", M68K_CPUID_M68020}, -+ {"m68040", M68K_CPUID_M68040}, -+ {"m68060", M68K_CPUID_M68060}, - {"m5206", M68K_CPUID_M5206}, - {"m5208", M68K_CPUID_M5208}, - {"cfv4e", M68K_CPUID_CFV4E}, -@@ -63,12 +71,41 @@ - return 1; - - switch (def->id) { -+ case M68K_CPUID_M68000: -+ m68k_set_feature(env, M68K_FEATURE_M68000); -+ m68k_set_feature(env, M68K_FEATURE_USP); -+ m68k_set_feature(env, M68K_FEATURE_WORD_INDEX); -+ break; -+ case M68K_CPUID_M68020: -+ case M68K_CPUID_M68040: -+ m68k_set_feature(env, M68K_FEATURE_M68000); -+ m68k_set_feature(env, M68K_FEATURE_M68020_40); -+ m68k_set_feature(env, M68K_FEATURE_M68020_60); -+ m68k_set_feature(env, M68K_FEATURE_USP); -+ m68k_set_feature(env, M68K_FEATURE_BRAL); -+ m68k_set_feature(env, M68K_FEATURE_EXT_FULL); -+ m68k_set_feature(env, M68K_FEATURE_WORD_INDEX); -+ m68k_set_feature(env, M68K_FEATURE_SCALED_INDEX); -+ m68k_set_feature(env, M68K_FEATURE_FPU); -+ break; -+ case M68K_CPUID_M68060: -+ m68k_set_feature(env, M68K_FEATURE_M68000); -+ m68k_set_feature(env, M68K_FEATURE_M68020_60); -+ m68k_set_feature(env, M68K_FEATURE_USP); -+ m68k_set_feature(env, M68K_FEATURE_BRAL); -+ m68k_set_feature(env, M68K_FEATURE_EXT_FULL); -+ m68k_set_feature(env, M68K_FEATURE_WORD_INDEX); -+ m68k_set_feature(env, M68K_FEATURE_SCALED_INDEX); -+ m68k_set_feature(env, M68K_FEATURE_FPU); -+ break; - case M68K_CPUID_M5206: - m68k_set_feature(env, M68K_FEATURE_CF_ISA_A); -+ m68k_set_feature(env, M68K_FEATURE_SCALED_INDEX); - break; - case M68K_CPUID_M5208: - m68k_set_feature(env, M68K_FEATURE_CF_ISA_A); - m68k_set_feature(env, M68K_FEATURE_CF_ISA_APLUSC); -+ m68k_set_feature(env, M68K_FEATURE_SCALED_INDEX); - m68k_set_feature(env, M68K_FEATURE_BRAL); - m68k_set_feature(env, M68K_FEATURE_CF_EMAC); - m68k_set_feature(env, M68K_FEATURE_USP); -@@ -76,12 +113,19 @@ - case M68K_CPUID_CFV4E: - m68k_set_feature(env, M68K_FEATURE_CF_ISA_A); - m68k_set_feature(env, M68K_FEATURE_CF_ISA_B); -+ m68k_set_feature(env, M68K_FEATURE_SCALED_INDEX); - m68k_set_feature(env, M68K_FEATURE_BRAL); - m68k_set_feature(env, M68K_FEATURE_CF_FPU); - m68k_set_feature(env, M68K_FEATURE_CF_EMAC); - m68k_set_feature(env, M68K_FEATURE_USP); - break; - case M68K_CPUID_ANY: -+ m68k_set_feature(env, M68K_FEATURE_M68000); -+ m68k_set_feature(env, M68K_FEATURE_M68020); -+ m68k_set_feature(env, M68K_FEATURE_M68020_40); -+ m68k_set_feature(env, M68K_FEATURE_M68040); -+ m68k_set_feature(env, M68K_FEATURE_M68020_60); -+ m68k_set_feature(env, M68K_FEATURE_M68060); - m68k_set_feature(env, M68K_FEATURE_CF_ISA_A); - m68k_set_feature(env, M68K_FEATURE_CF_ISA_B); - m68k_set_feature(env, M68K_FEATURE_CF_ISA_APLUSC); -@@ -93,6 +137,7 @@ - m68k_set_feature(env, M68K_FEATURE_CF_EMAC_B); - m68k_set_feature(env, M68K_FEATURE_USP); - m68k_set_feature(env, M68K_FEATURE_EXT_FULL); -+ m68k_set_feature(env, M68K_FEATURE_SCALED_INDEX); - m68k_set_feature(env, M68K_FEATURE_WORD_INDEX); - break; - } -@@ -102,6 +147,42 @@ - return 0; - } - -+/* modulo 33 table */ -+const uint8_t rox32_table[64] = { -+ 0, 1, 2, 3, 4, 5, 6, 7, -+ 8, 9,10,11,12,13,14,15, -+ 16,17,18,19,20,21,22,23, -+ 24,25,26,27,28,29,30,31, -+ 32, 0, 1, 2, 3, 4, 5, 6, -+ 7, 8, 9,10,11,12,13,14, -+ 15,16,17,18,19,20,21,22, -+ 23,24,25,26,27,28,29,30, -+}; -+ -+/* modulo 17 table */ -+const uint8_t rox16_table[64] = { -+ 0, 1, 2, 3, 4, 5, 6, 7, -+ 8, 9,10,11,12,13,14,15, -+ 16, 0, 1, 2, 3, 4, 5, 6, -+ 7, 8, 9,10,11,12,13,14, -+ 15,16, 0, 1, 2, 3, 4, 5, -+ 6, 7, 8, 9,10,11,12,13, -+ 14,15,16, 0, 1, 2, 3, 4, -+ 5, 6, 7, 8, 9,10,11,12, -+}; -+ -+/* modulo 9 table */ -+const uint8_t rox8_table[64] = { -+ 0, 1, 2, 3, 4, 5, 6, 7, -+ 8, 0, 1, 2, 3, 4, 5, 6, -+ 7, 8, 0, 1, 2, 3, 4, 5, -+ 6, 7, 8, 0, 1, 2, 3, 4, -+ 5, 6, 7, 8, 0, 1, 2, 3, -+ 4, 5, 6, 7, 8, 0, 1, 2, -+ 3, 4, 5, 6, 7, 8, 0, 1, -+ 2, 3, 4, 5, 6, 7, 8, 0, -+}; -+ - void cpu_m68k_flush_flags(CPUM68KState *env, int cc_op) - { - int flags; -@@ -127,6 +208,66 @@ - flags |= CCF_V; \ - } while (0) - -+#define SET_FLAGS_ADD(type, utype) do { \ -+ SET_NZ((type)dest); \ -+ if ((utype) dest < (utype) src) \ -+ flags |= CCF_C; \ -+ tmp = dest - src; \ -+ if ((1u << (sizeof(type) * 8 - 1)) & (src ^ dest) & (tmp ^ src)) \ -+ flags |= CCF_V; \ -+ } while (0) -+ -+#define SET_FLAGS_ADDX(type, utype) do { \ -+ SET_NZ((type)dest); \ -+ if ((utype) dest <= (utype) src) \ -+ flags |= CCF_C; \ -+ tmp = dest - src - 1; \ -+ if ((1u << (sizeof(type) * 8 - 1)) & (src ^ dest) & (tmp ^ src)) \ -+ flags |= CCF_V; \ -+ } while (0) -+ -+#define SET_FLAGS_SUBX(type, utype) do { \ -+ SET_NZ((type)dest); \ -+ tmp = dest + src + 1; \ -+ if ((utype) dest <= (utype) src) \ -+ flags |= CCF_C; \ -+ if ((1u << (sizeof(type) * 8 - 1)) & (tmp ^ dest) & (tmp ^ src)) \ -+ flags |= CCF_V; \ -+ } while (0) -+ -+#define SET_FLAGS_SHL(type) do { \ -+ if (src >= sizeof(type) * 8) { \ -+ SET_NZ(0); \ -+ } else { \ -+ tmp = dest << src; \ -+ SET_NZ((type)tmp); \ -+ } \ -+ if (src && src <= sizeof(type) * 8 && (dest & (1 << (sizeof(type) * 8 - src)))) \ -+ flags |= CCF_C; \ -+ } while (0) -+ -+#define SET_FLAGS_SHR(type) do { \ -+ if (src >= sizeof(type) * 8) { \ -+ SET_NZ(0); \ -+ } else { \ -+ tmp = dest >> src; \ -+ SET_NZ((type)tmp); \ -+ } \ -+ if (src && src <= sizeof(type) * 8 && ((dest >> (src - 1)) & 1)) \ -+ flags |= CCF_C; \ -+ } while (0) -+ -+#define SET_FLAGS_SAR(type) do { \ -+ if (src >= sizeof(type) * 8) { \ -+ SET_NZ(-((type)dest < 0)); \ -+ } else { \ -+ tmp = dest >> src; \ -+ SET_NZ((type)tmp); \ -+ } \ -+ if (src && src <= sizeof(type) * 8 && (((type)dest >> (src - 1)) & 1)) \ -+ flags |= CCF_C; \ -+ } while (0) -+ - flags = 0; - src = env->cc_src; - dest = env->cc_dest; -@@ -137,68 +278,68 @@ - case CC_OP_LOGIC: - SET_NZ(dest); - break; -+ case CC_OP_ADDB: -+ SET_FLAGS_ADD(int8_t, uint8_t); -+ break; -+ case CC_OP_ADDW: -+ SET_FLAGS_ADD(int16_t, uint16_t); -+ break; - case CC_OP_ADD: -- SET_NZ(dest); -- if (dest < src) -- flags |= CCF_C; -- tmp = dest - src; -- if (HIGHBIT & (src ^ dest) & ~(tmp ^ src)) -- flags |= CCF_V; -+ SET_FLAGS_ADD(int32_t, uint32_t); -+ break; -+ case CC_OP_SUBB: -+ SET_FLAGS_SUB(int8_t, uint8_t); -+ break; -+ case CC_OP_SUBW: -+ SET_FLAGS_SUB(int16_t, uint16_t); - break; - case CC_OP_SUB: - SET_FLAGS_SUB(int32_t, uint32_t); - break; -- case CC_OP_CMPB: -- SET_FLAGS_SUB(int8_t, uint8_t); -+ case CC_OP_ADDXB: -+ SET_FLAGS_ADDX(int8_t, uint8_t); - break; -- case CC_OP_CMPW: -- SET_FLAGS_SUB(int16_t, uint16_t); -+ case CC_OP_ADDXW: -+ SET_FLAGS_ADDX(int16_t, uint16_t); - break; - case CC_OP_ADDX: -- SET_NZ(dest); -- if (dest <= src) -- flags |= CCF_C; -- tmp = dest - src - 1; -- if (HIGHBIT & (src ^ dest) & ~(tmp ^ src)) -- flags |= CCF_V; -+ SET_FLAGS_ADDX(int32_t, uint32_t); -+ break; -+ case CC_OP_SUBXB: -+ SET_FLAGS_SUBX(int8_t, uint8_t); -+ break; -+ case CC_OP_SUBXW: -+ SET_FLAGS_SUBX(int16_t, uint16_t); - break; - case CC_OP_SUBX: -- SET_NZ(dest); -- tmp = dest + src + 1; -- if (tmp <= src) -- flags |= CCF_C; -- if (HIGHBIT & (tmp ^ dest) & (tmp ^ src)) -- flags |= CCF_V; -+ SET_FLAGS_SUBX(int32_t, uint32_t); -+ break; -+ case CC_OP_SHLB: -+ SET_FLAGS_SHL(int8_t); -+ break; -+ case CC_OP_SHLW: -+ SET_FLAGS_SHL(int16_t); - break; - case CC_OP_SHL: -- if (src >= 32) { -- SET_NZ(0); -- } else { -- tmp = dest << src; -- SET_NZ(tmp); -- } -- if (src && src <= 32 && (dest & (1 << (32 - src)))) -- flags |= CCF_C; -+ SET_FLAGS_SHL(int32_t); -+ break; -+ case CC_OP_SHRB: -+ SET_FLAGS_SHR(int8_t); -+ break; -+ case CC_OP_SHRW: -+ SET_FLAGS_SHR(int16_t); - break; - case CC_OP_SHR: -- if (src >= 32) { -- SET_NZ(0); -- } else { -- tmp = dest >> src; -- SET_NZ(tmp); -- } -- if (src && src <= 32 && ((dest >> (src - 1)) & 1)) -- flags |= CCF_C; -+ SET_FLAGS_SHR(int32_t); -+ break; -+ case CC_OP_SARB: -+ SET_FLAGS_SAR(int8_t); -+ break; -+ case CC_OP_SARW: -+ SET_FLAGS_SAR(int16_t); - break; - case CC_OP_SAR: -- if (src >= 32) { -- SET_NZ(-1); -- } else { -- tmp = (int32_t)dest >> src; -- SET_NZ(tmp); -- } -- if (src && src <= 32 && (((int32_t)dest >> (src - 1)) & 1)) -- flags |= CCF_C; -+ SET_FLAGS_SAR(int32_t); - break; - default: - cpu_abort(env, "Bad CC_OP %d", cc_op); ---- target-m68k/op-hacks.h -+++ target-m68k/op-hacks.h -@@ -89,6 +89,36 @@ - gen_op_sar_cc(val, gen_im32(shift)); - } - -+static inline void gen_op_shl8_im_cc(int dest, int src, int shift) -+{ -+ gen_op_shl8_cc(dest, src, gen_im32(shift)); -+} -+ -+static inline void gen_op_shr8_im_cc(int dest, int src, int shift) -+{ -+ gen_op_shr8_cc(dest, src, gen_im32(shift)); -+} -+ -+static inline void gen_op_sar8_im_cc(int dest, int src, int shift) -+{ -+ gen_op_sar8_cc(dest, src, gen_im32(shift)); -+} -+ -+static inline void gen_op_shl16_im_cc(int dest, int src, int shift) -+{ -+ gen_op_shl16_cc(dest, src, gen_im32(shift)); -+} -+ -+static inline void gen_op_shr16_im_cc(int dest, int src, int shift) -+{ -+ gen_op_shr16_cc(dest, src, gen_im32(shift)); -+} -+ -+static inline void gen_op_sar16_im_cc(int dest, int src, int shift) -+{ -+ gen_op_sar16_cc(dest, src, gen_im32(shift)); -+} -+ - #ifdef USE_DIRECT_JUMP - #define TBPARAM(x) - #else ---- target-m68k/op.c -+++ target-m68k/op.c -@@ -136,6 +136,76 @@ - FORCE_RET(); - } - -+OP(mulu32_cc) -+{ -+ uint32_t op2 = get_op(PARAM2); -+ uint32_t op3 = get_op(PARAM3); -+ uint64_t result = (uint32_t)op2 * op3; -+ uint32_t flags; -+ set_op(PARAM1, result); -+ flags = 0; -+ if (result >> 32) -+ flags |= CCF_V; -+ if ((uint32_t)result == 0) -+ flags |= CCF_Z; -+ if ((int32_t)result < 0) -+ flags |= CCF_N; -+ env->cc_dest = flags; -+ FORCE_RET(); -+} -+ -+OP(muls32_cc) -+{ -+ int32_t op2 = get_op(PARAM2); -+ int32_t op3 = get_op(PARAM3); -+ int64_t result = (int32_t)op2 * op3; -+ uint32_t flags; -+ set_op(PARAM1, result); -+ flags = 0; -+ if (result != (int64_t)(int32_t)result) -+ flags |= CCF_V; -+ if ((uint32_t)result == 0) -+ flags |= CCF_Z; -+ if ((int32_t)result < 0) -+ flags |= CCF_N; -+ env->cc_dest = flags; -+ FORCE_RET(); -+} -+ -+OP(mulu64) -+{ -+ uint32_t op2 = get_op(PARAM2); -+ uint32_t op3 = get_op(PARAM3); -+ uint64_t result = (uint64_t)op2 * op3; -+ uint32_t flags; -+ set_op(PARAM1, result); -+ env->quadh = result >> 32; -+ flags = 0; -+ if (result == 0) -+ flags |= CCF_Z; -+ if ((int64_t)result < 0) -+ flags |= CCF_N; -+ env->cc_dest = flags; -+ FORCE_RET(); -+} -+ -+OP(muls64) -+{ -+ int32_t op2 = get_op(PARAM2); -+ int32_t op3 = get_op(PARAM3); -+ int64_t result = (uint64_t)op2 * op3; -+ uint32_t flags; -+ set_op(PARAM1, result); -+ env->quadh = result >> 32; -+ flags = 0; -+ if (result == 0) -+ flags |= CCF_Z; -+ if (result < 0) -+ flags |= CCF_N; -+ env->cc_dest = flags; -+ FORCE_RET(); -+} -+ - OP(not32) - { - uint32_t arg = get_op(PARAM2); -@@ -180,6 +250,22 @@ - FORCE_RET(); - } - -+OP(bfffo) -+{ -+ uint32_t arg = get_op(PARAM2); -+ int width = get_op(PARAM3); -+ int n; -+ uint32_t mask; -+ mask = 0x80000000; -+ for (n = 0; n < width; n++) { -+ if (arg & mask) -+ break; -+ mask >>= 1; -+ } -+ set_op(PARAM1, n); -+ FORCE_RET(); -+} -+ - OP(subx_cc) - { - uint32_t op1 = get_op(PARAM1); -@@ -253,14 +339,60 @@ - FORCE_RET(); - } - -+OP(shl8_cc) -+{ -+ uint8_t op2 = get_op(PARAM2); -+ uint8_t op3 = get_op(PARAM3); -+ uint8_t result; -+ if (op3 < 8) -+ result = op2 << op3; -+ else -+ result = 0; -+ set_op(PARAM1, result); -+ if (op3 > 0) { -+ if (op3 <= 8) -+ env->cc_x = (op2 << (op3 - 1)) & 0x80; -+ else -+ env->cc_x = 0; -+ } -+ FORCE_RET(); -+} -+ -+OP(shl16_cc) -+{ -+ uint16_t op2 = get_op(PARAM2); -+ uint16_t op3 = get_op(PARAM3); -+ uint16_t result; -+ if (op3 < 16) -+ result = op2 << op3; -+ else -+ result = 0; -+ set_op(PARAM1, result); -+ if (op3 > 0) { -+ if (op3 <= 16) -+ env->cc_x = (op2 << (op3 - 1)) & 0x8000; -+ else -+ env->cc_x = 0; -+ } -+ FORCE_RET(); -+} -+ - OP(shl_cc) - { - uint32_t op1 = get_op(PARAM1); - uint32_t op2 = get_op(PARAM2); - uint32_t result; -- result = op1 << op2; -+ if (op2 < 32) -+ result = op1 << op2; -+ else -+ result = 0; - set_op(PARAM1, result); -- env->cc_x = (op1 << (op2 - 1)) & 1; -+ if (op2 > 0) { -+ if (op2 <= 32) -+ env->cc_x = (op1 << (op2 - 1)) & 0x80000000; -+ else -+ env->cc_x = 0; -+ } - FORCE_RET(); - } - -@@ -279,9 +411,55 @@ - uint32_t op1 = get_op(PARAM1); - uint32_t op2 = get_op(PARAM2); - uint32_t result; -- result = op1 >> op2; -+ if (op2 < 32) -+ result = op1 >> op2; -+ else -+ result = 0; - set_op(PARAM1, result); -- env->cc_x = (op1 >> (op2 - 1)) & 1; -+ if (op2 > 0) { -+ if (op2 <= 32) -+ env->cc_x = (op1 >> (op2 - 1)) & 1; -+ else -+ env->cc_x = 0; -+ } -+ FORCE_RET(); -+} -+ -+OP(shr8_cc) -+{ -+ uint8_t op2 = get_op(PARAM2); -+ uint8_t op3 = get_op(PARAM3); -+ uint8_t result; -+ if (op3 < 8) -+ result = op2 >> op3; -+ else -+ result = 0; -+ set_op(PARAM1, result); -+ if (op3 > 0) { -+ if (op3 <= 8) -+ env->cc_x = (op2 >> (op3 - 1)) & 1; -+ else -+ env->cc_x = 0; -+ } -+ FORCE_RET(); -+} -+ -+OP(shr16_cc) -+{ -+ uint16_t op2 = get_op(PARAM2); -+ uint16_t op3 = get_op(PARAM3); -+ uint16_t result; -+ if (op3 < 16) -+ result = op2 >> op3; -+ else -+ result = 0; -+ set_op(PARAM1, result); -+ if (op3 > 0) { -+ if (op3 <= 16) -+ env->cc_x = (op2 >> (op3 - 1)) & 1; -+ else -+ env->cc_x = 0; -+ } - FORCE_RET(); - } - -@@ -300,12 +478,199 @@ - int32_t op1 = get_op(PARAM1); - uint32_t op2 = get_op(PARAM2); - uint32_t result; -- result = op1 >> op2; -+ if (op2 < 32) -+ result = op1 >> op2; -+ else -+ result = 0; -+ set_op(PARAM1, result); -+ if (op2 > 0) { -+ if (op2 <= 32) -+ env->cc_x = (op1 >> (op2 - 1)) & 1; -+ else -+ env->cc_x = 0; -+ } -+ FORCE_RET(); -+} -+ -+OP(sar8_cc) -+{ -+ int8_t op2 = get_op(PARAM2); -+ uint8_t op3 = get_op(PARAM3); -+ uint8_t result; -+ if (op3 < 8) -+ result = op2 >> op3; -+ else -+ result = 0; -+ set_op(PARAM1, result); -+ if (op3 > 0) { -+ if (op3 <= 8) -+ env->cc_x = (op2 >> (op3 - 1)) & 1; -+ else -+ env->cc_x = 0; -+ } -+ FORCE_RET(); -+} -+ -+OP(sar16_cc) -+{ -+ int16_t op2 = get_op(PARAM2); -+ uint16_t op3 = get_op(PARAM3); -+ uint16_t result; -+ if (op3 < 16) -+ result = op2 >> op3; -+ else -+ result = 0; - set_op(PARAM1, result); -- env->cc_x = (op1 >> (op2 - 1)) & 1; -+ if (op3 > 0) { -+ if (op3 <= 16) -+ env->cc_x = (op2 >> (op3 - 1)) & 1; -+ else -+ env->cc_x = 0; -+ } - FORCE_RET(); - } - -+OP(rol32) -+{ -+ uint32_t op2 = get_op(PARAM2); -+ uint32_t op3 = get_op(PARAM3); -+ uint32_t result; -+ result = (op2 << op3) | (op2 >> (32 - op3)); -+ set_op(PARAM1, result); -+ FORCE_RET(); -+} -+ -+OP(ror32) -+{ -+ uint32_t op2 = get_op(PARAM2); -+ uint32_t op3 = get_op(PARAM3); -+ uint32_t result; -+ result = (op2 >> op3) | (op2 << (32 - op3)); -+ set_op(PARAM1, result); -+ FORCE_RET(); -+} -+ -+#define OP_ROL(type, bits) \ -+OP(glue(glue(rol,bits),_cc)) \ -+{ \ -+ type op2 = get_op(PARAM2); \ -+ uint32_t op3 = get_op(PARAM3); \ -+ type result; \ -+ uint32_t flags; \ -+ int count = op3 & (bits - 1); \ -+ if (count) \ -+ result = (op2 << count) | (op2 >> (bits - count)); \ -+ else \ -+ result = op2; \ -+ set_op(PARAM1, result); \ -+ flags = 0; \ -+ if (result == 0) \ -+ flags |= CCF_Z; \ -+ if (result & (1 << (bits - 1))) \ -+ flags |= CCF_N; \ -+ if (op3 && result & 1) \ -+ flags |= CCF_C; \ -+ env->cc_dest = flags; \ -+ FORCE_RET(); \ -+} -+OP_ROL(uint8_t, 8) -+OP_ROL(uint16_t, 16) -+OP_ROL(uint32_t, 32) -+ -+#define OP_ROR(type, bits) \ -+OP(glue(glue(ror,bits),_cc)) \ -+{ \ -+ type op2 = get_op(PARAM2); \ -+ uint32_t op3 = get_op(PARAM3); \ -+ type result; \ -+ uint32_t flags; \ -+ int count = op3 & (bits - 1); \ -+ if (count) \ -+ result = (op2 >> count) | (op2 << (bits - count)); \ -+ else \ -+ result = op2; \ -+ set_op(PARAM1, result); \ -+ flags = 0; \ -+ if (result == 0) \ -+ flags |= CCF_Z; \ -+ if (result & (1 << (bits - 1))) \ -+ flags |= CCF_N; \ -+ if (op3 && result & (1 << (bits - 1))) \ -+ flags |= CCF_C; \ -+ env->cc_dest = flags; \ -+ FORCE_RET(); \ -+} -+OP_ROR(uint8_t, 8) -+OP_ROR(uint16_t, 16) -+OP_ROR(uint32_t, 32) -+ -+#define OP_ROXR(type, bits) \ -+OP(glue(glue(roxr,bits),_cc)) \ -+{ \ -+ type op2 = get_op(PARAM2); \ -+ uint32_t op3 = get_op(PARAM3); \ -+ type result; \ -+ uint32_t flags; \ -+ int count = op3; \ -+ if (bits == 8) count = rox8_table[count]; \ -+ if (bits == 16) count = rox16_table[count]; \ -+ if (bits == 32) count = rox32_table[count]; \ -+ if (count) { \ -+ result = (op2 >> count) | ((type)env->cc_x << (bits - count)); \ -+ if (count > 1) \ -+ result |= op2 << (bits + 1 - count); \ -+ env->cc_x = (op2 >> (count - 1)) & 1; \ -+ } else \ -+ result = op2; \ -+ set_op(PARAM1, result); \ -+ flags = 0; \ -+ if (result == 0) \ -+ flags |= CCF_Z; \ -+ if (result & (1 << (bits - 1))) \ -+ flags |= CCF_N; \ -+ if (env->cc_x) \ -+ flags |= CCF_C; \ -+ env->cc_dest = flags; \ -+ FORCE_RET(); \ -+} -+OP_ROXR(uint8_t, 8) -+OP_ROXR(uint16_t, 16) -+OP_ROXR(uint32_t, 32) -+ -+#define OP_ROXL(type, bits) \ -+OP(glue(glue(roxl,bits),_cc)) \ -+{ \ -+ type op2 = get_op(PARAM2); \ -+ uint32_t op3 = get_op(PARAM3); \ -+ type result; \ -+ uint32_t flags; \ -+ int count; \ -+ count = op3; \ -+ if (bits == 8) count = rox8_table[count]; \ -+ if (bits == 16) count = rox16_table[count]; \ -+ if (bits == 32) count = rox32_table[count]; \ -+ if (count) { \ -+ result = (op2 << count) | ((type)env->cc_x << (count - 1)); \ -+ if (count > 1) \ -+ result |= op2 >> (bits + 1 - count); \ -+ env->cc_x = (op2 >> (bits - count)) & 1; \ -+ } else \ -+ result = op2; \ -+ set_op(PARAM1, result); \ -+ flags = 0; \ -+ if (result == 0) \ -+ flags |= CCF_Z; \ -+ if (result & (1 << (bits - 1))) \ -+ flags |= CCF_N; \ -+ if (env->cc_x) \ -+ flags |= CCF_C; \ -+ env->cc_dest = flags; \ -+ FORCE_RET(); \ -+} -+OP_ROXL(uint8_t, 8) -+OP_ROXL(uint16_t, 16) -+OP_ROXL(uint32_t, 32) -+ - /* Value extend. */ - - OP(ext8u32) -@@ -361,14 +726,17 @@ - /* Avoid using a PARAM1 of zero. This breaks dyngen because it uses - the address of a symbol, and gcc knows symbols can't have address - zero. */ -- if (PARAM1 == 2 && quot > 0xffff) -+ if (PARAM1 == 1 && quot > 0xffff) - flags |= CCF_V; - if (quot == 0) - flags |= CCF_Z; - else if ((int32_t)quot < 0) - flags |= CCF_N; -- env->div1 = quot; -- env->div2 = rem; -+ /* Don't modify destination if overflow occured. */ -+ if ((flags & CCF_V) == 0) { -+ env->div1 = quot; -+ env->div2 = rem; -+ } - env->cc_dest = flags; - FORCE_RET(); - } -@@ -379,7 +747,7 @@ - int32_t den; - int32_t quot; - int32_t rem; -- int32_t flags; -+ uint32_t flags; - - num = env->div1; - den = env->div2; -@@ -388,14 +756,78 @@ - quot = num / den; - rem = num % den; - flags = 0; -- if (PARAM1 == 2 && quot != (int16_t)quot) -+ if (PARAM1 == 1 && quot != (int16_t)quot) -+ flags |= CCF_V; -+ if (quot == 0) -+ flags |= CCF_Z; -+ else if (quot < 0) -+ flags |= CCF_N; -+ /* Don't modify destination if overflow occured. */ -+ if ((flags & CCF_V) == 0) { -+ env->div1 = quot; -+ env->div2 = rem; -+ } -+ env->cc_dest = flags; -+ FORCE_RET(); -+} -+ -+OP(divu64) -+{ -+ uint32_t num; -+ uint32_t den; -+ uint64_t quot; -+ uint32_t rem; -+ uint32_t flags; -+ -+ num = env->div1; -+ den = env->div2; -+ /* ??? This needs to make sure the throwing location is accurate. */ -+ if (den == 0) -+ RAISE_EXCEPTION(EXCP_DIV0); -+ quot = (num | ((uint64_t)env->quadh << 32)) / den; -+ rem = (num | ((uint64_t)env->quadh << 32)) % den; -+ flags = 0; -+ if (quot > 0xffffffff) -+ flags |= CCF_V; -+ if (quot == 0) -+ flags |= CCF_Z; -+ else if ((int64_t)quot < 0) -+ flags |= CCF_N; -+ /* Don't modify destination if overflow occured. */ -+ if ((flags & CCF_V) == 0) { -+ env->div1 = quot; -+ env->div2 = rem; -+ } -+ env->cc_dest = flags; -+ FORCE_RET(); -+} -+ -+OP(divs64) -+{ -+ int32_t num; -+ int32_t den; -+ int64_t quot; -+ int32_t rem; -+ uint32_t flags; -+ -+ num = env->div1; -+ den = env->div2; -+ if (den == 0) -+ RAISE_EXCEPTION(EXCP_DIV0); -+ quot = (num | ((int64_t)env->quadh << 32)) / den; -+ rem = (num | ((int64_t)env->quadh << 32)) % den; -+ flags = 0; -+ if (quot != (int32_t)quot) - flags |= CCF_V; - if (quot == 0) - flags |= CCF_Z; - else if (quot < 0) - flags |= CCF_N; -- env->div1 = quot; -- env->div2 = rem; -+ /* Don't modify destination if overflow occured. */ -+ if ((flags & CCF_V) == 0) { -+ env->div1 = quot; -+ env->div2 = rem; -+ } - env->cc_dest = flags; - FORCE_RET(); - } ---- target-m68k/qregs.def -+++ target-m68k/qregs.def -@@ -32,6 +32,7 @@ - DEFO32(CC_X, cc_x) - DEFO32(DIV1, div1) - DEFO32(DIV2, div2) -+DEFO32(QUADH, quadh) - DEFO32(EXCEPTION, exception_index) - DEFO32(MACSR, macsr) - DEFO32(MAC_MASK, mac_mask) ---- target-m68k/translate.c -+++ target-m68k/translate.c -@@ -250,6 +250,9 @@ - if ((ext & 0x800) == 0 && !m68k_feature(s->env, M68K_FEATURE_WORD_INDEX)) - return -1; - -+ if (!m68k_feature(s->env, M68K_FEATURE_SCALED_INDEX)) -+ ext &= ~(3 << 9); -+ - if (ext & 0x100) { - /* full extension word format */ - if (!m68k_feature(s->env, M68K_FEATURE_EXT_FULL)) -@@ -258,7 +261,7 @@ - if ((ext & 0x30) > 0x10) { - /* base displacement */ - if ((ext & 0x30) == 0x20) { -- bd = (int16_t)lduw_code(s->pc); -+ bd = ldsw_code(s->pc); - s->pc += 2; - } else { - bd = read_im32(s); -@@ -307,7 +310,7 @@ - if ((ext & 3) > 1) { - /* outer displacement */ - if ((ext & 3) == 2) { -- od = (int16_t)lduw_code(s->pc); -+ od = ldsw_code(s->pc); - s->pc += 2; - } else { - od = read_im32(s); -@@ -366,6 +369,25 @@ - } - } - -+static inline int insn_opsize(int insn, int pos) -+{ -+ switch ((insn >> pos) & 3) { -+ case 0: return OS_BYTE; -+ case 1: return OS_WORD; -+ case 2: return OS_LONG; -+ default: abort(); -+ } -+} -+ -+#define SET_CC_OP(opsize, op) do { \ -+ switch (opsize) { \ -+ case OS_BYTE: s->cc_op = CC_OP_##op##B; break; \ -+ case OS_WORD: s->cc_op = CC_OP_##op##W; break; \ -+ case OS_LONG: s->cc_op = CC_OP_##op; break; \ -+ default: abort(); \ -+ } \ -+ } while (0) -+ - /* Assign value to a register. If the width is less than the register width - only the low part of the register is set. */ - static void gen_partset_reg(int opsize, int reg, int val) -@@ -881,8 +903,27 @@ - - ext = lduw_code(s->pc); - s->pc += 2; -- if (ext & 0x87f8) { -- gen_exception(s, s->pc - 4, EXCP_UNSUPPORTED); -+ if (ext & 0x400) { -+ if (!m68k_feature(s->env, M68K_FEATURE_M68020_40)) { -+ gen_exception(s, s->pc - 4, EXCP_UNSUPPORTED); -+ return; -+ } -+ num = DREG(ext, 12); -+ reg = DREG(ext, 0); -+ gen_op_mov32(QREG_DIV1, num); -+ gen_op_mov32(QREG_QUADH, reg); -+ SRC_EA(den, OS_LONG, 0, NULL); -+ gen_op_mov32(QREG_DIV2, den); -+ if (ext & 0x0800) { -+ gen_op_divs64(); -+ } else { -+ gen_op_divu64(); -+ } -+ gen_op_mov32 (num, QREG_DIV1); -+ if (num != reg) -+ gen_op_mov32 (reg, QREG_DIV2); -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; - return; - } - num = DREG(ext, 12); -@@ -895,13 +936,10 @@ - } else { - gen_op_divu(2); - } -- if (num == reg) { -- /* div */ -- gen_op_mov32 (reg, QREG_DIV1); -- } else { -- /* rem */ -- gen_op_mov32 (reg, QREG_DIV2); -- } -+ if (num == reg || m68k_feature(s->env, M68K_FEATURE_M68020_60)) -+ gen_op_mov32 (num, QREG_DIV1); -+ if (num != reg) -+ gen_op_mov32 (reg, QREG_DIV2); - gen_op_flags_set(); - s->cc_op = CC_OP_FLAGS; - } -@@ -914,31 +952,33 @@ - int tmp; - int addr; - int add; -+ int opsize; - - add = (insn & 0x4000) != 0; -+ opsize = insn_opsize(insn, 6); - reg = DREG(insn, 9); - dest = gen_new_qreg(QMODE_I32); - if (insn & 0x100) { -- SRC_EA(tmp, OS_LONG, 0, &addr); -+ SRC_EA(tmp, opsize, -1, &addr); - src = reg; - } else { - tmp = reg; -- SRC_EA(src, OS_LONG, 0, NULL); -+ SRC_EA(src, opsize, -1, NULL); - } - if (add) { - gen_op_add32(dest, tmp, src); - gen_op_update_xflag_lt(dest, src); -- s->cc_op = CC_OP_ADD; -+ SET_CC_OP(opsize, ADD); - } else { - gen_op_update_xflag_lt(tmp, src); - gen_op_sub32(dest, tmp, src); -- s->cc_op = CC_OP_SUB; -+ SET_CC_OP(opsize, SUB); - } - gen_op_update_cc_add(dest, src); - if (insn & 0x100) { -- DEST_EA(insn, OS_LONG, dest, &addr); -+ DEST_EA(insn, opsize, dest, &addr); - } else { -- gen_op_mov32(reg, dest); -+ gen_partset_reg(opsize, reg, dest); - } - } - -@@ -1065,6 +1105,8 @@ - int reg; - int tmp; - int is_load; -+ int opsize; -+ int incr; - - mask = lduw_code(s->pc); - s->pc += 2; -@@ -1076,21 +1118,40 @@ - addr = gen_new_qreg(QMODE_I32); - gen_op_mov32(addr, tmp); - is_load = ((insn & 0x0400) != 0); -- for (i = 0; i < 16; i++, mask >>= 1) { -- if (mask & 1) { -- if (i < 8) -- reg = DREG(i, 0); -- else -- reg = AREG(i, 0); -- if (is_load) { -- tmp = gen_load(s, OS_LONG, addr, 0); -- gen_op_mov32(reg, tmp); -- } else { -- gen_store(s, OS_LONG, addr, reg); -- } -- if (mask != 1) -- gen_op_add32(addr, addr, gen_im32(4)); -- } -+ opsize = (insn & 0x40) != 0 ? OS_LONG : OS_WORD; -+ incr = gen_im32(opsize_bytes(opsize)); -+ if (!is_load && (insn & 070) == 040) { -+ for (i = 15; i >= 0; i--, mask >>= 1) { -+ if (mask & 1) { -+ if (i < 8) -+ reg = DREG(i, 0); -+ else -+ reg = AREG(i, 0); -+ gen_store(s, opsize, addr, reg); -+ if (mask != 1) -+ gen_op_sub32(addr, addr, incr); -+ } -+ } -+ gen_op_mov32(AREG(insn, 0), addr); -+ } else { -+ for (i = 0; i < 16; i++, mask >>= 1) { -+ if (mask & 1) { -+ if (i < 8) -+ reg = DREG(i, 0); -+ else -+ reg = AREG(i, 0); -+ if (is_load) { -+ tmp = gen_load(s, opsize, addr, 1); -+ gen_op_mov32(reg, tmp); -+ } else { -+ gen_store(s, opsize, addr, reg); -+ } -+ if (mask != 1 || (insn & 070) == 030) -+ gen_op_add32(addr, addr, incr); -+ } -+ } -+ if ((insn & 070) == 030) -+ gen_op_mov32(AREG(insn, 0), addr); - } - } - -@@ -1158,10 +1219,26 @@ - int dest; - int src2; - int addr; -+ int opsize; - - op = (insn >> 9) & 7; -- SRC_EA(src1, OS_LONG, 0, (op == 6) ? NULL : &addr); -- src2 = gen_im32(read_im32(s)); -+ opsize = insn_opsize(insn, 6); -+ switch (opsize) { -+ case OS_BYTE: -+ src2 = gen_im32(ldsb_code(s->pc + 1)); -+ s->pc += 2; -+ break; -+ case OS_WORD: -+ src2 = gen_im32(ldsw_code(s->pc)); -+ s->pc += 2; -+ break; -+ case OS_LONG: -+ src2 = gen_im32(read_im32(s)); -+ break; -+ default: -+ abort(); -+ } -+ SRC_EA(src1, opsize, -1, (op == 6) ? NULL : &addr); - dest = gen_new_qreg(QMODE_I32); - switch (op) { - case 0: /* ori */ -@@ -1177,14 +1254,14 @@ - gen_op_update_xflag_lt(dest, src2); - gen_op_sub32(dest, dest, src2); - gen_op_update_cc_add(dest, src2); -- s->cc_op = CC_OP_SUB; -+ SET_CC_OP(opsize, SUB); - break; - case 3: /* addi */ - gen_op_mov32(dest, src1); - gen_op_add32(dest, dest, src2); - gen_op_update_cc_add(dest, src2); - gen_op_update_xflag_lt(dest, src2); -- s->cc_op = CC_OP_ADD; -+ SET_CC_OP(opsize, ADD); - break; - case 5: /* eori */ - gen_op_xor32(dest, src1, src2); -@@ -1194,13 +1271,13 @@ - gen_op_mov32(dest, src1); - gen_op_sub32(dest, dest, src2); - gen_op_update_cc_add(dest, src2); -- s->cc_op = CC_OP_SUB; -+ SET_CC_OP(opsize, SUB); - break; - default: - abort(); - } - if (op != 6) { -- DEST_EA(insn, OS_LONG, dest, &addr); -+ DEST_EA(insn, opsize, dest, &addr); - } - } - -@@ -1290,19 +1367,7 @@ - { - int opsize; - -- switch ((insn >> 6) & 3) { -- case 0: /* clr.b */ -- opsize = OS_BYTE; -- break; -- case 1: /* clr.w */ -- opsize = OS_WORD; -- break; -- case 2: /* clr.l */ -- opsize = OS_LONG; -- break; -- default: -- abort(); -- } -+ opsize = insn_opsize(insn, 6); - DEST_EA(insn, opsize, gen_im32(0), NULL); - gen_logic_cc(s, gen_im32(0)); - } -@@ -1331,17 +1396,20 @@ - - DISAS_INSN(neg) - { -- int reg; - int src1; -+ int dest; -+ int addr; -+ int opsize; - -- reg = DREG(insn, 0); -- src1 = gen_new_qreg(QMODE_I32); -- gen_op_mov32(src1, reg); -- gen_op_neg32(reg, src1); -- s->cc_op = CC_OP_SUB; -- gen_op_update_cc_add(reg, src1); -- gen_op_update_xflag_lt(gen_im32(0), src1); -- s->cc_op = CC_OP_SUB; -+ opsize = insn_opsize(insn, 6); -+ SRC_EA(src1, opsize, -1, &addr); -+ dest = gen_new_qreg(QMODE_I32); -+ gen_op_neg32(dest, src1); -+ DEST_EA(insn, opsize, dest, &addr); -+ SET_CC_OP(opsize, SUB); -+ gen_op_update_cc_add(src1, dest); -+ gen_op_update_xflag_lt(gen_im32(0), dest); -+ SET_CC_OP(opsize, SUB); - } - - static void gen_set_sr_im(DisasContext *s, uint16_t val, int ccr_only) -@@ -1390,11 +1458,17 @@ - - DISAS_INSN(not) - { -- int reg; -+ int src1; -+ int dest; -+ int addr; -+ int opsize; - -- reg = DREG(insn, 0); -- gen_op_not32(reg, reg); -- gen_logic_cc(s, reg); -+ opsize = insn_opsize(insn, 6); -+ SRC_EA(src1, opsize, -1, &addr); -+ dest = gen_new_qreg(QMODE_I32); -+ gen_op_not32(dest, src1); -+ DEST_EA(insn, opsize, dest, &addr); -+ gen_logic_cc(s, dest); - } - - DISAS_INSN(swap) -@@ -1452,19 +1526,7 @@ - int opsize; - int tmp; - -- switch ((insn >> 6) & 3) { -- case 0: /* tst.b */ -- opsize = OS_BYTE; -- break; -- case 1: /* tst.w */ -- opsize = OS_WORD; -- break; -- case 2: /* tst.l */ -- opsize = OS_LONG; -- break; -- default: -- abort(); -- } -+ opsize = insn_opsize(insn, 6); - SRC_EA(tmp, opsize, -1, NULL); - gen_logic_cc(s, tmp); - } -@@ -1493,28 +1555,149 @@ - DEST_EA(insn, OS_BYTE, dest, &addr); - } - -+DISAS_INSN(cas) -+{ -+ int opsize; -+ int src; -+ int tmp; -+ int ext; -+ int regc; -+ int regu; -+ int l1, l2; -+ int addr; -+ -+ ext = lduw_code(s->pc); -+ s->pc += 2; -+ regc = DREG(ext, 0); -+ regu = DREG(ext, 6); -+ tmp = gen_new_qreg(QMODE_I32); -+ switch ((insn >> 9) & 3) { -+ case 1: -+ opsize = OS_BYTE; -+ break; -+ case 2: -+ opsize = OS_WORD; -+ break; -+ case 3: -+ opsize = OS_LONG; -+ break; -+ default: -+ abort(); -+ } -+ SRC_EA(src, opsize, -1, &addr); -+ gen_op_sub32(tmp, src, regc); -+ gen_op_update_cc_add(tmp, regc); -+ SET_CC_OP(opsize, SUB); -+ l1 = gen_new_label(); -+ l2 = gen_new_label(); -+ gen_jmpcc(s, 6, l1); -+ DEST_EA(insn, opsize, regu, &addr); -+ gen_op_jmp(l2); -+ gen_set_label(l1); -+ gen_partset_reg(opsize, regc, src); -+ gen_set_label(l2); -+} -+ -+DISAS_INSN(cas2) -+{ -+ int opsize; -+ int src1, src2; -+ int cmp1, cmp2; -+ int ext1, ext2; -+ int regc1, regc2; -+ int regu1, regu2; -+ int tmp; -+ int l1, l2; -+ -+ ext1 = lduw_code(s->pc); -+ s->pc += 2; -+ regc1 = DREG(ext1, 0); -+ regu1 = DREG(ext1, 6); -+ if (ext1 & 0x8000) -+ src1 = AREG(ext1, 12); -+ else -+ src1 = DREG(ext1, 12); -+ ext2 = lduw_code(s->pc); -+ s->pc += 2; -+ regc2 = DREG(ext2, 0); -+ regu2 = DREG(ext2, 6); -+ if (ext2 & 0x8000) -+ src2 = AREG(ext2, 12); -+ else -+ src2 = DREG(ext2, 12); -+ if (insn & 0x200) -+ opsize = OS_LONG; -+ else -+ opsize = OS_WORD; -+ l1 = gen_new_label(); -+ l2 = gen_new_label(); -+ tmp = gen_new_qreg(QMODE_I32); -+ cmp1 = gen_load(s, opsize, src1, 1); -+ cmp2 = gen_load(s, opsize, src2, 1); -+ gen_op_sub32(tmp, cmp1, regc1); -+ gen_op_update_cc_add(tmp, regc1); -+ SET_CC_OP(opsize, SUB); -+ gen_jmpcc(s, 6, l1); -+ gen_op_sub32(tmp, cmp2, regc2); -+ gen_op_update_cc_add(tmp, regc2); -+ SET_CC_OP(opsize, SUB); -+ gen_jmpcc(s, 6, l1); -+ gen_store(s, opsize, src1, regu1); -+ gen_store(s, opsize, src2, regu2); -+ gen_op_jmp(l2); -+ gen_set_label(l1); -+ gen_partset_reg(opsize, regc1, cmp1); -+ gen_partset_reg(opsize, regc2, cmp2); -+ gen_set_label(l2); -+} -+ - DISAS_INSN(mull) - { - uint16_t ext; - int reg; - int src1; - int dest; -+ int regh; - - /* The upper 32 bits of the product are discarded, so - muls.l and mulu.l are functionally equivalent. */ - ext = lduw_code(s->pc); - s->pc += 2; -- if (ext & 0x87ff) { -- gen_exception(s, s->pc - 4, EXCP_UNSUPPORTED); -- return; -+ if (ext & 0x400) { -+ if (!m68k_feature(s->env, M68K_FEATURE_M68020_40)) { -+ gen_exception(s, s->pc - 4, EXCP_UNSUPPORTED); -+ return; -+ } -+ reg = DREG(ext, 12); -+ regh = DREG(ext, 0); -+ SRC_EA(src1, OS_LONG, 0, NULL); -+ dest = gen_new_qreg(QMODE_I32); -+ if (ext & 0x800) -+ gen_op_muls64(dest, src1, reg); -+ else -+ gen_op_mulu64(dest, src1, reg); -+ gen_op_mov32(reg, dest); -+ gen_op_mov32(regh, QREG_QUADH); -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+ return; - } - reg = DREG(ext, 12); - SRC_EA(src1, OS_LONG, 0, NULL); - dest = gen_new_qreg(QMODE_I32); -- gen_op_mul32(dest, src1, reg); -+ if (m68k_feature(s->env, M68K_FEATURE_M68000)) { -+ if (ext & 0x800) -+ gen_op_muls32_cc(dest, src1, reg); -+ else -+ gen_op_mulu32_cc(dest, src1, reg); -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+ } else { -+ gen_op_mul32(dest, src1, reg); -+ /* Unlike m68k, coldfire always clears the overflow bit. */ -+ gen_logic_cc(s, dest); -+ } - gen_op_mov32(reg, dest); -- /* Unlike m68k, coldfire always clears the overflow bit. */ -- gen_logic_cc(s, dest); - } - - DISAS_INSN(link) -@@ -1534,6 +1717,22 @@ - gen_op_add32(QREG_SP, tmp, gen_im32(offset)); - } - -+DISAS_INSN(linkl) -+{ -+ int32_t offset; -+ int reg; -+ int tmp; -+ -+ offset = read_im32(s); -+ reg = AREG(insn, 0); -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_sub32(tmp, QREG_SP, gen_im32(4)); -+ gen_store(s, OS_LONG, tmp, reg); -+ if (reg != QREG_SP) -+ gen_op_mov32(reg, tmp); -+ gen_op_add32(QREG_SP, tmp, gen_im32(offset)); -+} -+ - DISAS_INSN(unlk) - { - int src; -@@ -1586,8 +1785,14 @@ - int dest; - int val; - int addr; -+ int opsize; - -- SRC_EA(src1, OS_LONG, 0, &addr); -+ if ((insn & 070) == 010) { -+ /* Operation on address register is always long. */ -+ opsize = OS_LONG; -+ } else -+ opsize = insn_opsize(insn, 6); -+ SRC_EA(src1, opsize, -1, &addr); - val = (insn >> 9) & 7; - if (val == 0) - val = 8; -@@ -1606,15 +1811,15 @@ - if (insn & 0x0100) { - gen_op_update_xflag_lt(dest, src2); - gen_op_sub32(dest, dest, src2); -- s->cc_op = CC_OP_SUB; -+ SET_CC_OP(opsize, SUB); - } else { - gen_op_add32(dest, dest, src2); - gen_op_update_xflag_lt(dest, src2); -- s->cc_op = CC_OP_ADD; -+ SET_CC_OP(opsize, ADD); - } - gen_op_update_cc_add(dest, src2); - } -- DEST_EA(insn, OS_LONG, dest, &addr); -+ DEST_EA(insn, opsize, dest, &addr); - } - - DISAS_INSN(tpf) -@@ -1633,6 +1838,47 @@ - } - } - -+DISAS_INSN(scc_mem) -+{ -+ int l1; -+ int cond; -+ int dest; -+ -+ l1 = gen_new_label(); -+ cond = (insn >> 8) & 0xf; -+ dest = gen_new_qreg(QMODE_I32); -+ gen_op_mov32(dest, gen_im32(0)); -+ gen_jmpcc(s, cond ^ 1, l1); -+ gen_op_mov32(dest, gen_im32(0xff)); -+ gen_set_label(l1); -+ DEST_EA(insn, OS_BYTE, dest, NULL); -+} -+ -+DISAS_INSN(dbcc) -+{ -+ int l1; -+ int reg; -+ int tmp; -+ int16_t offset; -+ uint32_t base; -+ -+ reg = DREG(insn, 0); -+ base = s->pc; -+ offset = ldsw_code(s->pc); -+ s->pc += 2; -+ l1 = gen_new_label(); -+ gen_jmpcc(s, (insn >> 8) & 0xf, l1); -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_ext16s32(tmp, reg); -+ gen_op_set_T0_z32(tmp); -+ gen_op_add32(tmp, tmp, gen_im32(-1)); -+ gen_partset_reg(OS_WORD, reg, tmp); -+ gen_op_jmp_T0(l1); -+ gen_jmp_tb(s, 1, base + offset); -+ gen_set_label(l1); -+ gen_jmp_tb(s, 0, s->pc); -+} -+ - DISAS_INSN(branch) - { - int32_t offset; -@@ -1698,17 +1944,19 @@ - int dest; - int src; - int addr; -+ int opsize; - -+ opsize = insn_opsize(insn, 6); - reg = DREG(insn, 9); - dest = gen_new_qreg(QMODE_I32); - if (insn & 0x100) { -- SRC_EA(src, OS_LONG, 0, &addr); -+ SRC_EA(src, opsize, -1, &addr); - gen_op_or32(dest, src, reg); -- DEST_EA(insn, OS_LONG, dest, &addr); -+ DEST_EA(insn, opsize, dest, &addr); - } else { -- SRC_EA(src, OS_LONG, 0, NULL); -+ SRC_EA(src, opsize, 0, NULL); - gen_op_or32(dest, src, reg); -- gen_op_mov32(reg, dest); -+ gen_partset_reg(opsize, reg, dest); - } - gen_logic_cc(s, dest); - } -@@ -1718,7 +1966,7 @@ - int src; - int reg; - -- SRC_EA(src, OS_LONG, 0, NULL); -+ SRC_EA(src, (insn & 0x100) ? OS_LONG : OS_WORD, -1, NULL); - reg = AREG(insn, 9); - gen_op_sub32(reg, reg, src); - } -@@ -1763,34 +2011,18 @@ - - DISAS_INSN(cmp) - { -- int op; - int src; - int reg; - int dest; - int opsize; - -- op = (insn >> 6) & 3; -- switch (op) { -- case 0: /* cmp.b */ -- opsize = OS_BYTE; -- s->cc_op = CC_OP_CMPB; -- break; -- case 1: /* cmp.w */ -- opsize = OS_WORD; -- s->cc_op = CC_OP_CMPW; -- break; -- case 2: /* cmp.l */ -- opsize = OS_LONG; -- s->cc_op = CC_OP_SUB; -- break; -- default: -- abort(); -- } -+ opsize = insn_opsize(insn, 6); - SRC_EA(src, opsize, -1, NULL); - reg = DREG(insn, 9); - dest = gen_new_qreg(QMODE_I32); - gen_op_sub32(dest, reg, src); - gen_op_update_cc_add(dest, src); -+ SET_CC_OP(opsize, SUB); - } - - DISAS_INSN(cmpa) -@@ -1810,7 +2042,7 @@ - dest = gen_new_qreg(QMODE_I32); - gen_op_sub32(dest, reg, src); - gen_op_update_cc_add(dest, src); -- s->cc_op = CC_OP_SUB; -+ SET_CC_OP(opsize, SUB); - } - - DISAS_INSN(eor) -@@ -1819,13 +2051,15 @@ - int reg; - int dest; - int addr; -+ int opsize; - -- SRC_EA(src, OS_LONG, 0, &addr); -+ opsize = insn_opsize(insn, 6); -+ SRC_EA(src, opsize, -1, &addr); - reg = DREG(insn, 9); - dest = gen_new_qreg(QMODE_I32); - gen_op_xor32(dest, src, reg); - gen_logic_cc(s, dest); -- DEST_EA(insn, OS_LONG, dest, &addr); -+ DEST_EA(insn, opsize, dest, &addr); - } - - DISAS_INSN(and) -@@ -1834,17 +2068,19 @@ - int reg; - int dest; - int addr; -+ int opsize; - -+ opsize = insn_opsize(insn, 6); - reg = DREG(insn, 9); - dest = gen_new_qreg(QMODE_I32); - if (insn & 0x100) { -- SRC_EA(src, OS_LONG, 0, &addr); -+ SRC_EA(src, opsize, -1, &addr); - gen_op_and32(dest, src, reg); -- DEST_EA(insn, OS_LONG, dest, &addr); -+ DEST_EA(insn, opsize, dest, &addr); - } else { -- SRC_EA(src, OS_LONG, 0, NULL); -+ SRC_EA(src, opsize, -1, NULL); - gen_op_and32(dest, src, reg); -- gen_op_mov32(reg, dest); -+ gen_partset_reg(opsize, reg, dest); - } - gen_logic_cc(s, dest); - } -@@ -1854,7 +2090,7 @@ - int src; - int reg; - -- SRC_EA(src, OS_LONG, 0, NULL); -+ SRC_EA(src, (insn & 0x100) ? OS_LONG : OS_WORD, -1, NULL); - reg = AREG(insn, 9); - gen_op_add32(reg, reg, src); - } -@@ -1907,6 +2143,58 @@ - } - } - -+DISAS_INSN(shift8_im) -+{ -+ int reg; -+ int dest; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ tmp = (insn >> 9) & 7; -+ if (tmp == 0) -+ tmp = 8; -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 0x100) { -+ gen_op_shl8_im_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SHLB; -+ } else { -+ if (insn & 8) { -+ gen_op_shr8_im_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SHRB; -+ } else { -+ gen_op_sar8_im_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SARB; -+ } -+ } -+ gen_partset_reg(OS_BYTE, reg, dest); -+} -+ -+DISAS_INSN(shift16_im) -+{ -+ int reg; -+ int dest; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ tmp = (insn >> 9) & 7; -+ if (tmp == 0) -+ tmp = 8; -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 0x100) { -+ gen_op_shl16_im_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SHLW; -+ } else { -+ if (insn & 8) { -+ gen_op_shr16_im_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SHRW; -+ } else { -+ gen_op_sar16_im_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SARW; -+ } -+ } -+ gen_partset_reg(OS_WORD, reg, dest); -+} -+ - DISAS_INSN(shift_reg) - { - int reg; -@@ -1931,6 +2219,603 @@ - } - } - -+DISAS_INSN(shift8_reg) -+{ -+ int reg; -+ int src; -+ int dest; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ src = DREG(insn, 9); -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_and32(tmp, src, gen_im32(63)); -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 0x100) { -+ gen_op_shl8_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SHLB; -+ } else { -+ if (insn & 8) { -+ gen_op_shr8_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SHRB; -+ } else { -+ gen_op_sar8_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SARB; -+ } -+ } -+ gen_partset_reg(OS_BYTE, reg, dest); -+} -+ -+DISAS_INSN(shift16_reg) -+{ -+ int reg; -+ int src; -+ int dest; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ src = DREG(insn, 9); -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_and32(tmp, src, gen_im32(63)); -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 0x100) { -+ gen_op_shl16_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SHLW; -+ } else { -+ if (insn & 8) { -+ gen_op_shr16_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SHRW; -+ } else { -+ gen_op_sar16_cc(dest, reg, tmp); -+ s->cc_op = CC_OP_SARW; -+ } -+ } -+ gen_partset_reg(OS_WORD, reg, dest); -+} -+ -+DISAS_INSN(shift_mem) -+{ -+ int src; -+ int dest; -+ int addr; -+ -+ SRC_EA(src, OS_WORD, 0, &addr); -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 0x100) { -+ gen_op_shl16_im_cc(dest, src, 1); -+ s->cc_op = CC_OP_SHLW; -+ } else { -+ if (insn & 8) { -+ gen_op_shr16_im_cc(dest, src, 1); -+ s->cc_op = CC_OP_SHRW; -+ } else { -+ gen_op_sar16_im_cc(dest, src, 1); -+ s->cc_op = CC_OP_SARW; -+ } -+ } -+ DEST_EA(insn, OS_WORD, dest, &addr); -+} -+ -+DISAS_INSN(rotate_im) -+{ -+ int reg; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ tmp = (insn >> 9) & 7; -+ if (tmp == 0) -+ tmp = 8; -+ tmp = gen_im32(tmp); -+ if (insn & 8) { -+ if (insn & 0x100) { -+ gen_op_rol32_cc(reg, reg, tmp); -+ } else { -+ gen_op_ror32_cc(reg, reg, tmp); -+ } -+ } else { -+ if (insn & 0x100) { -+ gen_op_roxl32_cc(reg, reg, tmp); -+ } else { -+ gen_op_roxr32_cc(reg, reg, tmp); -+ } -+ } -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+} -+ -+DISAS_INSN(rotate8_im) -+{ -+ int reg; -+ int dest; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ tmp = (insn >> 9) & 7; -+ if (tmp == 0) -+ tmp = 8; -+ tmp = gen_im32(tmp); -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 8) { -+ if (insn & 0x100) { -+ gen_op_rol8_cc(dest, reg, tmp); -+ } else { -+ gen_op_ror8_cc(dest, reg, tmp); -+ } -+ } else { -+ if (insn & 0x100) { -+ gen_op_roxl8_cc(dest, reg, tmp); -+ } else { -+ gen_op_roxr8_cc(dest, reg, tmp); -+ } -+ } -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+ gen_partset_reg(OS_BYTE, reg, dest); -+} -+ -+DISAS_INSN(rotate16_im) -+{ -+ int reg; -+ int dest; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ tmp = (insn >> 9) & 7; -+ if (tmp == 0) -+ tmp = 8; -+ tmp = gen_im32(tmp); -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 8) { -+ if (insn & 0x100) { -+ gen_op_rol16_cc(dest, reg, tmp); -+ } else { -+ gen_op_ror16_cc(dest, reg, tmp); -+ } -+ } else { -+ if (insn & 0x100) { -+ gen_op_roxl16_cc(dest, reg, tmp); -+ } else { -+ gen_op_roxr16_cc(dest, reg, tmp); -+ } -+ } -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+ gen_partset_reg(OS_WORD, reg, dest); -+} -+ -+DISAS_INSN(rotate_reg) -+{ -+ int reg; -+ int src; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ src = DREG(insn, 9); -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_and32(tmp, src, gen_im32(63)); -+ if (insn & 8) { -+ if (insn & 0x100) { -+ gen_op_rol32_cc(reg, reg, tmp); -+ } else { -+ gen_op_ror32_cc(reg, reg, tmp); -+ } -+ } else { -+ if (insn & 0x100) { -+ gen_op_roxl32_cc(reg, reg, tmp); -+ } else { -+ gen_op_roxr32_cc(reg, reg, tmp); -+ } -+ } -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+} -+ -+DISAS_INSN(rotate8_reg) -+{ -+ int reg; -+ int src; -+ int dest; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ src = DREG(insn, 9); -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_and32(tmp, src, gen_im32(63)); -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 8) { -+ if (insn & 0x100) { -+ gen_op_rol8_cc(dest, reg, tmp); -+ } else { -+ gen_op_ror8_cc(dest, reg, tmp); -+ } -+ } else { -+ if (insn & 0x100) { -+ gen_op_roxl8_cc(dest, reg, tmp); -+ } else { -+ gen_op_roxr8_cc(dest, reg, tmp); -+ } -+ } -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+ gen_partset_reg(OS_BYTE, reg, dest); -+} -+ -+DISAS_INSN(rotate16_reg) -+{ -+ int reg; -+ int src; -+ int dest; -+ int tmp; -+ -+ reg = DREG(insn, 0); -+ src = DREG(insn, 9); -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_and32(tmp, src, gen_im32(63)); -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 8) { -+ if (insn & 0x100) { -+ gen_op_rol16_cc(dest, reg, tmp); -+ } else { -+ gen_op_ror16_cc(dest, reg, tmp); -+ } -+ } else { -+ if (insn & 0x100) { -+ gen_op_roxl16_cc(dest, reg, tmp); -+ } else { -+ gen_op_roxr16_cc(dest, reg, tmp); -+ } -+ } -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+ gen_partset_reg(OS_WORD, reg, dest); -+} -+ -+DISAS_INSN(rotate_mem) -+{ -+ int src; -+ int dest; -+ int addr; -+ -+ SRC_EA(src, OS_WORD, 0, &addr); -+ dest = gen_new_qreg(QMODE_I32); -+ if (insn & 8) { -+ if (insn & 0x100) { -+ gen_op_rol16_cc(dest, src, gen_im32(1)); -+ } else { -+ gen_op_ror16_cc(dest, src, gen_im32(1)); -+ } -+ } else { -+ if (insn & 0x100) { -+ gen_op_roxl16_cc(dest, src, gen_im32(1)); -+ } else { -+ gen_op_roxr16_cc(dest, src, gen_im32(1)); -+ } -+ } -+ gen_op_flags_set(); -+ s->cc_op = CC_OP_FLAGS; -+ DEST_EA(insn, OS_WORD, dest, &addr); -+} -+ -+DISAS_INSN(bitfield_reg) -+{ -+ uint16_t ext; -+ int tmp; -+ int tmp1; -+ int reg; -+ int offset; -+ int width; -+ int op; -+ int reg2; -+ uint32_t mask; -+ -+ reg = DREG(insn, 0); -+ op = (insn >> 8) & 7; -+ ext = lduw_code(s->pc); -+ s->pc += 2; -+ if ((ext & 0x820) == 0) { -+ /* constant offset and width */ -+ offset = (ext >> 6) & 31; -+ width = (ext & 31); -+ if (width == 0) -+ width = 32; -+ reg2 = DREG(ext, 12); -+ mask = 0xffffffff << (32 - width); -+ if (offset > 0) -+ mask = (mask >> offset) | (mask << (32 - offset)); -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_and32(tmp, reg, gen_im32(mask)); -+ if (offset > 0) { -+ tmp1 = gen_new_qreg(QMODE_I32); -+ gen_op_rol32(tmp1, tmp, gen_im32(offset)); -+ } else -+ tmp1 = tmp; -+ gen_logic_cc(s, tmp1); -+ switch (op) { -+ case 0: /* bftst */ -+ break; -+ case 1: /* bfextu */ -+ if (offset + width != 32) -+ gen_op_rol32(reg2, tmp, gen_im32((offset + width) & 31)); -+ else -+ gen_op_mov32(reg2, tmp); -+ break; -+ case 2: /* bfchg */ -+ gen_op_xor32(reg, reg, gen_im32(mask)); -+ break; -+ case 3: /* bfexts */ -+ if (offset > 0) -+ gen_op_rol32(reg2, tmp, gen_im32(offset)); -+ if (width < 32) -+ gen_op_sar32(reg2, reg2, gen_im32(32 - width)); -+ break; -+ case 4: /* bfclr */ -+ gen_op_and32(reg, reg, gen_im32(~mask)); -+ break; -+ case 5: /* bfffo */ -+ if (offset > 0) -+ gen_op_rol32(reg2, tmp, gen_im32(offset)); -+ gen_op_bfffo(tmp, tmp, gen_im32(width)); -+ gen_op_add32(reg2, tmp, gen_im32(offset)); -+ break; -+ case 6: /* bfset */ -+ gen_op_or32(reg, reg, gen_im32(mask)); -+ break; -+ case 7: /* bfins */ -+ if (width == 32) { -+ if (offset > 0) -+ gen_op_ror32(reg, reg2, gen_im32(offset)); -+ else -+ gen_op_mov32(reg, reg2); -+ } else { -+ gen_op_and32(tmp, reg2, gen_im32((1u << width) - 1)); -+ if (offset + width != 32) -+ gen_op_ror32(tmp, tmp, gen_im32((offset + width) & 31)); -+ gen_op_and32(reg, reg, gen_im32(~mask)); -+ gen_op_or32(reg, reg, tmp); -+ } -+ break; -+ } -+ return; -+ } -+ /* Not yet implemented */ -+ gen_exception(s, s->pc - 4, EXCP_UNSUPPORTED); -+} -+ -+/* Generate a load from a bitfield. */ -+static void gen_bitfield_load(DisasContext *s, int addr, int endpos, -+ int *val1, int *val2) -+{ -+ int tmp; -+ -+ if (endpos <= 8) -+ *val1 = gen_load(s, OS_BYTE, addr, 0); -+ else if (endpos <= 24) { -+ *val1 = gen_load(s, OS_WORD, addr, 0); -+ if (endpos > 16) { -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_add32(tmp, addr, gen_im32(2)); -+ *val2 = gen_load(s, OS_BYTE, tmp, 0); -+ } -+ } else { -+ *val1 = gen_load(s, OS_LONG, addr, 0); -+ if (endpos > 32) { -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_add32(tmp, addr, gen_im32(4)); -+ *val2 = gen_load(s, OS_BYTE, tmp, 0); -+ } -+ } -+} -+ -+/* Generate a store to a bitfield. */ -+static void gen_bitfield_store(DisasContext *s, int addr, int endpos, -+ int val1, int val2) -+{ -+ int tmp; -+ -+ if (endpos <= 8) -+ gen_store(s, OS_BYTE, addr, val1); -+ else if (endpos <= 24) { -+ gen_store(s, OS_WORD, addr, val1); -+ if (endpos > 16) { -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_add32(tmp, addr, gen_im32(2)); -+ gen_store(s, OS_BYTE, tmp, val2); -+ } -+ } else { -+ gen_store(s, OS_LONG, addr, val1); -+ if (endpos > 32) { -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_add32(tmp, addr, gen_im32(4)); -+ gen_store(s, OS_BYTE, tmp, val2); -+ } -+ } -+} -+ -+static int gen_bitfield_cc(DisasContext *s, int offset, int width, -+ int val1, int val2) -+{ -+ int dest; -+ int tmp; -+ -+ dest = gen_new_qreg(QMODE_I32); -+ if (offset + width <= 8) -+ gen_op_shl32(dest, val1, gen_im32(24 + offset)); -+ else if (offset + width <= 24) { -+ gen_op_shl32(dest, val1, gen_im32(16 + offset)); -+ if (offset + width > 16) { -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_shl32(tmp, val2, gen_im32(8 + offset)); -+ gen_op_or32(dest, dest, tmp); -+ } -+ } else { -+ gen_op_shl32(dest, val1, gen_im32(offset)); -+ if (offset + width > 32) { -+ tmp = gen_new_qreg(QMODE_I32); -+ gen_op_shr32(tmp, val2, gen_im32(offset)); -+ gen_op_or32(dest, dest, tmp); -+ } -+ } -+ gen_op_and32(dest, dest, gen_im32(0xffffffff << (32 - width))); -+ gen_logic_cc(s, dest); -+ return dest; -+} -+ -+static void gen_bitfield_op(int offset, int width, int op, int val1, int val2) -+{ -+ uint32_t mask1; -+ uint32_t mask2; -+ int endpos = offset + width; -+ -+ if (endpos <= 8) { -+ mask1 = (0xff >> offset) & (0xff << (8 - endpos)); -+ mask2 = 0; -+ } else if (endpos <= 16) { -+ mask1 = (0xffff >> offset) & (0xffff << (16 - endpos)); -+ mask2 = 0; -+ } else if (endpos <= 24) { -+ mask1 = 0xffffff >> offset; -+ mask2 = 0xff & (0xff << (24 - endpos)); -+ } else if (endpos <= 32) { -+ mask1 = (0xffffffff >> offset) & (0xffffffff << (32 - endpos)); -+ mask2 = 0; -+ } else { -+ mask1 = 0xffffffff >> offset; -+ mask2 = 0xff & (0xff << (40 - endpos)); -+ } -+ switch (op) { -+ case 2: /* bfchg */ -+ gen_op_xor32(val1, val1, gen_im32(mask1)); -+ if (mask2) -+ gen_op_xor32(val2, val2, gen_im32(mask2)); -+ break; -+ case 4: /* bfclr */ -+ gen_op_and32(val1, val1, gen_im32(~mask1)); -+ if (mask2) -+ gen_op_and32(val2, val2, gen_im32(~mask2)); -+ break; -+ case 6: /* bfset */ -+ gen_op_or32(val1, val1, gen_im32(mask1)); -+ if (mask2) -+ gen_op_or32(val2, val2, gen_im32(mask2)); -+ break; -+ } -+} -+ -+static void gen_bitfield_ins(int offset, int width, int src, -+ int val1, int val2) -+{ -+ int tmp; -+ int endpos = offset + width; -+ -+ tmp = gen_new_qreg(QMODE_I32); -+ if (width < 32) { -+ gen_op_and32(tmp, src, gen_im32((1u << width) - 1)); -+ } else -+ gen_op_mov32(tmp, src); -+ if (endpos <= 8) { -+ if (endpos < 8) -+ gen_op_shl32(tmp, tmp, gen_im32(8 - endpos)); -+ gen_op_or32(val1, val1, tmp); -+ } else if (endpos <= 16) { -+ if (endpos < 16) -+ gen_op_shl32(tmp, tmp, gen_im32(16 - endpos)); -+ gen_op_or32(val1, val1, tmp); -+ } else if (endpos <= 24) { -+ gen_op_shr32(tmp, tmp, gen_im32(endpos - 16)); -+ gen_op_or32(val1, val1, tmp); -+ gen_op_and32(tmp, src, gen_im32((1u << (endpos - 16)) - 1)); -+ if (endpos < 24) -+ gen_op_shl32(tmp, tmp, gen_im32(24 - endpos)); -+ gen_op_or32(val2, val2, tmp); -+ } else if (endpos <= 32) { -+ if (endpos < 32) -+ gen_op_shl32(tmp, tmp, gen_im32(32 - endpos)); -+ gen_op_or32(val1, val1, tmp); -+ } else { -+ gen_op_shr32(tmp, tmp, gen_im32(endpos - 32)); -+ gen_op_or32(val1, val1, tmp); -+ gen_op_and32(tmp, src, gen_im32((1u << (endpos - 32)) - 1)); -+ gen_op_shr32(tmp, tmp, gen_im32(32 - endpos)); -+ gen_op_or32(val2, val2, tmp); -+ } -+} -+ -+DISAS_INSN(bitfield_mem) -+{ -+ uint16_t ext; -+ int val; -+ int val1, val2; -+ int src; -+ int offset; -+ int width; -+ int op; -+ int reg; -+ int addr; -+ uint32_t mask; -+ -+ op = (insn >> 8) & 7; -+ ext = lduw_code(s->pc); -+ s->pc += 2; -+ src = gen_lea(s, insn, OS_LONG); -+ if (src == -1) { -+ gen_addr_fault(s); -+ return; -+ } -+ if ((ext & 0x820) == 0) { -+ /* constant offset and width */ -+ offset = (ext >> 6) & 31; -+ width = (ext & 31); -+ if (width == 0) -+ width = 32; -+ reg = DREG(ext, 12); -+ mask = 0xffffffff << (32 - width); -+ addr = gen_new_qreg(QMODE_I32); -+ if (offset > 7) { -+ gen_op_add32(addr, src, gen_im32(offset >> 3)); -+ offset &= 7; -+ } else -+ gen_op_mov32(addr, src); -+ if (offset > 0) -+ mask <<= 32 - offset; -+ gen_bitfield_load(s, addr, offset + width, &val1, &val2); -+ val = gen_bitfield_cc(s, offset, width, val1, val2); -+ switch (op) { -+ case 0: /* bftst */ -+ break; -+ case 1: /* bfextu */ -+ if (width < 32) -+ gen_op_shr32(reg, val, gen_im32(32 - width)); -+ else -+ gen_op_mov32(reg, val); -+ break; -+ case 3: /* bfexts */ -+ if (width < 32) -+ gen_op_sar32(reg, val, gen_im32(32 - width)); -+ else -+ gen_op_mov32(reg, val); -+ break; -+ case 5: /* bfffo */ -+ gen_op_bfffo(val, val, gen_im32(width)); -+ gen_op_add32(reg, val, gen_im32(offset)); -+ break; -+ case 2: /* bfchg */ -+ case 4: /* bfclr */ -+ case 6: /* bfset */ -+ gen_bitfield_op(offset, width, op, val1, val2); -+ gen_bitfield_store(s, addr, offset + width, val1, val2); -+ break; -+ case 7: /* bfins */ -+ gen_bitfield_op(offset, width, 4, val1, val2); -+ gen_bitfield_ins(offset, width, reg, val1, val2); -+ gen_bitfield_store(s, addr, offset + width, val1, val2); -+ break; -+ } -+ return; -+ } -+ /* Not yet implemented */ -+ gen_exception(s, s->pc - 4, EXCP_UNSUPPORTED); -+} -+ - DISAS_INSN(ff1) - { - int reg; -@@ -2194,17 +3079,42 @@ - case 7: - { - int addr; -+ int incr; - uint16_t mask; -- if ((ext & 0x1f00) != 0x1000 || (ext & 0xff) == 0) -+ if ((ext & 0xf00) != 0 || (ext & 0xff) == 0) - goto undef; -- src = gen_lea(s, insn, OS_LONG); -- if (src == -1) { -- gen_addr_fault(s); -- return; -- } -+ if ((ext & 0x1000) == 0 && !m68k_feature(s->env, M68K_FEATURE_FPU)) -+ goto undef; -+ if ((insn & 070) == 040) -+ src = AREG(insn, 0); -+ else { -+ src = gen_lea(s, insn, OS_LONG); -+ if (src == -1) { -+ gen_addr_fault(s); -+ return; -+ } -+ } - addr = gen_new_qreg(QMODE_I32); - gen_op_mov32(addr, src); - mask = 0x80; -+ if (m68k_feature(s->env, M68K_FEATURE_FPU)) -+ incr = gen_im32(12); -+ else -+ incr = gen_im32(8); -+ if ((ext & (1 << 13)) && (insn & 070) == 040) { -+ dest = QREG_F7; -+ while (mask) { -+ if (ext & mask) { -+ s->is_mem = 1; -+ gen_op_sub32(addr, addr, incr); -+ gen_op_mov32(AREG(insn, 0), addr); -+ gen_st(s, f64, addr, dest); -+ } -+ mask >>= 1; -+ dest++; -+ } -+ return; -+ } - dest = QREG_F0; - while (mask) { - if (ext & mask) { -@@ -2216,8 +3126,11 @@ - /* load */ - gen_ld(s, f64, dest, addr); - } -- if (ext & (mask - 1)) -- gen_op_add32(addr, addr, gen_im32(8)); -+ if (ext & (mask - 1) || (insn & 070) == 030) { -+ gen_op_add32(addr, addr, incr); -+ if ((insn & 070) == 030) -+ gen_op_mov32(AREG(insn, 0), addr); -+ } - } - mask >>= 1; - dest++; -@@ -2293,6 +3206,12 @@ - case 0x23: case 0x63: case 0x67: /* fmul */ - gen_op_mulf64(res, res, src); - break; -+ case 0x24: /* fsgldiv */ -+ gen_op_divf64(res, res, src); -+ break; -+ case 0x27: /* fsglmul */ -+ gen_op_mulf64(res, res, src); -+ break; - case 0x28: case 0x68: case 0x6c: /* fsub */ - gen_op_subf64(res, res, src); - break; -@@ -2759,85 +3678,158 @@ - register_opcode(disas_##name, 0x##opcode, 0x##mask); \ - } while(0) - INSN(undef, 0000, 0000, CF_ISA_A); -+ INSN(undef, 0000, 0000, M68000); - INSN(arith_im, 0080, fff8, CF_ISA_A); -+ INSN(arith_im, 0000, ff00, M68000); -+ INSN(undef, 00c0, ffc0, M68000); - INSN(bitrev, 00c0, fff8, CF_ISA_APLUSC); - INSN(bitop_reg, 0100, f1c0, CF_ISA_A); -+ INSN(bitop_reg, 0100, f1c0, M68000); - INSN(bitop_reg, 0140, f1c0, CF_ISA_A); -+ INSN(bitop_reg, 0140, f1c0, M68000); - INSN(bitop_reg, 0180, f1c0, CF_ISA_A); -+ INSN(bitop_reg, 0180, f1c0, M68000); - INSN(bitop_reg, 01c0, f1c0, CF_ISA_A); -+ INSN(bitop_reg, 01c0, f1c0, M68000); - INSN(arith_im, 0280, fff8, CF_ISA_A); -+ INSN(arith_im, 0200, ff00, M68000); -+ INSN(undef, 02c0, ffc0, M68000); - INSN(byterev, 02c0, fff8, CF_ISA_APLUSC); - INSN(arith_im, 0480, fff8, CF_ISA_A); -+ INSN(arith_im, 0400, ff00, M68000); -+ INSN(undef, 04c0, ffc0, M68000); - INSN(ff1, 04c0, fff8, CF_ISA_APLUSC); - INSN(arith_im, 0680, fff8, CF_ISA_A); -+ INSN(arith_im, 0600, ff00, M68000); -+ INSN(undef, 06c0, ffc0, M68000); -+ INSN(cas, 08c0, f8c0, M68020_60); -+ INSN(cas2, 0cfc, fdff, M68020_40); - INSN(bitop_im, 0800, ffc0, CF_ISA_A); -+ INSN(bitop_im, 0800, ffc0, M68000); - INSN(bitop_im, 0840, ffc0, CF_ISA_A); -+ INSN(bitop_im, 0840, ffc0, M68000); - INSN(bitop_im, 0880, ffc0, CF_ISA_A); -+ INSN(bitop_im, 0880, ffc0, M68000); - INSN(bitop_im, 08c0, ffc0, CF_ISA_A); -+ INSN(bitop_im, 08c0, ffc0, M68000); - INSN(arith_im, 0a80, fff8, CF_ISA_A); -+ INSN(arith_im, 0a00, ff00, M68000); -+ INSN(undef, 0ac0, ffc0, M68000); - INSN(arith_im, 0c00, ff38, CF_ISA_A); -+ INSN(arith_im, 0c00, ff00, M68000); -+ INSN(undef, 0cc0, ffc0, M68000); - INSN(move, 1000, f000, CF_ISA_A); -+ INSN(move, 1000, f000, M68000); - INSN(move, 2000, f000, CF_ISA_A); -+ INSN(move, 2000, f000, M68000); - INSN(move, 3000, f000, CF_ISA_A); -+ INSN(move, 3000, f000, M68000); - INSN(strldsr, 40e7, ffff, CF_ISA_APLUSC); - INSN(negx, 4080, fff8, CF_ISA_A); -+ INSN(negx, 4000, ff00, M68000); -+ INSN(undef, 40c0, ffc0, M68000); - INSN(move_from_sr, 40c0, fff8, CF_ISA_A); -+ INSN(move_from_sr, 40c0, fff8, M68000); - INSN(lea, 41c0, f1c0, CF_ISA_A); -+ INSN(lea, 41c0, f1c0, M68000); - INSN(clr, 4200, ff00, CF_ISA_A); -+ INSN(clr, 4200, ff00, M68000); - INSN(undef, 42c0, ffc0, CF_ISA_A); -+ INSN(undef, 42c0, ffc0, M68000); - INSN(move_from_ccr, 42c0, fff8, CF_ISA_A); - INSN(neg, 4480, fff8, CF_ISA_A); -+ INSN(neg, 4400, ff00, M68000); -+ INSN(undef, 44c0, ffc0, M68000); - INSN(move_to_ccr, 44c0, ffc0, CF_ISA_A); -+ INSN(move_to_ccr, 44c0, ffc0, M68000); - INSN(not, 4680, fff8, CF_ISA_A); -+ INSN(not, 4600, ff00, M68000); -+ INSN(undef, 46c0, ffc0, M68000); - INSN(move_to_sr, 46c0, ffc0, CF_ISA_A); -+ INSN(linkl, 4808, fff8, M68020_60); - INSN(pea, 4840, ffc0, CF_ISA_A); -+ INSN(pea, 4840, ffc0, M68000); - INSN(swap, 4840, fff8, CF_ISA_A); -+ INSN(swap, 4840, fff8, M68000); - INSN(movem, 48c0, fbc0, CF_ISA_A); -+ INSN(movem, 48c0, fbc0, M68000); - INSN(ext, 4880, fff8, CF_ISA_A); -+ INSN(ext, 4880, fff8, M68000); - INSN(ext, 48c0, fff8, CF_ISA_A); -+ INSN(ext, 48c0, fff8, M68000); - INSN(ext, 49c0, fff8, CF_ISA_A); -+ INSN(ext, 49c0, fff8, M68000); - INSN(tst, 4a00, ff00, CF_ISA_A); -+ INSN(tst, 4a00, ff00, M68000); - INSN(tas, 4ac0, ffc0, CF_ISA_B); -+ INSN(tas, 4ac0, ffc0, M68000); - INSN(halt, 4ac8, ffff, CF_ISA_A); - INSN(pulse, 4acc, ffff, CF_ISA_A); - INSN(illegal, 4afc, ffff, CF_ISA_A); -+ INSN(illegal, 4afc, ffff, M68000); - INSN(mull, 4c00, ffc0, CF_ISA_A); -+ INSN(mull, 4c00, ffc0, M68020_60); - INSN(divl, 4c40, ffc0, CF_ISA_A); -+ INSN(divl, 4c40, ffc0, M68020_60); - INSN(sats, 4c80, fff8, CF_ISA_B); - INSN(trap, 4e40, fff0, CF_ISA_A); -+ INSN(trap, 4e40, fff0, M68000); - INSN(link, 4e50, fff8, CF_ISA_A); -+ INSN(link, 4e50, fff8, M68000); - INSN(unlk, 4e58, fff8, CF_ISA_A); -+ INSN(unlk, 4e58, fff8, M68000); - INSN(move_to_usp, 4e60, fff8, USP); - INSN(move_from_usp, 4e68, fff8, USP); - INSN(nop, 4e71, ffff, CF_ISA_A); -+ INSN(nop, 4e71, ffff, M68000); - INSN(stop, 4e72, ffff, CF_ISA_A); -+ INSN(stop, 4e72, ffff, M68000); - INSN(rte, 4e73, ffff, CF_ISA_A); -+ INSN(rte, 4e73, ffff, M68000); - INSN(rts, 4e75, ffff, CF_ISA_A); -+ INSN(rts, 4e75, ffff, M68000); - INSN(movec, 4e7b, ffff, CF_ISA_A); - INSN(jump, 4e80, ffc0, CF_ISA_A); -+ INSN(jump, 4e80, ffc0, M68000); - INSN(jump, 4ec0, ffc0, CF_ISA_A); -- INSN(addsubq, 5180, f1c0, CF_ISA_A); -+ INSN(jump, 4ec0, ffc0, M68000); -+ INSN(addsubq, 5080, f0c0, CF_ISA_A); -+ INSN(addsubq, 5000, f080, M68000); -+ INSN(addsubq, 5080, f0c0, M68000); - INSN(scc, 50c0, f0f8, CF_ISA_A); -- INSN(addsubq, 5080, f1c0, CF_ISA_A); -+ INSN(scc_mem, 50c0, f0c0, M68000); -+ INSN(scc, 50c0, f0f8, M68000); -+ INSN(dbcc, 50c8, f0f8, M68000); - INSN(tpf, 51f8, fff8, CF_ISA_A); - - /* Branch instructions. */ - INSN(branch, 6000, f000, CF_ISA_A); -+ INSN(branch, 6000, f000, M68000); - /* Disable long branch instructions, then add back the ones we want. */ - INSN(undef, 60ff, f0ff, CF_ISA_A); /* All long branches. */ -+ INSN(undef, 60ff, f0ff, M68000); /* All long branches. */ - INSN(branch, 60ff, f0ff, CF_ISA_B); - INSN(undef, 60ff, ffff, CF_ISA_B); /* bra.l */ - INSN(branch, 60ff, ffff, BRAL); -+ INSN(branch, 60ff, f0ff, M68020_60); - - INSN(moveq, 7000, f100, CF_ISA_A); -+ INSN(moveq, 7000, f100, M68000); - INSN(mvzs, 7100, f100, CF_ISA_B); - INSN(or, 8000, f000, CF_ISA_A); -+ INSN(or, 8000, f000, M68000); - INSN(divw, 80c0, f0c0, CF_ISA_A); -+ INSN(divw, 80c0, f0c0, M68000); - INSN(addsub, 9000, f000, CF_ISA_A); -+ INSN(addsub, 9000, f000, M68000); -+ INSN(undef, 90c0, f0c0, CF_ISA_A); - INSN(subx, 9180, f1f8, CF_ISA_A); -+ INSN(subx, 9100, f138, M68000); - INSN(suba, 91c0, f1c0, CF_ISA_A); -+ INSN(suba, 90c0, f0c0, M68000); - - INSN(undef_mac, a000, f000, CF_ISA_A); -+ INSN(undef_mac, a000, f000, M68000); - INSN(mac, a000, f100, CF_EMAC); - INSN(from_mac, a180, f9b0, CF_EMAC); - INSN(move_mac, a110, f9fc, CF_EMAC); -@@ -2856,19 +3848,50 @@ - INSN(cmpa, b0c0, f1c0, CF_ISA_B); /* cmpa.w */ - INSN(cmp, b080, f1c0, CF_ISA_A); - INSN(cmpa, b1c0, f1c0, CF_ISA_A); -+ INSN(cmp, b000, f100, M68000); -+ INSN(cmpa, b0c0, f0c0, M68000); - INSN(eor, b180, f1c0, CF_ISA_A); -+ INSN(eor, b180, f1c0, M68000); - INSN(and, c000, f000, CF_ISA_A); -+ INSN(and, c000, f000, M68000); - INSN(mulw, c0c0, f0c0, CF_ISA_A); -+ INSN(mulw, c0c0, f0c0, M68000); - INSN(addsub, d000, f000, CF_ISA_A); -+ INSN(addsub, d000, f000, M68000); -+ INSN(undef, d0c0, f0c0, CF_ISA_A); - INSN(addx, d180, f1f8, CF_ISA_A); -+ INSN(addx, d100, f138, M68000); - INSN(adda, d1c0, f1c0, CF_ISA_A); -+ INSN(adda, d0c0, f0c0, M68000); - INSN(shift_im, e080, f0f0, CF_ISA_A); - INSN(shift_reg, e0a0, f0f0, CF_ISA_A); -+ INSN(shift_im, e080, f0f0, M68000); -+ INSN(shift8_im, e000, f0f0, M68000); -+ INSN(shift16_im, e040, f0f0, M68000); -+ INSN(shift_reg, e0a0, f0f0, M68000); -+ INSN(shift8_reg, e020, f0f0, M68000); -+ INSN(shift16_reg, e060, f0f0, M68000); -+ INSN(rotate_im, e090, f0f0, M68000); -+ INSN(rotate8_im, e010, f0f0, M68000); -+ INSN(rotate16_im, e050, f0f0, M68000); -+ INSN(rotate_reg, e0b0, f0f0, M68000); -+ INSN(rotate8_reg, e030, f0f0, M68000); -+ INSN(rotate16_reg,e070, f0f0, M68000); -+ INSN(shift_mem, e0c0, fcc0, M68000); -+ INSN(rotate_mem, e4c0, fcc0, M68000); -+ INSN(bitfield_mem,e8c0, f8c0, M68020_60); -+ INSN(bitfield_reg,e8c0, f8f8, M68020_60); -+ - INSN(undef_fpu, f000, f000, CF_ISA_A); -+ INSN(undef_fpu, f000, f000, M68000); - INSN(fpu, f200, ffc0, CF_FPU); - INSN(fbcc, f280, ffc0, CF_FPU); - INSN(frestore, f340, ffc0, CF_FPU); - INSN(fsave, f340, ffc0, CF_FPU); -+ INSN(fpu, f200, ffc0, FPU); -+ INSN(fbcc, f280, ffc0, FPU); -+ INSN(frestore, f340, ffc0, FPU); -+ INSN(fsave, f340, ffc0, FPU); - INSN(intouch, f340, ffc0, CF_ISA_A); - INSN(cpushl, f428, ff38, CF_ISA_A); - INSN(wddata, fb00, ff00, CF_ISA_A); diff --git a/qemu-s390.patch b/qemu-s390.patch deleted file mode 100644 index 0cea5da6..00000000 --- a/qemu-s390.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- qemu-0.9.1/Makefile.target -+++ qemu-0.9.1/Makefile.target -@@ -390,6 +390,9 @@ - ifeq ($(findstring z80, $(TARGET_ARCH) $(ARCH)),z80) - LIBOBJS+=z80-dis.o - endif -+ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390) -+LIBOBJS+=s390-dis.o -+endif - - ifdef CONFIG_GDBSTUB - OBJS+=gdbstub.o ---- qemu-0.9.1/dis-asm.h -+++ qemu-0.9.1/dis-asm.h -@@ -396,6 +396,7 @@ - extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*)); - extern int print_insn_crisv32 PARAMS ((bfd_vma, disassemble_info*)); - extern int print_insn_z80 PARAMS ((bfd_vma, disassemble_info*)); -+extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*)); - - #if 0 - /* Fetch the disassembler for a given BFD, if that support is available. */ ---- qemu-0.9.1/target-i386/translate.c -+++ qemu-0.9.1/target-i386/translate.c -@@ -1795,7 +1795,11 @@ - case CC_OP_SUBW: - case CC_OP_SUBL: - case CC_OP_SUBQ: -+#ifdef __s390__ -+ func = NULL; /* does not work on S/390 for unknown reasons */ -+#else - func = gen_jcc_sub[s->cc_op - CC_OP_SUBB][jcc_op]; -+#endif - break; - - /* some jumps are easy to compute */ -@@ -1843,7 +1847,11 @@ - func = gen_jcc_sub[(s->cc_op - CC_OP_ADDB) % 4][jcc_op]; - break; - case JCC_S: -+#ifdef __s390__ -+ func = NULL; -+#else - func = gen_jcc_sub[(s->cc_op - CC_OP_ADDB) % 4][jcc_op]; -+#endif - break; - default: - func = NULL; diff --git a/qemu-s390dis-license.patch b/qemu-s390dis-license.patch deleted file mode 100644 index 9adc0488..00000000 --- a/qemu-s390dis-license.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- ./s390-dis.c 2007-08-01 15:11:55.000000000 +0200 -+++ ./s390-dis.c 2005-08-22 21:27:46.000000000 +0200 -@@ -1,23 +1,23 @@ - /* s390-dis.c -- Disassemble S390 instructions -- Copyright 2000, 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. -+ Copyright 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). - -- This file is part of the GNU opcodes library. -+ This file is part of GDB, GAS and the GNU binutils. - -- This library is free software; you can redistribute it and/or modify -+ This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3, or (at your option) -- any later version. -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. - -- It is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- License for more details. -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. - - You should have received a copy of the GNU General Public License -- along with this file; see the file COPYING. If not, write to the -- Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, -- MA 02110-1301, USA. */ -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ - - #include - #include "ansidecl.h" -@@ -399,23 +399,23 @@ - /* s390-opc.c -- S390 opcode list -- Copyright 2000, 2001, 2003, 2007 Free Software Foundation, Inc. -+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). - -- This file is part of the GNU opcodes library. -+ This file is part of GDB, GAS, and the GNU binutils. - -- This library is free software; you can redistribute it and/or modify -+ This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3, or (at your option) -- any later version. -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. - -- It is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- License for more details. -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. - - You should have received a copy of the GNU General Public License -- along with this file; see the file COPYING. If not, write to the -- Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, -- MA 02110-1301, USA. */ -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ - - #include - #include "ansidecl.h" diff --git a/qemu-svn-ncurses.patch b/qemu-svn-ncurses.patch new file mode 100644 index 00000000..f2d494b4 --- /dev/null +++ b/qemu-svn-ncurses.patch @@ -0,0 +1,20 @@ +--- configure ++++ configure +@@ -799,7 +799,7 @@ + #include + int main(void) { return curses_version(); } + EOF +- if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses 2> /dev/null ; then ++ if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lncurses 2> /dev/null ; then + curses=yes + fi + fi # test "$curses" +@@ -1102,7 +1102,7 @@ + if test "$curses" = "yes" ; then + echo "#define CONFIG_CURSES 1" >> $config_h + echo "CONFIG_CURSES=yes" >> $config_mak +- echo "CURSES_LIBS=-lcurses" >> $config_mak ++ echo "CURSES_LIBS=-lncurses" >> $config_mak + fi + if test "$brlapi" = "yes" ; then + echo "CONFIG_BRLAPI=yes" >> $config_mak diff --git a/qemu-svn-nodyngen.patch b/qemu-svn-nodyngen.patch new file mode 100644 index 00000000..73146a7e --- /dev/null +++ b/qemu-svn-nodyngen.patch @@ -0,0 +1,26 @@ +--- configure ++++ configure +@@ -547,11 +547,6 @@ + mipsel-softmmu \ + mips64-softmmu \ + mips64el-softmmu \ +-ppc-softmmu \ +-ppcemb-softmmu \ +-ppc64-softmmu \ +-sh4-softmmu \ +-sh4eb-softmmu \ + sparc-softmmu \ + " + fi +@@ -567,11 +562,6 @@ + m68k-linux-user \ + mips-linux-user \ + mipsel-linux-user \ +-ppc-linux-user \ +-ppc64-linux-user \ +-ppc64abi32-linux-user \ +-sh4-linux-user \ +-sh4eb-linux-user \ + sparc-linux-user \ + sparc64-linux-user \ + sparc32plus-linux-user \ diff --git a/qemu-svn-pcap.patch b/qemu-svn-pcap.patch new file mode 100644 index 00000000..326acf93 --- /dev/null +++ b/qemu-svn-pcap.patch @@ -0,0 +1,189 @@ +Index: Makefile.target +================================================================================ +--- Makefile.target ++++ Makefile.target +@@ -625,6 +625,9 @@ + ifdef CONFIG_SLIRP + CPPFLAGS+=-I$(SRC_PATH)/slirp + endif ++ifdef CONFIG_PCAP ++LIBS+=-lpcap ++endif + + LIBS+=$(AIOLIBS) + # specific flags are needed for non soft mmu emulator +--- configure ++++ configure +@@ -90,6 +90,7 @@ + gdbstub="yes" + slirp="yes" + vde="no" ++pcap="yes" + fmod_lib="" + fmod_inc="" + vnc_tls="yes" +@@ -283,6 +284,8 @@ + ;; + --enable-vde) vde="yes" + ;; ++ --disable-pcap) pcap="no" ++ ;; + --disable-kqemu) kqemu="no" + ;; + --disable-brlapi) brlapi="no" +@@ -1066,6 +1069,10 @@ + echo "#define CONFIG_VDE 1" >> $config_h + echo "VDE_LIBS=-lvdeplug" >> $config_mak + fi ++if test "$pcap" = "yes" ; then ++ echo "CONFIG_PCAP=yes" >> $config_mak ++ echo "#define CONFIG_PCAP 1" >> $config_h ++fi + for card in $audio_card_list; do + def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'` + echo "$def=yes" >> $config_mak +--- vl.c ++++ vl.c +@@ -102,6 +102,10 @@ + int inet_aton(const char *cp, struct in_addr *ia); + #endif + ++#if defined(CONFIG_PCAP) ++#include ++#endif ++ + #if defined(CONFIG_SLIRP) + #include "libslirp.h" + #endif +@@ -4112,6 +4116,104 @@ + + #endif /* CONFIG_SLIRP */ + ++#if defined(CONFIG_PCAP) ++ ++typedef struct PCAPState { ++ VLANClientState *vc; ++ pcap_t *handle; ++} PCAPState; ++ ++static void pcap_receive(void *opaque, const uint8_t *buf, int size) ++{ ++ PCAPState *s = (PCAPState *)opaque; ++ ++ pcap_sendpacket(s->handle, (u_char*)buf, size); ++} ++ ++static void pcap_callback(u_char *user, struct pcap_pkthdr *phdr, u_char *pdata) ++{ ++ VLANClientState *vc = (VLANClientState *)user; ++ ++ qemu_send_packet(vc, pdata, phdr->len); ++} ++ ++static void pcap_send(void *opaque) ++{ ++ PCAPState *s = (PCAPState *)opaque; ++ ++ pcap_dispatch(s->handle, 1, (pcap_handler)&pcap_callback, (u_char *)s->vc); ++} ++ ++static int net_pcap_init(VLANState *vlan, char *ifname) ++{ ++ PCAPState *s; ++ char errbuf[PCAP_ERRBUF_SIZE]; ++ int fd; ++ ++ s = qemu_mallocz(sizeof(PCAPState)); ++ if (!s) ++ return -1; ++ ++ if (ifname == NULL && (ifname = pcap_lookupdev(errbuf)) == NULL) { ++ fprintf(stderr, "qemu: pcap_lookupdev: %s\n", errbuf); ++ goto fail; ++ } ++ ++ /* Attempt to connect device. */ ++ s->handle = (void*)pcap_open_live(ifname, 65535, 1, 0, errbuf); ++ if (!s->handle) { ++ fprintf(stderr, "qemu: pcap_open_live: %s\n", errbuf); ++ goto fail; ++ } ++ ++ /* Check non-blocking mode. */ ++ if (pcap_setnonblock(s->handle, 1, errbuf) < 0) { ++ fprintf(stderr, "qemu: pcap_setnonblock: %s\n", errbuf); ++ goto fail; ++ } ++ ++#if defined(BIOCSHDRCMPLT) ++ /* ++ * Tell the kernel that the header is fully-formed when it gets it. ++ * This is required in order to fake the src address. ++ */ ++ { ++ unsigned int one = 1; ++ ioctl(pcap_fileno(s->handle), BIOCSHDRCMPLT, &one); ++ } ++#endif /* BIOCSHDRCMPLT */ ++ ++#if defined(BIOCIMMEDIATE) ++ /* ++ * Tell the kernel that the packet has to be processed immediately. ++ */ ++ { ++ unsigned int one = 1; ++ ioctl(pcap_fileno(s->handle), BIOCIMMEDIATE, &one); ++ } ++#endif /* BIOCIMMEDIATE */ ++ ++ s->vc = qemu_new_vlan_client(vlan, pcap_receive, NULL, s); ++ snprintf(s->vc->info_str, sizeof(s->vc->info_str), "pcap redirector"); ++ if ((fd = pcap_get_selectable_fd(s->handle)) < 0) { ++ fprintf(stderr, "qemu: pcap_get_selectable_fd failed\n"); ++ goto fail; ++ } ++ qemu_set_fd_handler(fd, pcap_send, NULL, s); ++ ++ return 0; ++ ++fail: ++ if (s) { ++ if (s->handle) ++ pcap_close(s->handle); ++ qemu_free(s); ++ } ++ ++ return -1; ++} ++#endif /* CONFIG_PCAP */ ++ + #if !defined(_WIN32) + + typedef struct TAPState { +@@ -5056,6 +5158,15 @@ + ret = net_slirp_init(vlan); + } else + #endif ++#ifdef CONFIG_PCAP ++ if (!strcmp(device, "pcap")) { ++ char ifname[64]; ++ if (get_param_value(ifname, sizeof(ifname), "ifname", p) <= 0) ++ ret = net_pcap_init(vlan, NULL); ++ else ++ ret = net_pcap_init(vlan, ifname); ++ } else ++#endif + #ifdef _WIN32 + if (!strcmp(device, "tap")) { + char ifname[64]; +@@ -7491,6 +7602,10 @@ + " connect the user mode network stack to VLAN 'n' and send\n" + " hostname 'host' to DHCP clients\n" + #endif ++#ifdef CONFIG_PCAP ++ "-net pcap[,vlan=n][,ifname=name]\n" ++ " connect the host network interface using PCAP to VLAN 'n'\n" ++#endif + #ifdef _WIN32 + "-net tap[,vlan=n],ifname=name\n" + " connect the host TAP network interface to VLAN 'n'\n" diff --git a/qemu-z80.diff b/qemu-z80.diff deleted file mode 100644 index d7de5d49..00000000 --- a/qemu-z80.diff +++ /dev/null @@ -1,5693 +0,0 @@ ---- qemu-0.9.1/Makefile -+++ qemu-0.9.1/Makefile -@@ -179,7 +179,7 @@ - mkdir -p "$(DESTDIR)$(datadir)" - for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ - video.x openbios-sparc32 pxe-ne2k_pci.bin \ -- pxe-rtl8139.bin pxe-pcnet.bin; do \ -+ pxe-rtl8139.bin pxe-pcnet.bin zx-rom.bin ; do \ - $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ - done - ifndef CONFIG_WIN32 ---- qemu-0.9.1/Makefile.target -+++ qemu-0.9.1/Makefile.target -@@ -342,6 +342,13 @@ - endif - endif - -+ifeq ($(TARGET_BASE_ARCH), z80) -+LIBOBJS+=helper.o helper2.o -+ifdef CONFIG_LIBSPECTRUM -+LIBS+=-lspectrum -+endif -+endif -+ - # NOTE: the disassembler code is only needed for debugging - LIBOBJS+=disas.o - ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) -@@ -377,6 +384,9 @@ - ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390) - LIBOBJS+=s390-dis.o - endif -+ifeq ($(findstring z80, $(TARGET_ARCH) $(ARCH)),z80) -+LIBOBJS+=z80-dis.o -+endif - - ifdef CONFIG_GDBSTUB - OBJS+=gdbstub.o -@@ -512,6 +522,10 @@ - VL_OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o - VL_OBJS+= m68k-semi.o dummy_m68k.o - endif -+ifeq ($(TARGET_BASE_ARCH), z80) -+VL_OBJS+= zx_spectrum.o zx_ula.o dma.o $(AUDIODRV) -+VL_OBJS+= serial.o i8259.o -+endif - ifdef CONFIG_GDBSTUB - VL_OBJS+=gdbstub.o - endif -@@ -608,9 +622,15 @@ - helper.o: helper.c - $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< - else -+ifeq ($(TARGET_BASE_ARCH), z80) -+# XXX: rename helper.c to op_helper.c -+helper.o: helper.c -+ $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< -+else - op_helper.o: op_helper.c - $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< - endif -+endif - - cpu-exec.o: cpu-exec.c - $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< -@@ -634,6 +654,9 @@ - ifneq ($(PROGS),) - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" - endif -+ifeq ($(TARGET_BASE_ARCH), z80) -+op.o: op.c opreg_template.h ops_mem.h -+endif - - ifneq ($(wildcard .depend),) - include .depend ---- qemu-0.9.1/configure -+++ qemu-0.9.1/configure -@@ -89,6 +89,7 @@ - dsound="no" - coreaudio="no" - alsa="no" -+libspectrum="no" - fmod="no" - fmod_lib="" - fmod_inc="" -@@ -270,6 +271,8 @@ - ;; - --disable-vnc-tls) vnc_tls="no" - ;; -+ --enable-libspectrum) libspectrum="yes" -+ ;; - --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; linux_user="no" - ;; - --disable-slirp) slirp="no" -@@ -407,6 +410,7 @@ - echo " --enable-fmod enable FMOD audio driver" - echo " --enable-dsound enable DirectSound audio driver" - echo " --disable-vnc-tls disable TLS encryption for VNC server" -+echo " --enable-libspectrum enable ZX Spectrum snapshot loading" - echo " --enable-system enable all system emulation targets" - echo " --disable-system disable all system emulation targets" - echo " --enable-linux-user enable all linux usermode emulation targets" -@@ -739,6 +743,7 @@ - if test -n "$sparc_cpu"; then - echo "Target Sparc Arch $sparc_cpu" - fi -+echo "libspec. support $libspectrum" - echo "kqemu support $kqemu" - echo "Documentation $build_docs" - [ ! -z "$uname_release" ] && \ -@@ -917,6 +922,10 @@ - echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_mak - echo "#define CONFIG_VNC_TLS 1" >> $config_h - fi -+if test "$libspectrum" = "yes" ; then -+ echo "CONFIG_LIBSPECTRUM=yes" >> $config_mak -+ echo "#define CONFIG_LIBSPECTRUM 1" >> $config_h -+fi - qemu_version=`head $source_path/VERSION` - echo "VERSION=$qemu_version" >>$config_mak - echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h -@@ -1146,6 +1155,11 @@ - echo "TARGET_ARCH=alpha" >> $config_mak - echo "#define TARGET_ARCH \"alpha\"" >> $config_h - echo "#define TARGET_ALPHA 1" >> $config_h -+elif test "$target_cpu" = "z80" ; then -+ echo "TARGET_ARCH=z80" >> $config_mak -+ echo "#define TARGET_ARCH \"z80\"" >> $config_h -+ echo "#define TARGET_Z80 1" >> $config_h -+ bflt="yes" - else - echo "Unsupported target CPU" - exit 1 ---- qemu-0.9.1/cpu-exec.c -+++ qemu-0.9.1/cpu-exec.c -@@ -261,6 +261,10 @@ - flags = 0; - cs_base = 0; - pc = env->pc; -+#elif defined(TARGET_Z80) -+ flags = env->hflags; -+ cs_base = 0; -+ pc = env->pc; - #else - #error unsupported CPU - #endif -@@ -331,6 +335,15 @@ - #elif defined(TARGET_SH4) - #elif defined(TARGET_CRIS) - /* XXXXX */ -+#elif defined(TARGET_Z80) -+ env_to_regs(); -+ /* put eflags in CPU temporary format */ -+ CC_SRC = env->eflags & (CC_S | CC_Z | CC_P | CC_C); -+ CC_OP = CC_OP_EFLAGS; -+ env->eflags &= ~(CC_S | CC_Z | CC_P | CC_C); -+#elif defined(TARGET_Z80) -+ /* restore flags in standard format */ -+// env->eflags = env->eflags | cc_table[CC_OP].compute_all(); - #else - #error unsupported target CPU - #endif -@@ -573,6 +586,13 @@ - do_interrupt(1); - BREAK_CHAIN; - } -+#elif defined(TARGET_Z80) -+ if (interrupt_request & CPU_INTERRUPT_HARD) { -+ env->interrupt_request &= ~CPU_INTERRUPT_HARD; -+// Z80 FIXME Z80 -+// env->exception_index = EXCP_IRQ; -+ do_interrupt(env); -+ } - #endif - /* Don't use the cached interupt_request value, - do_interrupt may have updated the EXITTB flag. */ -@@ -618,6 +638,8 @@ - cpu_dump_state(env, logfile, fprintf, 0); - #elif defined(TARGET_CRIS) - cpu_dump_state(env, logfile, fprintf, 0); -+#elif defined(TARGET_Z80) -+ cpu_dump_state(env, logfile, fprintf, 0); - #else - #error unsupported target CPU - #endif -@@ -722,6 +744,9 @@ - #elif defined(TARGET_ALPHA) - #elif defined(TARGET_CRIS) - /* XXXXX */ -+#elif defined(TARGET_Z80) -+ /* restore flags in standard format */ -+// env->eflags = env->eflags | cc_table[CC_OP].compute_all(); - #else - #error unsupported target CPU - #endif ---- qemu-0.9.1/dis-asm.h -+++ qemu-0.9.1/dis-asm.h -@@ -395,6 +395,7 @@ - extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*)); - extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*)); - extern int print_insn_crisv32 PARAMS ((bfd_vma, disassemble_info*)); -+extern int print_insn_z80 PARAMS ((bfd_vma, disassemble_info*)); - - #if 0 - /* Fetch the disassembler for a given BFD, if that support is available. */ ---- qemu-0.9.1/disas.c -+++ qemu-0.9.1/disas.c -@@ -208,6 +208,8 @@ - #elif defined(TARGET_CRIS) - disasm_info.mach = bfd_mach_cris_v32; - print_insn = print_insn_crisv32; -+#elif defined(TARGET_Z80) -+ print_insn = print_insn_z80; - #else - fprintf(out, "0x" TARGET_FMT_lx - ": Asm output not supported on this arch\n", code); ---- qemu-0.9.1/exec-all.h -+++ qemu-0.9.1/exec-all.h -@@ -52,7 +52,7 @@ - typedef void (GenOpFunc2)(long, long); - typedef void (GenOpFunc3)(long, long, long); - --#if defined(TARGET_I386) -+#if defined(TARGET_I386) | defined(TARGET_Z80) - - void optimize_flags_init(void); - ---- qemu-0.9.1/exec.c -+++ qemu-0.9.1/exec.c -@@ -731,6 +731,9 @@ - current_flags |= (env->eflags & (IOPL_MASK | TF_MASK | VM_MASK)); - current_cs_base = (target_ulong)env->segs[R_CS].base; - current_pc = current_cs_base + env->eip; -+#elif defined(TARGET_Z80) -+ current_flags = env->hflags; -+ current_pc = env->pc; - #else - #error unsupported CPU - #endif ---- qemu-0.9.1/gdbstub.c -+++ qemu-0.9.1/gdbstub.c -@@ -856,6 +856,34 @@ - for (i = 0; i < 16; i++) LOAD(env->regs[i]); - LOAD (env->pc); - } -+#elif defined(TARGET_Z80) -+/* Z80 FIXME Z80 TODO Z80 */ -+/* GDB doesn't define this yet */ -+static int cpu_gdb_read_registers(CPUState *env, uint8_t *mem_buf) -+{ -+ uint32_t *registers = (uint32_t *)mem_buf; -+ int i, fpus; -+ -+ for(i = 0; i < 8; i++) { -+ registers[i] = env->regs[i]; -+ } -+ registers[8] = env->pc; -+ registers[9] = env->imode; -+ -+ return 10 * 4; -+} -+ -+static void cpu_gdb_write_registers(CPUState *env, uint8_t *mem_buf, int size) -+{ -+ uint32_t *registers = (uint32_t *)mem_buf; -+ int i; -+ -+ for(i = 0; i < 8; i++) { -+ env->regs[i] = tswapl(registers[i]); -+ } -+ env->pc = tswapl(registers[8]); -+ env->imode = tswapl(registers[9]); -+} - #else - static int cpu_gdb_read_registers(CPUState *env, uint8_t *mem_buf) - { ---- qemu-0.9.1/hw/boards.h -+++ qemu-0.9.1/hw/boards.h -@@ -26,6 +26,9 @@ - extern QEMUMachine pc_machine; - extern QEMUMachine isapc_machine; - -+/* z80.c */ -+extern QEMUMachine z80pc_machine; -+ - /* ppc.c */ - extern QEMUMachine prep_machine; - extern QEMUMachine core99_machine; ---- qemu-0.9.1/hw/zx_spectrum.c -+++ qemu-0.9.1/hw/zx_spectrum.c -@@ -0,0 +1,308 @@ -+/* -+ * QEMU ZX Spectrum Emulator -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003-2004 Fabrice Bellard -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a copy -+ * of this software and associated documentation files (the "Software"), to deal -+ * in the Software without restriction, including without limitation the rights -+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -+ * copies of the Software, and to permit persons to whom the Software is -+ * furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -+ * THE SOFTWARE. -+ */ -+#include "hw.h" -+#include "console.h" -+#include "sysemu.h" -+#include "qemu-timer.h" -+#include "zx_ula.h" -+#include "boards.h" -+#ifdef CONFIG_LIBSPECTRUM -+#include -+#endif -+ -+/* output Bochs bios info messages */ -+//#define DEBUG_BIOS -+ -+#define ROM_FILENAME "zx-rom.bin" -+ -+#define KERNEL_LOAD_ADDR 0x00100000 -+#define INITRD_LOAD_ADDR 0x00600000 -+#define KERNEL_PARAMS_ADDR 0x00090000 -+#define KERNEL_CMDLINE_ADDR 0x00099000 -+ -+int keystate[8]; -+ -+static uint32_t io_keyboard_read(void *opaque, uint32_t addr) -+{ -+ int r = 0; -+ uint8_t colbits = 0xff; -+ -+ uint32_t rowbits = ((addr >> 8) & 0xff); -+ -+ for (r = 0; r < 8; r++) { -+ if (!(rowbits & (1 << r))) { -+ colbits &= keystate[r]; -+ } -+ } -+ return colbits; -+} -+ -+static uint32_t io_spectrum_read(void *opaque, uint32_t addr) -+{ -+ if (addr & 1) -+ return 0xff; -+ -+ return io_keyboard_read(opaque, addr); -+} -+ -+#if 0 -+/* MSDOS compatibility mode FPU exception support */ -+/* XXX: add IGNNE support */ -+void cpu_set_ferr(CPUZ80State *s) -+{ -+ pic_set_irq(13, 1); -+} -+#endif -+ -+/* TSC handling */ -+uint64_t cpu_get_tsc(CPUZ80State *env) -+{ -+ return cpu_get_ticks(); -+} -+ -+static void main_cpu_reset(void *opaque) -+{ -+ CPUState *env = opaque; -+ cpu_reset(env); -+} -+ -+QEMUTimer *zx_ulatimer; -+int zx_flash = 0; -+ -+void zx_50hz_timer(void *opaque) -+{ -+// printf("zx_irq_timer()\n"); -+ int64_t next_time; -+ -+ CPUState *env = opaque; -+ cpu_interrupt(env, CPU_INTERRUPT_HARD); -+ -+ /* FIXME: 50 Hz */ -+ next_time = qemu_get_clock(vm_clock) + muldiv64(1, ticks_per_sec, 50); -+ qemu_mod_timer(zx_ulatimer, next_time); -+ -+ zx_flash++; -+ zx_flash %= 32; -+ if ((zx_flash % 16) == 0) { -+ zx_set_flash_dirty(); -+ } -+} -+ -+CPUState *zx_env; -+ -+void zx_timer_init(DisplayState *ds) { -+ /* FIXME */ -+ -+ int64_t t = qemu_get_clock(vm_clock); -+ zx_ulatimer = qemu_new_timer(vm_clock, zx_50hz_timer, zx_env); -+ qemu_mod_timer(zx_ulatimer, t); -+} -+ -+static const uint8_t keycodes[128] = { -+ 0x00, 0x00, 0x31, 0x32, 0x33, 0x34, 0x35, 0x45, -+ 0x44, 0x43, 0x42, 0x41, 0x00, 0x00, 0x00, 0x00, -+ 0x21, 0x22, 0x23, 0x24, 0x25, 0x55, 0x54, 0x53, -+ 0x52, 0x51, 0x00, 0x00, 0x61, 0x72, 0x11, 0x12, -+ 0x13, 0x14, 0x15, 0x65, 0x64, 0x63, 0x62, 0x00, -+ 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x04, 0x05, -+ 0x75, 0x74, 0x73, 0x00, 0x00, 0x00, 0x01, 0x00, -+ 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+}; -+ -+static void zx_put_keycode(void *opaque, int keycode) { -+ int release = keycode & 0x80; -+ keycode &= 0x7f; -+ -+ //printf("Keycode %d (%s)\n", keycode, release? "release" : "press"); -+ -+ keycode = keycodes[keycode]; -+ -+ if (keycode) { -+ int row = keycode >> 4; -+ int col = 1 << ((keycode & 0xf) - 1); -+ if (release) { -+ keystate[row] |= col; -+ } else { -+ keystate[row] &= ~col; -+ } -+ } -+} -+ -+static void zx_keyboard_init() -+{ -+ int i; -+ for (i=0; i<8; i++) { -+ keystate[i] = 0xff; -+ } -+ qemu_add_kbd_event_handler(zx_put_keycode, NULL); -+} -+ -+static const int ide_iobase[2] = { 0x1f0, 0x170 }; -+static const int ide_iobase2[2] = { 0x3f6, 0x376 }; -+static const int ide_irq[2] = { 14, 15 }; -+ -+/* ZX Spectrum initialisation */ -+static void zx_init1(int ram_size, int vga_ram_size, int boot_device, -+ DisplayState *ds, const char **fd_filename, int snapshot, -+ const char *kernel_filename, const char *kernel_cmdline, -+ const char *initrd_filename, -+ int pci_enabled) -+{ -+ char buf[1024]; -+ int ret; -+ ram_addr_t ram_addr, vga_ram_addr, rom_offset; -+ int rom_size; -+ CPUState *env; -+ -+ /* init CPUs */ -+ env = cpu_init("z80"); -+ zx_env = env; // XXX -+ register_savevm("cpu", 0, 4, cpu_save, cpu_load, env); -+ qemu_register_reset(main_cpu_reset, env); -+ -+ cpu_register_physical_memory(0x4000, 0x10000 - 0x4000, 0 | IO_MEM_RAM); -+ -+ /* allocate RAM */ -+// ram_addr = qemu_ram_alloc(0x10000 - 0x5b00); -+// cpu_register_physical_memory(0x5b00, 0x10000 - 0x5b00, 0); -+ //ram_addr = qemu_ram_alloc(0x10000 - 0x4000); -+ //cpu_register_physical_memory(0x4000, 0x10000 - 0x4000, ram_addr); -+ -+// cpu_register_physical_memory(0x6000, 0x10000 - 0x6000, 0); -+ -+ /* ROM load */ -+ snprintf(buf, sizeof(buf), "%s/%s", bios_dir, ROM_FILENAME); -+ rom_size = get_image_size(buf); -+ if (rom_size <= 0 || -+ (rom_size % 16384) != 0) { -+ goto rom_error; -+ } -+// rom_offset = qemu_ram_alloc(rom_size); -+ rom_offset = 0x10000; -+ ret = load_image(buf, phys_ram_base + rom_offset); -+ if (ret != rom_size) { -+ rom_error: -+ fprintf(stderr, "qemu: could not load ZX Spectrum ROM '%s'\n", buf); -+ exit(1); -+ } -+ -+ cpu_register_physical_memory(0x0000, 0x4000, rom_offset | IO_MEM_ROM); -+ -+ /* map entire I/O space */ -+ register_ioport_read(0, 0x10000, 1, io_spectrum_read, NULL); -+ -+ zx_ula_init(ds, phys_ram_base + ram_size, ram_size); -+ -+ zx_keyboard_init(); -+ zx_timer_init(ds); -+ -+#ifdef CONFIG_LIBSPECTRUM -+ if(kernel_filename) { -+ libspectrum_id_t type; -+ libspectrum_class_t cls; -+ libspectrum_snap* snap; -+ uint8_t* snapmem; -+ libspectrum_byte* page; -+ int length; -+ int i; -+ if(libspectrum_init() != LIBSPECTRUM_ERROR_NONE || -+ libspectrum_identify_file(&type, kernel_filename, NULL, 0) != LIBSPECTRUM_ERROR_NONE || -+ libspectrum_identify_class(&cls, type) != LIBSPECTRUM_ERROR_NONE || -+ libspectrum_snap_alloc(&snap) != LIBSPECTRUM_ERROR_NONE) { -+ fprintf(stderr, "%s: libspectrum error\n", __FUNCTION__); -+ exit(1); -+ } -+ if(cls != LIBSPECTRUM_CLASS_SNAPSHOT) { -+ fprintf(stderr, "%s: %s is not a snapshot\n", __FUNCTION__, kernel_filename); -+ exit(1); -+ } -+ snapmem = malloc(65536); -+ length = load_image(kernel_filename, snapmem); -+ //printf("loaded %d bytes from %s\n",length, kernel_filename); -+ if(libspectrum_snap_read(snap, snapmem, length, type, NULL) != LIBSPECTRUM_ERROR_NONE) { -+ fprintf(stderr, "%s: failed to load snapshot %s\n", __FUNCTION__, kernel_filename); -+ exit(1); -+ } -+ //printf("snap pc = %d\n",libspectrum_snap_pc(snap)); -+ page = libspectrum_snap_pages(snap, 5); -+ for(i = 0x4000; i < 0x8000; i++) { -+ //printf("storing 0x%x in 0x%x\n",page[i-0x4000],i); -+ stb_phys(i, page[i - 0x4000]); -+ } -+ page = libspectrum_snap_pages(snap, 2); -+ for(i = 0x8000; i < 0xc000; i++) -+ stb_phys(i, page[i - 0x8000]); -+ page = libspectrum_snap_pages(snap, 0); -+ for(i = 0xc000; i < 0x10000; i++) -+ stb_phys(i, page[i - 0xc000]); -+ env->regs[R_A] = libspectrum_snap_a(snap); -+ env->regs[R_F] = libspectrum_snap_f(snap); -+ env->regs[R_BC] = libspectrum_snap_bc(snap); -+ env->regs[R_DE] = libspectrum_snap_de(snap); -+ env->regs[R_HL] = libspectrum_snap_hl(snap); -+ env->regs[R_AFX] = libspectrum_snap_a_(snap) << 8 | libspectrum_snap_f_(snap); -+ env->regs[R_BCX] = libspectrum_snap_bc_(snap); -+ env->regs[R_DEX] = libspectrum_snap_de_(snap); -+ env->regs[R_HLX] = libspectrum_snap_hl_(snap); -+ env->regs[R_IX] = libspectrum_snap_ix(snap); -+ env->regs[R_IY] = libspectrum_snap_iy(snap); -+ env->regs[R_I] = libspectrum_snap_i(snap); -+ env->regs[R_R] = libspectrum_snap_r(snap); -+ env->regs[R_SP] = libspectrum_snap_sp(snap); -+ env->pc = libspectrum_snap_pc(snap); -+ env->iff1 = libspectrum_snap_iff1(snap); -+ env->iff2 = libspectrum_snap_iff2(snap); -+ env->imode = libspectrum_snap_im(snap); -+ -+ } -+#endif -+} -+ -+static void zx_spectrum_init(int ram_size, int vga_ram_size, int boot_device, -+ DisplayState *ds, const char **fd_filename, -+ int snapshot, -+ const char *kernel_filename, -+ const char *kernel_cmdline, -+ const char *initrd_filename) -+{ -+ zx_init1(ram_size, vga_ram_size, boot_device, -+ ds, fd_filename, snapshot, -+ kernel_filename, kernel_cmdline, -+ initrd_filename, 0); -+} -+ -+QEMUMachine z80pc_machine = { -+ "z80pc", -+ "Z80 Machine", -+ zx_spectrum_init, -+}; ---- qemu-0.9.1/hw/zx_ula.c -+++ qemu-0.9.1/hw/zx_ula.c -@@ -0,0 +1,357 @@ -+/* -+ * QEMU ZX Spectrum Video Emulation. -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a copy -+ * of this software and associated documentation files (the "Software"), to deal -+ * in the Software without restriction, including without limitation the rights -+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -+ * copies of the Software, and to permit persons to whom the Software is -+ * furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -+ * THE SOFTWARE. -+ */ -+ -+#include "hw.h" -+#include "console.h" -+#include "zx_ula.h" -+ -+typedef struct { -+ DisplayState *ds; -+ uint8_t *vram_ptr; -+ unsigned long vram_offset; -+ -+ int bwidth; -+ int bheight; -+ int swidth; -+ int sheight; -+ int twidth; -+ int theight; -+ -+ int border; -+ -+ int dirty; -+} ZXVState; -+ -+char *colnames[8] = { -+ "black", -+ "blue", -+ "red", -+ "magenta", -+ "green", -+ "cyan", -+ "yellow", -+ "white" -+}; -+ -+uint32_t cols[16] = { -+ 0x00000000, -+ 0x000000c0, -+ 0x00c00000, -+ 0x00c000c0, -+ 0x0000c000, -+ 0x0000c0c0, -+ 0x00c0c000, -+ 0x00c0c0c0, -+ 0x00000000, -+ 0x000000ff, -+ 0x00ff0000, -+ 0x00ff00ff, -+ 0x0000ff00, -+ 0x0000ffff, -+ 0x00ffff00, -+ 0x00ffffff, -+}; -+ -+/* copied from vga_template.h */ -+ -+#define cbswap_32(__x) \ -+((uint32_t)( \ -+ (((uint32_t)(__x) & (uint32_t)0x000000ffUL) << 24) | \ -+ (((uint32_t)(__x) & (uint32_t)0x0000ff00UL) << 8) | \ -+ (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \ -+ (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )) -+ -+#ifdef WORDS_BIGENDIAN -+#define PAT(x) (x) -+#else -+#define PAT(x) cbswap_32(x) -+#endif -+ -+static const uint32_t dmask16[16] = { -+ PAT(0x00000000), -+ PAT(0x000000ff), -+ PAT(0x0000ff00), -+ PAT(0x0000ffff), -+ PAT(0x00ff0000), -+ PAT(0x00ff00ff), -+ PAT(0x00ffff00), -+ PAT(0x00ffffff), -+ PAT(0xff000000), -+ PAT(0xff0000ff), -+ PAT(0xff00ff00), -+ PAT(0xff00ffff), -+ PAT(0xffff0000), -+ PAT(0xffff00ff), -+ PAT(0xffffff00), -+ PAT(0xffffffff), -+}; -+ -+static const uint32_t dmask4[4] = { -+ PAT(0x00000000), -+ PAT(0x0000ffff), -+ PAT(0xffff0000), -+ PAT(0xffffffff), -+}; -+ -+static inline void zx_draw_line_8(uint8_t *d, -+ uint32_t font_data, -+ uint32_t xorcol, -+ uint32_t bgcol) -+{ -+ ((uint32_t *)d)[0] = (dmask16[(font_data >> 4)] & xorcol) ^ bgcol; -+ ((uint32_t *)d)[1] = (dmask16[(font_data >> 0) & 0xf] & xorcol) ^ bgcol; -+} -+ -+static inline void zx_draw_line_16(uint8_t *d, -+ uint32_t font_data, -+ uint32_t xorcol, -+ uint32_t bgcol) -+{ -+ ((uint32_t *)d)[0] = (dmask4[(font_data >> 6)] & xorcol) ^ bgcol; -+ ((uint32_t *)d)[1] = (dmask4[(font_data >> 4) & 3] & xorcol) ^ bgcol; -+ ((uint32_t *)d)[2] = (dmask4[(font_data >> 2) & 3] & xorcol) ^ bgcol; -+ ((uint32_t *)d)[3] = (dmask4[(font_data >> 0) & 3] & xorcol) ^ bgcol; -+} -+ -+static inline void zx_draw_line_32(uint8_t *d, -+ uint32_t font_data, -+ uint32_t xorcol, -+ uint32_t bgcol) -+{ -+ ((uint32_t *)d)[0] = (-((font_data >> 7)) & xorcol) ^ bgcol; -+ ((uint32_t *)d)[1] = (-((font_data >> 6) & 1) & xorcol) ^ bgcol; -+ ((uint32_t *)d)[2] = (-((font_data >> 5) & 1) & xorcol) ^ bgcol; -+ ((uint32_t *)d)[3] = (-((font_data >> 4) & 1) & xorcol) ^ bgcol; -+ ((uint32_t *)d)[4] = (-((font_data >> 3) & 1) & xorcol) ^ bgcol; -+ ((uint32_t *)d)[5] = (-((font_data >> 2) & 1) & xorcol) ^ bgcol; -+ ((uint32_t *)d)[6] = (-((font_data >> 1) & 1) & xorcol) ^ bgcol; -+ ((uint32_t *)d)[7] = (-((font_data >> 0) & 1) & xorcol) ^ bgcol; -+} -+ -+extern int zx_flash; -+static ZXVState *zxvstate; -+ -+void zx_set_flash_dirty(void) { -+ ZXVState *s = zxvstate; -+ s->dirty = 1; -+} -+ -+static void zx_draw_line(ZXVState *s1, uint8_t *d, -+ const uint8_t *s, const uint8_t *as) -+{ -+ int x; -+ for (x = 0; x < 32; x++) { -+ int attrib, fg, bg, bright, flash; -+ -+ attrib = *as; -+ bright = (attrib & 0x40) >> 4; -+ flash = (attrib & 0x80) && (zx_flash >= 16); -+ if (flash) { -+ fg = (attrib >> 3) & 0x07; -+ bg = attrib & 0x07; -+ } else { -+ fg = attrib & 0x07; -+ bg = (attrib >> 3) & 0x07; -+ } -+ fg |= bright; -+ bg |= bright; -+ -+ zx_draw_line_32(d, *s, cols[fg] ^ cols[bg], cols[bg]); -+ d += 8 * 4; -+ s++; as++; -+ } -+} -+ -+static void zx_border_row(ZXVState *s, uint8_t *d) -+{ -+ int x; -+ for (x = 0; x < s->twidth; x++) { -+ *((uint32_t *)d) = cols[s->border]; -+ d += 4; -+ } -+} -+ -+static void zx_border_sides(ZXVState *s, uint8_t *d) -+{ -+ int x; -+ for (x = 0; x < s->bwidth; x++) { -+ *((uint32_t *)d) = cols[s->border]; -+ d += 4; -+ } -+ d += s->swidth * 4; -+ for (x = 0; x < s->bwidth; x++) { -+ *((uint32_t *)d) = cols[s->border]; -+ d += 4; -+ } -+} -+ -+static void zx_update_display(void *opaque) -+{ -+ int y; -+ uint8_t *d; -+ ZXVState *s = (ZXVState *)opaque; -+ uint32_t addr, attrib; -+ -+ //if (!s->dirty) -+ // return; -+ -+ d = s->ds->data; -+ d += s->bheight * s->ds->linesize; -+ d += s->bwidth * 4; -+ -+ for (y = 0; y < 192; y++) { -+ addr = ((y & 0x07) << 8) | ((y & 0x38) << 2) | ((y & 0xc0) << 5); -+ attrib = 0x1800 | ((y & 0xf8) << 2); -+ zx_draw_line(s, d, s->vram_ptr + addr, s->vram_ptr + attrib); -+ d += s->ds->linesize; -+ } -+ -+ d = s->ds->data; -+ for (y = 0; y < s->bheight; y++) { -+ zx_border_row(s, d + y * s->ds->linesize); -+ } -+ for (y = s->bheight; y < s->theight - s->bheight; y++) { -+ zx_border_sides(s, d + y * s->ds->linesize); -+ } -+ for (y = s->theight - s->bheight; y < s->theight; y++) { -+ zx_border_row(s, d + y * s->ds->linesize); -+ } -+ -+ dpy_update(s->ds, 0, 0, s->twidth, s->theight); -+ s->dirty = 0; -+} -+ -+static void zx_invalidate_display(void *opaque) -+{ -+} -+ -+static void zx_screen_dump(void *opaque, const char *filename) -+{ -+} -+ -+uint32_t zx_mem_readb(void *opaque, target_phys_addr_t addr) -+{ -+ ZXVState *s = opaque; -+ -+ addr -= 0x4000; -+ return s->vram_ptr[addr]; -+} -+ -+uint32_t zx_mem_readw(void *opaque, target_phys_addr_t addr) -+{ -+ return (zx_mem_readb(opaque, addr + 1) << 8) | zx_mem_readb(opaque, addr); -+} -+ -+uint32_t zx_mem_readl(void *opaque, target_phys_addr_t addr) -+{ -+ return (zx_mem_readb(opaque, addr + 3) << 24) | -+ (zx_mem_readb(opaque, addr + 2) << 16) | -+ (zx_mem_readb(opaque, addr + 1) << 8) | -+ zx_mem_readb(opaque, addr); -+} -+ -+void zx_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) -+{ -+ ZXVState *s = opaque; -+ -+ if (addr < 0x5b00) // XXX -+ s->dirty = 1; -+ addr -= 0x4000; -+ s->vram_ptr[addr] = val; -+ -+ cpu_physical_memory_set_dirty(s->vram_offset + addr); -+} -+ -+void zx_mem_writew(void *opaque, target_phys_addr_t addr, uint32_t val) -+{ -+ zx_mem_writeb(opaque, addr, val & 0xff); -+ zx_mem_writeb(opaque, addr + 1, val >> 8); -+} -+ -+void zx_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val) -+{ -+ zx_mem_writeb(opaque, addr, val & 0xff); -+ zx_mem_writeb(opaque, addr + 1, (val >> 8) & 0xff); -+ zx_mem_writeb(opaque, addr + 2, (val >> 16) & 0xff); -+ zx_mem_writeb(opaque, addr + 3, val >> 24); -+} -+ -+static CPUReadMemoryFunc *zx_mem_read[3] = { -+ zx_mem_readb, -+ zx_mem_readw, -+ zx_mem_readl, -+}; -+ -+static CPUWriteMemoryFunc *zx_mem_write[3] = { -+ zx_mem_writeb, -+ zx_mem_writew, -+ zx_mem_writel, -+}; -+ -+static void io_spectrum_write(void *opaque, uint32_t addr, uint32_t data) -+{ -+ ZXVState *s = (ZXVState *)opaque; -+ -+/* port xxfe */ -+ s->border = data & 0x07; -+ s->dirty = 1; -+}; -+ -+void zx_ula_init(DisplayState *ds, uint8_t *zx_screen_base, -+ unsigned long ula_ram_offset) -+{ -+ int zx_io_memory; -+ -+ ZXVState *s = qemu_mallocz(sizeof(ZXVState)); -+ if (!s) -+ return; -+ zxvstate = s; -+ s->ds = ds; -+ s->dirty = 1; -+// s->vram_ptr = zx_screen_base; -+// s->vram_offset = ula_ram_offset; -+ -+ graphic_console_init(ds, zx_update_display, zx_invalidate_display, -+ zx_screen_dump, s); -+ -+ s->bwidth = 32; -+ s->bheight = 24; -+ s->swidth = 256; -+ s->sheight = 192; -+ s->twidth = s->swidth + s->bwidth * 2; -+ s->theight = s->sheight + s->bheight * 2; -+ s->border = 0; -+ dpy_resize(s->ds, s->twidth, s->theight); -+ -+ //zx_io_memory = cpu_register_io_memory(0, zx_mem_read, zx_mem_write, s); -+ //cpu_register_physical_memory(0x4000, 0x2000, zx_io_memory); -+// cpu_register_physical_memory(0x4000, 0x2000, zx_io_memory); -+// cpu_register_physical_memory(0x4000, 0xc000, zx_io_memory); -+ s->vram_ptr = phys_ram_base + 0;//x4000;//zx_io_memory; -+ s->vram_offset = 0;//x4000;//zx_io_memory; -+ -+ /* ZX Spectrum ULA */ -+ register_ioport_write(0, 0x10000, 1, io_spectrum_write, s); -+} ---- qemu-0.9.1/hw/zx_ula.h -+++ qemu-0.9.1/hw/zx_ula.h -@@ -0,0 +1,4 @@ -+/* zx_ula.c */ -+void zx_ula_init(DisplayState *ds, uint8_t *zx_screen_base, -+ unsigned long zx_ram_offset); -+void zx_set_flash_dirty(void); ---- qemu-0.9.1/target-z80/cpu.h -+++ qemu-0.9.1/target-z80/cpu.h -@@ -0,0 +1,252 @@ -+/* -+ * Z80 virtual CPU header -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+#ifndef CPU_Z80_H -+#define CPU_Z80_H -+ -+#include "config.h" -+ -+#define TARGET_LONG_BITS 32 -+ -+/* target supports implicit self modifying code */ -+#define TARGET_HAS_SMC -+/* support for self modifying code even if the modified instruction is -+ close to the modifying instruction */ -+#define TARGET_HAS_PRECISE_SMC -+ -+#define TARGET_HAS_ICE 1 -+ -+#define ELF_MACHINE EM_NONE -+ -+#include "cpu-defs.h" -+ -+#include "softfloat.h" -+ -+/* Z80 registers */ -+ -+#define R_A 0 -+#define R_F 1 -+ -+#define R_BC 2 -+#define R_DE 3 -+#define R_HL 4 -+#define R_IX 5 -+#define R_IY 6 -+#define R_SP 7 -+ -+#define R_I 8 -+#define R_R 9 -+ -+#define R_AFX 10 -+#define R_BCX 11 -+#define R_DEX 12 -+#define R_HLX 13 -+ -+/* flags masks */ -+#define CC_C 0x0001 -+#define CC_N 0x0002 -+#define CC_P 0x0004 -+#define CC_X 0x0008 -+#define CC_H 0x0010 -+#define CC_Y 0x0020 -+#define CC_Z 0x0040 -+#define CC_S 0x0080 -+ -+#define NB_MMU_MODES 1 -+#define MMU_MODE0_SUFFIX _kernel -+ -+/* hidden flags - used internally by qemu to represent additionnal cpu -+ states. Only the CPL, INHIBIT_IRQ and HALTED are not redundant. We avoid -+ using the IOPL_MASK, TF_MASK and VM_MASK bit position to ease oring -+ with eflags. */ -+/* current cpl */ -+#define HF_CPL_SHIFT 0 -+/* true if soft mmu is being used */ -+#define HF_SOFTMMU_SHIFT 2 -+/* true if hardware interrupts must be disabled for next instruction */ -+#define HF_INHIBIT_IRQ_SHIFT 3 -+/* 16 or 32 segments */ -+#define HF_CS32_SHIFT 4 -+#define HF_SS32_SHIFT 5 -+/* zero base for DS, ES and SS : can be '0' only in 32 bit CS segment */ -+#define HF_ADDSEG_SHIFT 6 -+/* copy of CR0.PE (protected mode) */ -+#define HF_PE_SHIFT 7 -+#define HF_TF_SHIFT 8 /* must be same as eflags */ -+#define HF_MP_SHIFT 9 /* the order must be MP, EM, TS */ -+#define HF_EM_SHIFT 10 -+#define HF_TS_SHIFT 11 -+#define HF_IOPL_SHIFT 12 /* must be same as eflags */ -+#define HF_LMA_SHIFT 14 /* only used on x86_64: long mode active */ -+#define HF_CS64_SHIFT 15 /* only used on x86_64: 64 bit code segment */ -+#define HF_OSFXSR_SHIFT 16 /* CR4.OSFXSR */ -+#define HF_VM_SHIFT 17 /* must be same as eflags */ -+#define HF_HALTED_SHIFT 18 /* CPU halted */ -+#define HF_SMM_SHIFT 19 /* CPU in SMM mode */ -+ -+#define HF_CPL_MASK (3 << HF_CPL_SHIFT) -+#define HF_SOFTMMU_MASK (1 << HF_SOFTMMU_SHIFT) -+#define HF_INHIBIT_IRQ_MASK (1 << HF_INHIBIT_IRQ_SHIFT) -+#define HF_CS32_MASK (1 << HF_CS32_SHIFT) -+#define HF_SS32_MASK (1 << HF_SS32_SHIFT) -+#define HF_ADDSEG_MASK (1 << HF_ADDSEG_SHIFT) -+#define HF_PE_MASK (1 << HF_PE_SHIFT) -+#define HF_TF_MASK (1 << HF_TF_SHIFT) -+#define HF_MP_MASK (1 << HF_MP_SHIFT) -+#define HF_EM_MASK (1 << HF_EM_SHIFT) -+#define HF_TS_MASK (1 << HF_TS_SHIFT) -+#define HF_LMA_MASK (1 << HF_LMA_SHIFT) -+#define HF_CS64_MASK (1 << HF_CS64_SHIFT) -+#define HF_OSFXSR_MASK (1 << HF_OSFXSR_SHIFT) -+#define HF_HALTED_MASK (1 << HF_HALTED_SHIFT) -+#define HF_SMM_MASK (1 << HF_SMM_SHIFT) -+ -+#define EXCP00_DIVZ 0 -+#define EXCP01_SSTP 1 -+#define EXCP02_NMI 2 -+#define EXCP03_INT3 3 -+#define EXCP04_INTO 4 -+#define EXCP05_BOUND 5 -+#define EXCP06_ILLOP 6 -+#define EXCP07_PREX 7 -+#define EXCP08_DBLE 8 -+#define EXCP09_XERR 9 -+#define EXCP0A_TSS 10 -+#define EXCP0B_NOSEG 11 -+#define EXCP0C_STACK 12 -+#define EXCP0D_GPF 13 -+#define EXCP0E_PAGE 14 -+#define EXCP10_COPR 16 -+#define EXCP11_ALGN 17 -+#define EXCP12_MCHK 18 -+ -+enum { -+ CC_OP_DYNAMIC, /* must use dynamic code to get cc_op */ -+ CC_OP_EFLAGS, /* all cc are explicitely computed, CC_SRC = flags */ -+ -+ CC_OP_NB, -+}; -+ -+#define CPU_NB_REGS 14 -+ -+typedef struct CPUZ80State { -+#if TARGET_LONG_BITS > HOST_LONG_BITS -+ /* temporaries if we cannot store them in host registers */ -+ target_ulong t0, t1, t2; -+#endif -+ -+ /* Z80 registers */ -+ uint16_t pc; -+ /* not sure if this is messy: */ -+ target_ulong regs[CPU_NB_REGS]; -+ -+ int iff1; -+ int iff2; -+ int imode; -+ -+ int ir; -+ -+ /* standard registers */ -+ target_ulong eflags; /* eflags register. During CPU emulation, CC -+ flags are set to zero because they are -+ stored elsewhere */ -+ -+ /* emulator internal eflags handling */ -+ target_ulong cc_src; -+ target_ulong cc_dst; -+ uint32_t cc_op; -+ uint32_t hflags; /* hidden flags, see HF_xxx constants */ -+ -+ target_ulong cr[5]; /* NOTE: cr1 is unused */ -+ -+ /* sysenter registers */ -+ uint64_t efer; -+ uint64_t star; -+ -+ uint64_t pat; -+ -+ /* exception/interrupt handling */ -+ jmp_buf jmp_env; -+ int exception_index; -+ int error_code; -+ int exception_is_int; -+ target_ulong exception_next_pc; -+ target_ulong dr[8]; /* debug registers */ -+ uint32_t smbase; -+ int interrupt_request; -+ int user_mode_only; /* user mode only simulation */ -+ int halted; -+ -+ CPU_COMMON -+ -+ /* in order to simplify APIC support, we leave this pointer to the -+ user */ -+ struct APICState *apic_state; -+} CPUZ80State; -+ -+CPUZ80State *cpu_z80_init(const char* cpu_model); -+int cpu_z80_exec(CPUZ80State *s); -+void cpu_z80_close(CPUZ80State *s); -+int cpu_get_pic_interrupt(CPUZ80State *s); -+ -+/* wrapper, just in case memory mappings must be changed */ -+static inline void cpu_z80_set_cpl(CPUZ80State *s, int cpl) -+{ -+#if HF_CPL_MASK == 3 -+ s->hflags = (s->hflags & ~HF_CPL_MASK) | cpl; -+#else -+#error HF_CPL_MASK is hardcoded -+#endif -+} -+ -+/* you can call this signal handler from your SIGBUS and SIGSEGV -+ signal handlers to inform the virtual CPU of exceptions. non zero -+ is returned if the signal was handled by the virtual CPU. */ -+struct siginfo; -+int cpu_z80_signal_handler(int host_signum, struct siginfo *info, -+ void *puc); -+ -+uint64_t cpu_get_tsc(CPUZ80State *env); -+ -+void cpu_set_apic_base(CPUZ80State *env, uint64_t val); -+uint64_t cpu_get_apic_base(CPUZ80State *env); -+void cpu_set_apic_tpr(CPUZ80State *env, uint8_t val); -+#ifndef NO_CPU_IO_DEFS -+uint8_t cpu_get_apic_tpr(CPUZ80State *env); -+#endif -+void cpu_smm_update(CPUZ80State *env); -+ -+#define TARGET_PAGE_BITS 12 -+ -+#define CPUState CPUZ80State -+#define cpu_init cpu_z80_init -+#define cpu_exec cpu_z80_exec -+#define cpu_gen_code cpu_z80_gen_code -+#define cpu_signal_handler cpu_z80_signal_handler -+ -+static inline int cpu_mmu_index (CPUState *env) -+{ -+ return (env->hflags & HF_CPL_MASK) == 3; -+} -+ -+ -+#include "cpu-all.h" -+ -+#endif /* CPU_Z80_H */ ---- qemu-0.9.1/target-z80/exec.h -+++ qemu-0.9.1/target-z80/exec.h -@@ -0,0 +1,372 @@ -+/* -+ * Z80 execution defines -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+#include "config.h" -+#include "dyngen-exec.h" -+ -+#define TARGET_LONG_BITS 32 -+ -+#include "cpu-defs.h" -+ -+/* at least 4 register variables are defined */ -+register struct CPUZ80State *env asm(AREG0); -+ -+#if TARGET_LONG_BITS > HOST_LONG_BITS -+ -+/* no registers can be used */ -+#define T0 (env->t0) -+#define T1 (env->t1) -+#define T2 (env->t2) -+ -+#else -+ -+/* XXX: use unsigned long instead of target_ulong - better code will -+ be generated for 64 bit CPUs */ -+register target_ulong T0 asm(AREG1); -+register target_ulong T1 asm(AREG2); -+register target_ulong T2 asm(AREG3); -+ -+/* if more registers are available, we define some registers too */ -+#ifdef AREG4 -+register target_ulong A asm(AREG4); -+#define reg_A -+#endif -+ -+#ifdef AREG5 -+register target_ulong F asm(AREG5); -+#define reg_F -+#endif -+ -+#ifdef AREG6 -+register target_ulong BC asm(AREG6); -+#define reg_BC -+#endif -+ -+#ifdef AREG7 -+register target_ulong DE asm(AREG7); -+#define reg_DE -+#endif -+ -+#ifdef AREG8 -+register target_ulong HL asm(AREG8); -+#define reg_HL -+#endif -+ -+#ifdef AREG9 -+register target_ulong IX asm(AREG9); -+#define reg_IX -+#endif -+ -+#ifdef AREG10 -+register target_ulong IY asm(AREG10); -+#define reg_IY -+#endif -+ -+#ifdef AREG11 -+register target_ulong R asm(AREG11); -+#define reg_R -+#endif -+ -+#endif /* ! (TARGET_LONG_BITS > HOST_LONG_BITS) */ -+ -+#define A0 T2 -+ -+extern FILE *logfile; -+extern int loglevel; -+ -+#ifndef reg_A -+#define A (env->regs[R_A]) -+#endif -+#ifndef reg_F -+#define F (env->regs[R_F]) -+#endif -+#ifndef reg_BC -+#define BC (env->regs[R_BC]) -+#endif -+#ifndef reg_DE -+#define DE (env->regs[R_DE]) -+#endif -+#ifndef reg_HL -+#define HL (env->regs[R_HL]) -+#endif -+#ifndef reg_IX -+#define IX (env->regs[R_IX]) -+#endif -+#ifndef reg_IY -+#define IY (env->regs[R_IY]) -+#endif -+#ifndef reg_SP -+#define SP (env->regs[R_SP]) -+#endif -+#ifndef reg_I -+#define I (env->regs[R_I]) -+#endif -+#ifndef reg_R -+#define R (env->regs[R_R]) -+#endif -+#ifndef reg_AFX -+#define AFX (env->regs[R_AFX]) -+#endif -+#ifndef reg_BCX -+#define BCX (env->regs[R_BCX]) -+#endif -+#ifndef reg_DEX -+#define DEX (env->regs[R_DEX]) -+#endif -+#ifndef reg_HLX -+#define HLX (env->regs[R_HLX]) -+#endif -+ -+#define PC (env->pc) -+ -+#define CC_SRC (env->cc_src) -+#define CC_DST (env->cc_dst) -+#define CC_OP (env->cc_op) -+ -+/* float macros */ -+#if 0 -+#define FT0 (env->ft0) -+#define ST0 (env->fpregs[env->fpstt].d) -+#define ST(n) (env->fpregs[(env->fpstt + (n)) & 7].d) -+#define ST1 ST(1) -+ -+#ifdef USE_FP_CONVERT -+#define FP_CONVERT (env->fp_convert) -+#endif -+#endif -+ -+#include "cpu.h" -+#include "exec-all.h" -+ -+typedef struct CCTable { -+ int (*compute_all)(void); /* return all the flags */ -+ int (*compute_c)(void); /* return the C flag */ -+} CCTable; -+ -+extern CCTable cc_table[]; -+ -+void load_seg(int seg_reg, int selector); -+void helper_ljmp_protected_T0_T1(int next_eip); -+void helper_lcall_real_T0_T1(int shift, int next_eip); -+void helper_lcall_protected_T0_T1(int shift, int next_eip); -+void helper_iret_real(int shift); -+void helper_iret_protected(int shift, int next_eip); -+void helper_lret_protected(int shift, int addend); -+void helper_lldt_T0(void); -+void helper_ltr_T0(void); -+void helper_movl_crN_T0(int reg); -+void helper_movl_drN_T0(int reg); -+void helper_invlpg(target_ulong addr); -+ -+int cpu_z80_handle_mmu_fault(CPUZ80State *env, target_ulong addr, -+ int is_write, int is_user, int is_softmmu); -+void tlb_fill(target_ulong addr, int is_write, int is_user, -+ void *retaddr); -+void __hidden cpu_lock(void); -+void __hidden cpu_unlock(void); -+void do_interrupt(CPUZ80State *env); -+void raise_interrupt(int intno, int is_int, int error_code, -+ int next_eip_addend); -+void raise_exception_err(int exception_index, int error_code); -+void raise_exception(int exception_index); -+void do_smm_enter(void); -+void __hidden cpu_loop_exit(void); -+ -+void OPPROTO op_movl_eflags_T0(void); -+void OPPROTO op_movl_T0_eflags(void); -+ -+void helper_dump_registers(int pc); -+void helper_in_debug(int port); -+ -+#if !defined(CONFIG_USER_ONLY) -+ -+#include "softmmu_exec.h" -+ -+static inline double ldfq(target_ulong ptr) -+{ -+ union { -+ double d; -+ uint64_t i; -+ } u; -+ u.i = ldq(ptr); -+ return u.d; -+} -+ -+static inline void stfq(target_ulong ptr, double v) -+{ -+ union { -+ double d; -+ uint64_t i; -+ } u; -+ u.d = v; -+ stq(ptr, u.i); -+} -+ -+static inline float ldfl(target_ulong ptr) -+{ -+ union { -+ float f; -+ uint32_t i; -+ } u; -+ u.i = ldl(ptr); -+ return u.f; -+} -+ -+static inline void stfl(target_ulong ptr, float v) -+{ -+ union { -+ float f; -+ uint32_t i; -+ } u; -+ u.f = v; -+ stl(ptr, u.i); -+} -+ -+#endif /* !defined(CONFIG_USER_ONLY) */ -+ -+#define RC_MASK 0xc00 -+#define RC_NEAR 0x000 -+#define RC_DOWN 0x400 -+#define RC_UP 0x800 -+#define RC_CHOP 0xc00 -+ -+void helper_hlt(void); -+void helper_monitor(void); -+void helper_mwait(void); -+ -+extern const uint8_t parity_table[256]; -+extern const uint8_t rclw_table[32]; -+extern const uint8_t rclb_table[32]; -+ -+static inline uint32_t compute_eflags(void) -+{ -+ return env->eflags | cc_table[CC_OP].compute_all(); -+} -+ -+/* NOTE: CC_OP must be modified manually to CC_OP_EFLAGS */ -+static inline void load_eflags(int eflags, int update_mask) -+{ -+ CC_SRC = eflags & (CC_S | CC_Z | CC_P | CC_C); -+ env->eflags = (env->eflags & ~update_mask) | -+ (eflags & update_mask); -+} -+ -+static inline void env_to_regs(void) -+{ -+#ifdef reg_A -+ A = env->regs[R_A]; -+#endif -+#ifdef reg_F -+ F = env->regs[R_F]; -+#endif -+#ifdef reg_BC -+ BC = env->regs[R_BC]; -+#endif -+#ifdef reg_DE -+ DE = env->regs[R_DE]; -+#endif -+#ifdef reg_HL -+ HL = env->regs[R_HL]; -+#endif -+#ifdef reg_IX -+ IX = env->regs[R_IX]; -+#endif -+#ifdef reg_IY -+ IY = env->regs[R_IY]; -+#endif -+#ifdef reg_SP -+ SP = env->regs[R_SP]; -+#endif -+#ifdef reg_I -+ I = env->regs[R_I]; -+#endif -+#ifdef reg_R -+ R = env->regs[R_R]; -+#endif -+#ifdef reg_AFX -+ AFX = env->regs[R_AFX]; -+#endif -+#ifdef reg_BCX -+ BCX = env->regs[R_BCX]; -+#endif -+#ifdef reg_DEX -+ DEX = env->regs[R_DEX]; -+#endif -+#ifdef reg_HLX -+ HLX = env->regs[R_HLX]; -+#endif -+} -+ -+static inline void regs_to_env(void) -+{ -+#ifdef reg_A -+ env->regs[R_A] = A; -+#endif -+#ifdef reg_F -+ env->regs[R_F] = F; -+#endif -+#ifdef reg_BC -+ env->regs[R_BC] = BC; -+#endif -+#ifdef reg_DE -+ env->regs[R_DE] = DE; -+#endif -+#ifdef reg_HL -+ env->regs[R_HL] = HL; -+#endif -+#ifdef reg_IX -+ env->regs[R_IX] = IX; -+#endif -+#ifdef reg_IY -+ env->regs[R_IY] = IY; -+#endif -+#ifdef reg_SP -+ env->regs[R_SP] = SP; -+#endif -+#ifdef reg_I -+ env->regs[R_I] = I; -+#endif -+#ifdef reg_R -+ env->regs[R_R] = R; -+#endif -+#ifdef reg_AFX -+ env->regs[R_AFX] = AFX; -+#endif -+#ifdef reg_BCX -+ env->regs[R_BCX] = BCX; -+#endif -+#ifdef reg_DEX -+ env->regs[R_DEX] = DEX; -+#endif -+#ifdef reg_HLX -+ env->regs[R_HLX] = HLX; -+#endif -+} -+ -+static inline int cpu_halted(CPUState* env) { -+ if (!env->halted) -+ return 0; -+ if (env->interrupt_request & CPU_INTERRUPT_HARD) { -+ env->halted = 0; -+ env->hflags &= ~HF_HALTED_MASK; -+ return 0; -+ } -+ return EXCP_HALTED; -+} ---- qemu-0.9.1/target-z80/helper.c -+++ qemu-0.9.1/target-z80/helper.c -@@ -0,0 +1,281 @@ -+/* -+ * Z80 helpers -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+#include "exec.h" -+#include "host-utils.h" -+ -+//#define DEBUG_PCALL -+ -+const uint8_t parity_table[256] = { -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, -+ 0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P, -+}; -+ -+/* modulo 17 table */ -+const uint8_t rclw_table[32] = { -+ 0, 1, 2, 3, 4, 5, 6, 7, -+ 8, 9,10,11,12,13,14,15, -+ 16, 0, 1, 2, 3, 4, 5, 6, -+ 7, 8, 9,10,11,12,13,14, -+}; -+ -+/* modulo 9 table */ -+const uint8_t rclb_table[32] = { -+ 0, 1, 2, 3, 4, 5, 6, 7, -+ 8, 0, 1, 2, 3, 4, 5, 6, -+ 7, 8, 0, 1, 2, 3, 4, 5, -+ 6, 7, 8, 0, 1, 2, 3, 4, -+}; -+ -+ -+/* thread support */ -+ -+spinlock_t global_cpu_lock = SPIN_LOCK_UNLOCKED; -+ -+void cpu_lock(void) -+{ -+ spin_lock(&global_cpu_lock); -+} -+ -+void cpu_unlock(void) -+{ -+ spin_unlock(&global_cpu_lock); -+} -+ -+void do_interrupt(CPUZ80State *env) -+{ -+// printf("z80: do_interrupt()\n"); -+ -+ if (!env->iff1) -+ return; -+ -+ env->iff1 = 0; -+ env->iff2 = 0; /* XXX: Unchanged for NMI */ -+ -+ { -+ target_ulong sp; -+ sp = (uint16_t)(env->regs[R_SP] - 2); -+ env->regs[R_SP] = sp; -+ stw_kernel(sp, env->pc); -+ } -+ -+ /* IM0 = execute data on bus (0xff == rst $38) */ -+ /* IM1 = execute rst $38 (ROM uses this)*/ -+ /* IM2 = indirect jump -- address is held at (I << 8) | DATA */ -+ -+ /* value on data bus is 0xff for the zx spectrum */ -+ -+ /* when an interrupt occurs, iff1 and iff2 are reset, disabling interrupts */ -+ /* when an NMI occurs, iff1 is reset. iff2 is left unchanged */ -+ -+ uint8_t d; -+ switch (env->imode) { -+ case 0: -+ /* XXX: assuming 0xff on data bus */ -+ case 1: -+ env->pc = 0x0038; -+ break; -+ case 2: -+ /* XXX: assuming 0xff on data bus */ -+ d = 0xff; -+ env->pc = lduw_kernel((env->regs[R_I] << 8) | d); -+ break; -+ } -+} -+ -+/* -+ * Signal an interruption. It is executed in the main CPU loop. -+ * is_int is TRUE if coming from the int instruction. next_eip is the -+ * EIP value AFTER the interrupt instruction. It is only relevant if -+ * is_int is TRUE. -+ */ -+void raise_interrupt(int intno, int is_int, int error_code, -+ int next_eip_addend) -+{ -+ env->exception_index = intno; -+ env->error_code = error_code; -+ env->exception_is_int = is_int; -+ env->exception_next_pc = env->pc + next_eip_addend; -+ cpu_loop_exit(); -+} -+ -+/* same as raise_exception_err, but do not restore global registers */ -+static void raise_exception_err_norestore(int exception_index, int error_code) -+{ -+ env->exception_index = exception_index; -+ env->error_code = error_code; -+ env->exception_is_int = 0; -+ env->exception_next_pc = 0; -+ longjmp(env->jmp_env, 1); -+} -+ -+/* shortcuts to generate exceptions */ -+ -+void (raise_exception_err)(int exception_index, int error_code) -+{ -+ raise_interrupt(exception_index, 0, error_code, 0); -+} -+ -+void raise_exception(int exception_index) -+{ -+ raise_interrupt(exception_index, 0, 0, 0); -+} -+ -+void helper_hlt(void) -+{ -+ env->halted = 1; -+ env->hflags &= ~HF_INHIBIT_IRQ_MASK; /* needed if sti is just before */ -+ env->hflags |= HF_HALTED_MASK; -+ env->exception_index = EXCP_HLT; -+ cpu_loop_exit(); -+} -+ -+void helper_monitor(void) -+{ -+} -+ -+void helper_mwait(void) -+{ -+} -+ -+#if !defined(CONFIG_USER_ONLY) -+ -+#define MMUSUFFIX _mmu -+#ifdef __s390__ -+# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) -+#else -+# define GETPC() (__builtin_return_address(0)) -+#endif -+ -+#define SHIFT 0 -+#include "softmmu_template.h" -+ -+#define SHIFT 1 -+#include "softmmu_template.h" -+ -+#define SHIFT 2 -+#include "softmmu_template.h" -+ -+#define SHIFT 3 -+#include "softmmu_template.h" -+ -+#endif -+ -+/* try to fill the TLB and return an exception if error. If retaddr is -+ NULL, it means that the function was called in C code (i.e. not -+ from generated code or from helper.c) */ -+/* XXX: fix it to restore all registers */ -+void tlb_fill(target_ulong addr, int is_write, int is_user, void *retaddr) -+{ -+ TranslationBlock *tb; -+ int ret; -+ unsigned long pc; -+ CPUZ80State *saved_env; -+ -+ /* XXX: hack to restore env in all cases, even if not called from -+ generated code */ -+ saved_env = env; -+ env = cpu_single_env; -+ -+ ret = cpu_z80_handle_mmu_fault(env, addr, is_write, is_user, 1); -+ if (ret) { -+ if (retaddr) { -+ /* now we have a real cpu fault */ -+ pc = (unsigned long)retaddr; -+ tb = tb_find_pc(pc); -+ if (tb) { -+ /* the PC is inside the translated code. It means that we have -+ a virtual CPU fault */ -+ cpu_restore_state(tb, env, pc, NULL); -+ } -+ } -+ if (retaddr) -+ raise_exception_err(env->exception_index, env->error_code); -+ else -+ raise_exception_err_norestore(env->exception_index, env->error_code); -+ } -+ env = saved_env; -+} -+ -+void helper_in_debug(int port) -+{ -+// printf("IN with port %02x\n", port); -+} -+ -+void helper_dump_registers(int pc) -+{ -+ int fl = env->regs[R_F]; -+ printf("--------------\n" -+ "AF =%04x BC =%04x DE =%04x HL =%04x IX=%04x\n" -+ "AF'=%04x BC'=%04x DE'=%04x HL'=%04x IY=%04x\n" -+ "PC =%04x SP =%04x F=[%c%c%c%c%c%c%c%c]\n" -+ "IM=%i IFF1=%i IFF2=%i I=%02x R=%02x\n", -+ (env->regs[R_A] << 8) | env->regs[R_F], -+ env->regs[R_BC], -+ env->regs[R_DE], -+ env->regs[R_HL], -+ env->regs[R_IX], -+ env->regs[R_AFX], -+ env->regs[R_BCX], -+ env->regs[R_DEX], -+ env->regs[R_HLX], -+ env->regs[R_IY], -+ pc == -1 ? env->pc : pc, -+ env->regs[R_SP], -+ fl & 0x80 ? 'S' : '-', -+ fl & 0x40 ? 'Z' : '-', -+ fl & 0x20 ? '5' : '-', -+ fl & 0x10 ? 'H' : '-', -+ fl & 0x08 ? '3' : '-', -+ fl & 0x04 ? 'P' : '-', -+ fl & 0x02 ? 'N' : '-', -+ fl & 0x01 ? 'C' : '-', -+ env->imode, env->iff1, env->iff2, env->regs[R_I], env->regs[R_R]); -+} ---- qemu-0.9.1/target-z80/helper2.c -+++ qemu-0.9.1/target-z80/helper2.c -@@ -0,0 +1,170 @@ -+/* -+ * Z80 helpers (without register variable usage) -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "cpu.h" -+#include "exec-all.h" -+ -+//#define DEBUG_MMU -+ -+CPUZ80State *cpu_z80_init(const char* cpu_model) -+{ -+ CPUZ80State *env; -+ static int inited; -+ -+ env = qemu_mallocz(sizeof(CPUZ80State)); -+ if (!env) -+ return NULL; -+ cpu_exec_init(env); -+ -+ /* init various static tables */ -+ if (!inited) { -+ inited = 1; -+ optimize_flags_init(); -+ } -+ cpu_reset(env); -+ return env; -+} -+ -+/* NOTE: must be called outside the CPU execute loop */ -+void cpu_reset(CPUZ80State *env) -+{ -+ memset(env, 0, offsetof(CPUZ80State, breakpoints)); -+ -+ tlb_flush(env, 1); -+ -+ /* init to reset state */ -+ -+#ifdef CONFIG_SOFTMMU -+ env->hflags |= HF_SOFTMMU_MASK; -+#endif -+ -+ env->pc = 0x0000; -+ env->iff1 = 0; -+ env->iff2 = 0; -+ env->imode = 0; -+ env->regs[R_A] = 0xff; -+ env->regs[R_F] = 0xff; -+ env->regs[R_SP] = 0xffff; -+} -+ -+void cpu_z80_close(CPUZ80State *env) -+{ -+ free(env); -+} -+ -+/***********************************************************/ -+/* x86 debug */ -+ -+static const char *cc_op_str[] = { -+ "DYNAMIC", -+ "EFLAGS", -+}; -+ -+void cpu_dump_state(CPUState *env, FILE *f, -+ int (*cpu_fprintf)(FILE *f, const char *fmt, ...), -+ int flags) -+{ -+ int fl = env->regs[R_F]; -+ -+ cpu_fprintf(f, "AF =%04x BC =%04x DE =%04x HL =%04x IX=%04x\n" -+ "AF'=%04x BC'=%04x DE'=%04x HL'=%04x IY=%04x\n" -+ "PC =%04x SP =%04x F=[%c%c%c%c%c%c%c%c]\n" -+ "IM=%i IFF1=%i IFF2=%i I=%02x R=%02x\n", -+ (env->regs[R_A] << 8) | env->regs[R_F], -+ env->regs[R_BC], -+ env->regs[R_DE], -+ env->regs[R_HL], -+ env->regs[R_IX], -+ env->regs[R_AFX], -+ env->regs[R_BCX], -+ env->regs[R_DEX], -+ env->regs[R_HLX], -+ env->regs[R_IY], -+ env->pc, -+ env->regs[R_SP], -+ fl & 0x80 ? 'S' : '-', -+ fl & 0x40 ? 'Z' : '-', -+ fl & 0x20 ? 'Y' : '-', -+ fl & 0x10 ? 'H' : '-', -+ fl & 0x08 ? 'X' : '-', -+ fl & 0x04 ? 'P' : '-', -+ fl & 0x02 ? 'N' : '-', -+ fl & 0x01 ? 'C' : '-', -+ env->imode, env->iff1, env->iff2, env->regs[R_I], env->regs[R_R]); -+} -+ -+/***********************************************************/ -+void cpu_z80_flush_tlb(CPUZ80State *env, target_ulong addr) -+{ -+ tlb_flush_page(env, addr); -+} -+ -+/* return value: -+ -1 = cannot handle fault -+ 0 = nothing more to do -+ 1 = generate PF fault -+ 2 = soft MMU activation required for this block -+*/ -+int cpu_z80_handle_mmu_fault(CPUZ80State *env, target_ulong addr, -+ int is_write1, int is_user, int is_softmmu) -+{ -+ int prot, page_size, ret, is_write; -+ unsigned long paddr, page_offset; -+ target_ulong vaddr, virt_addr; -+ -+#if defined(DEBUG_MMU) -+ printf("MMU fault: addr=" TARGET_FMT_lx " w=%d u=%d pc=" TARGET_FMT_lx "\n", -+ addr, is_write1, is_user, env->pc); -+#endif -+ is_write = is_write1 & 1; -+ -+ virt_addr = addr & TARGET_PAGE_MASK; -+ prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; -+ page_size = 4096; -+ -+ /* Even if 4MB pages, we map only one 4KB page in the cache to -+ avoid filling it too fast */ -+ page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1); -+ paddr = (addr & TARGET_PAGE_MASK) + page_offset; -+ vaddr = virt_addr + page_offset; -+ -+ ret = tlb_set_page_exec(env, vaddr, paddr, prot, is_user, is_softmmu); -+ return ret; -+} -+ -+target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr) -+{ -+ uint32_t pte, paddr, page_offset, page_size; -+ -+ pte = addr; -+ page_size = 4096; -+ -+ page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1); -+ paddr = (pte & TARGET_PAGE_MASK) + page_offset; -+ return paddr; -+} ---- qemu-0.9.1/target-z80/op.c -+++ qemu-0.9.1/target-z80/op.c -@@ -0,0 +1,1175 @@ -+/* -+ * Z80 micro operations -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#define ASM_SOFTMMU -+#include "exec.h" -+ -+#define REGHIGH A -+#define REGLOW F -+#define REGPAIRNAME _AF -+#define REGHIGHNAME _A -+#define REGLOWNAME _F -+#include "opreg_template2.h" -+#undef REGHIGH -+#undef REGLOW -+#undef REGPAIRNAME -+#undef REGHIGHNAME -+#undef REGLOWNAME -+ -+#define REG BC -+#define REGNAME _BC -+#define REGHIGH _B -+#define REGLOW _C -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+#undef REGHIGH -+#undef REGLOW -+ -+#define REG DE -+#define REGNAME _DE -+#define REGHIGH _D -+#define REGLOW _E -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+#undef REGHIGH -+#undef REGLOW -+ -+#define REG HL -+#define REGNAME _HL -+#define REGHIGH _H -+#define REGLOW _L -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+#undef REGHIGH -+#undef REGLOW -+ -+#define REG IX -+#define REGNAME _IX -+#define REGHIGH _IXh -+#define REGLOW _IXl -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+#undef REGHIGH -+#undef REGLOW -+ -+#define REG IY -+#define REGNAME _IY -+#define REGHIGH _IYh -+#define REGLOW _IYl -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+#undef REGHIGH -+#undef REGLOW -+ -+#define REG SP -+#define REGNAME _SP -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+ -+#define REG AFX -+#define REGNAME _AFX -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+ -+#define REG BCX -+#define REGNAME _BCX -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+ -+#define REG DEX -+#define REGNAME _DEX -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+ -+#define REG HLX -+#define REGNAME _HLX -+#include "opreg_template.h" -+#undef REG -+#undef REGNAME -+ -+void OPPROTO op_movl_pc_im(void) -+{ -+ PC = (uint16_t)PARAM1; -+} -+ -+void OPPROTO op_debug(void) -+{ -+ env->exception_index = EXCP_DEBUG; -+ cpu_loop_exit(); -+} -+ -+void OPPROTO op_raise_exception(void) -+{ -+ int exception_index; -+ exception_index = PARAM1; -+ raise_exception(exception_index); -+} -+ -+void OPPROTO op_set_inhibit_irq(void) -+{ -+ env->hflags |= HF_INHIBIT_IRQ_MASK; -+} -+ -+void OPPROTO op_reset_inhibit_irq(void) -+{ -+ env->hflags &= ~HF_INHIBIT_IRQ_MASK; -+} -+ -+void OPPROTO op_movl_T0_0(void) -+{ -+ T0 = 0; -+} -+ -+void OPPROTO op_exit_tb(void) -+{ -+ EXIT_TB(); -+} -+ -+/************ Z80 MICRO-OPS ***********/ -+ -+/* Loads/stores */ -+ -+void OPPROTO op_mov_T0_im(void) -+{ -+ T0 = (uint16_t)PARAM1; -+} -+ -+void OPPROTO op_mov_T1_im(void) -+{ -+ T0 = (uint16_t)PARAM1; -+} -+ -+void OPPROTO op_mov_A0_im(void) -+{ -+ A0 = (uint16_t)PARAM1; -+} -+ -+void OPPROTO op_movb_T0_HLmem(void) -+{ -+ A0 = HL; -+ T0 = ldub_kernel(A0); -+} -+ -+void OPPROTO op_movb_HLmem_T0(void) -+{ -+ A0 = HL; -+ stb_kernel(A0, T0); -+} -+ -+void OPPROTO op_movb_T0_IXmem(void) -+{ -+ A0 = (uint16_t)(IX + PARAM1); -+ T0 = ldub_kernel(A0); -+} -+ -+void OPPROTO op_movb_IXmem_T0(void) -+{ -+ A0 = (uint16_t)(IX + PARAM1); -+ stb_kernel(A0, T0); -+} -+ -+void OPPROTO op_movb_T0_IYmem(void) -+{ -+ A0 = (uint16_t)(IY + PARAM1); -+ T0 = ldub_kernel(A0); -+} -+ -+void OPPROTO op_movb_IYmem_T0(void) -+{ -+ A0 = (uint16_t)(IY + PARAM1); -+ stb_kernel(A0, T0); -+} -+ -+void OPPROTO op_ldb_T0_A0(void) -+{ -+ T0 = ldub_kernel(A0); -+} -+ -+void OPPROTO op_ldw_T0_A0(void) -+{ -+ T0 = lduw_kernel(A0); -+} -+ -+void OPPROTO op_stb_T0_A0(void) -+{ -+ stb_kernel(A0, T0); -+} -+ -+void OPPROTO op_stw_T0_A0(void) -+{ -+ stw_kernel(A0, T0); -+} -+ -+/* Stack operations */ -+ -+void OPPROTO op_pushw_T0(void) -+{ -+ SP = (uint16_t)(SP - 2); -+ A0 = SP; -+ /* high byte pushed first: i.e. little endian */ -+ stw_kernel(A0, T0); -+} -+ -+void OPPROTO op_popw_T0(void) -+{ -+ A0 = SP; -+ /* low byte popped first: i.e. little endian */ -+ T0 = lduw_kernel(A0); -+ SP = (uint16_t)(SP + 2); -+} -+ -+void OPPROTO op_popw_T1(void) -+{ -+ A0 = SP; -+ /* low byte popped first: i.e. little endian */ -+ T1 = lduw_kernel(A0); -+ SP = (uint16_t)(SP + 2); -+} -+ -+/* Exchange operations */ -+ -+void OPPROTO op_ex_de_hl(void) -+{ -+ T0 = DE; -+ DE = HL; -+ HL = T0; -+} -+ -+void OPPROTO op_ex_af_afx(void) -+{ -+ T0 = AFX; -+ AFX = (A << 8) | F; -+ A = (uint8_t)(T0 >> 8); -+ F = (uint8_t)T0; -+} -+ -+void OPPROTO op_exx(void) -+{ -+ T0 = BCX; -+ BCX = BC; -+ BC = T0; -+ -+ T0 = DEX; -+ DEX = DE; -+ DE = T0; -+ -+ T0 = HLX; -+ HLX = HL; -+ HL = T0; -+} -+ -+/* Misc */ -+ -+void OPPROTO op_in_T0_im(void) -+{ -+ helper_in_debug((A << 8) | PARAM1); -+ T0 = cpu_inb(env, (A << 8) | PARAM1); -+} -+ -+void OPPROTO op_in_T0_bc_cc(void) -+{ -+ int sf, zf, pf; -+ -+ helper_in_debug(BC); -+ T0 = cpu_inb(env, BC); -+ -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[(uint8_t)T0]; -+ F = (F & CC_C) | sf | zf | pf; -+} -+ -+void OPPROTO op_out_T0_im(void) -+{ -+ cpu_outb(env, (A << 8) | PARAM1, T0); -+} -+ -+void OPPROTO op_out_T0_bc(void) -+{ -+ cpu_outb(env, BC, T0); -+} -+ -+void OPPROTO op_bit_T0(void) -+{ -+ int sf, zf, pf; -+ -+ sf = (T0 & PARAM1 & 0x80) ? CC_S : 0; -+ zf = (T0 & PARAM1) ? 0 : CC_Z; -+ pf = (T0 & PARAM1) ? 0 : CC_P; -+ F = (F & CC_C) | sf | zf | CC_H | pf; -+} -+ -+void OPPROTO op_res_T0(void) -+{ -+ T0 &= (uint8_t)PARAM1; -+} -+ -+void OPPROTO op_set_T0(void) -+{ -+ T0 |= (uint8_t)PARAM1; -+} -+ -+void OPPROTO op_jmp_T0(void) -+{ -+ PC = T0; -+} -+ -+void OPPROTO op_djnz(void) -+{ -+ BC = (uint16_t)(BC - 0x0100); -+ if (BC & 0xff00) -+ PC = PARAM1; -+ else -+ PC = PARAM2; -+ FORCE_RET(); -+} -+ -+/* Conditional jumps */ -+ -+void OPPROTO op_jp_nz(void) -+{ -+ if (!(F & CC_Z)) -+ GOTO_LABEL_PARAM(1); -+ FORCE_RET(); -+} -+ -+void OPPROTO op_jp_z(void) -+{ -+ if (F & CC_Z) -+ GOTO_LABEL_PARAM(1); -+ FORCE_RET(); -+} -+ -+void OPPROTO op_jp_nc(void) -+{ -+ if (!(F & CC_C)) -+ GOTO_LABEL_PARAM(1); -+ FORCE_RET(); -+} -+ -+void OPPROTO op_jp_c(void) -+{ -+ if (F & CC_C) -+ GOTO_LABEL_PARAM(1); -+ FORCE_RET(); -+} -+ -+void OPPROTO op_jp_po(void) -+{ -+ if (!(F & CC_P)) -+ GOTO_LABEL_PARAM(1); -+ FORCE_RET(); -+} -+ -+void OPPROTO op_jp_pe(void) -+{ -+ if (F & CC_P) -+ GOTO_LABEL_PARAM(1); -+ FORCE_RET(); -+} -+ -+void OPPROTO op_jp_p(void) -+{ -+ if (!(F & CC_S)) -+ GOTO_LABEL_PARAM(1); -+ FORCE_RET(); -+} -+ -+void OPPROTO op_jp_m(void) -+{ -+ if (F & CC_S) -+ GOTO_LABEL_PARAM(1); -+ FORCE_RET(); -+} -+ -+/* Arithmetic/logic operations */ -+ -+#define signed_overflow_add(op1, op2, res, size) \ -+ (!!((~(op1 ^ op2) & (op1 ^ res)) >> (size - 1))) -+ -+#define signed_overflow_sub(op1, op2, res, size) \ -+ (!!(((op1 ^ op2) & (op1 ^ res)) >> (size - 1))) -+ -+void OPPROTO op_add_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int tmp = A; -+ int carry; -+ -+ A = (uint8_t)(A + T0); -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ carry = (tmp & T0) | ((tmp | T0) & ~A); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = signed_overflow_add(tmp, T0, A, 8) ? CC_P : 0; -+ cf = (carry & 0x80) ? CC_C : 0; -+ -+ F = sf | zf | hf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_adc_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int tmp = A; -+ int carry; -+ -+ A = (uint8_t)(A + T0 + !!(F & CC_C)); -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ carry = (tmp & T0) | ((tmp | T0) & ~A); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = signed_overflow_add(tmp, T0, A, 8) ? CC_P : 0; -+ cf = (carry & 0x80) ? CC_C : 0; -+ -+ F = sf | zf | hf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_sub_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int tmp = A; -+ int carry; -+ -+ A = (uint8_t)(A - T0); -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ carry = (~tmp & T0) | (~(tmp ^ T0) & A); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = signed_overflow_sub(tmp, T0, A, 8) ? CC_P : 0; -+ cf = (carry & 0x80) ? CC_C : 0; -+ -+ F = sf | zf | hf | pf | CC_N | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_sbc_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int tmp = A; -+ int carry; -+ -+ A = (uint8_t)(A - T0 - !!(F & CC_C)); -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ carry = (~tmp & T0) | (~(tmp ^ T0) & A); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = signed_overflow_sub(tmp, T0, A, 8) ? CC_P : 0; -+ cf = (carry & 0x80) ? CC_C : 0; -+ -+ F = sf | zf | hf | pf | CC_N | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_and_cc(void) -+{ -+ int sf, zf, pf; -+ A = (uint8_t)(A & T0); -+ -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ pf = parity_table[(uint8_t)A]; -+ F = sf | zf | CC_H | pf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_xor_cc(void) -+{ -+ int sf, zf, pf; -+ A = (uint8_t)(A ^ T0); -+ -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ pf = parity_table[(uint8_t)A]; -+ F = sf | zf | pf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_or_cc(void) -+{ -+ int sf, zf, pf; -+ A = (uint8_t)(A | T0); -+ -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ pf = parity_table[(uint8_t)A]; -+ F = sf | zf | pf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_cp_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int res, carry; -+ -+ res = (uint8_t)(A - T0); -+ sf = (res & 0x80) ? CC_S : 0; -+ zf = res ? 0 : CC_Z; -+ carry = (~A & T0) | (~(A ^ T0) & res); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = signed_overflow_sub(A, T0, res, 8) ? CC_P : 0; -+ cf = (carry & 0x80) ? CC_C : 0; -+ -+ F = sf | zf | hf | pf | CC_N | cf; -+ -+ FORCE_RET(); -+// CC_DST = (uint8_t)(A - T0); -+} -+ -+/* Rotation/shift operations */ -+ -+void OPPROTO op_rlc_T0_cc(void) -+{ -+ int sf, zf, pf, cf; -+ int tmp; -+ -+ tmp = T0; -+ T0 = (uint8_t)((T0 << 1) | !!(T0 & 0x80)); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[T0]; -+ cf = (tmp & 0x80) ? CC_C : 0; -+ F = sf | zf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_rrc_T0_cc(void) -+{ -+ int sf, zf, pf, cf; -+ int tmp; -+ -+ tmp = T0; -+ T0 = (uint8_t)((T0 >> 1) | ((tmp & 0x01) ? 0x80 : 0)); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[T0]; -+ cf = (tmp & 0x01) ? CC_C : 0; -+ F = sf | zf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_rl_T0_cc(void) -+{ -+ int sf, zf, pf, cf; -+ int tmp; -+ -+ tmp = T0; -+ T0 = (uint8_t)((T0 << 1) | !!(F & CC_C)); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[T0]; -+ cf = (tmp & 0x80) ? CC_C : 0; -+ F = sf | zf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_rr_T0_cc(void) -+{ -+ int sf, zf, pf, cf; -+ int tmp; -+ -+ tmp = T0; -+ T0 = (uint8_t)((T0 >> 1) | ((F & CC_C) ? 0x80 : 0)); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[T0]; -+ cf = (tmp & 0x01) ? CC_C : 0; -+ F = sf | zf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_sla_T0_cc(void) -+{ -+ int sf, zf, pf, cf; -+ int tmp; -+ -+ tmp = T0; -+ T0 = (uint8_t)(T0 << 1); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[T0]; -+ cf = (tmp & 0x80) ? CC_C : 0; -+ F = sf | zf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_sra_T0_cc(void) -+{ -+ int sf, zf, pf, cf; -+ int tmp; -+ -+ tmp = T0; -+ T0 = (uint8_t)((T0 >> 1) | (T0 & 0x80)); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[T0]; -+ cf = (tmp & 0x01) ? CC_C : 0; -+ F = sf | zf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+/* Z80-specific: R800 has tst instruction */ -+void OPPROTO op_sll_T0_cc(void) -+{ -+ int sf, zf, pf, cf; -+ int tmp; -+ -+ tmp = T0; -+ T0 = (uint8_t)((T0 << 1) | 1); /* Yes -- bit 0 is *set* */ -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[T0]; -+ cf = (tmp & 0x80) ? CC_C : 0; -+ F = sf | zf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_srl_T0_cc(void) -+{ -+ int sf, zf, pf, cf; -+ int tmp; -+ -+ tmp = T0; -+ T0 = (uint8_t)(T0 >> 1); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ pf = parity_table[T0]; -+ cf = (tmp & 0x01) ? CC_C : 0; -+ F = sf | zf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_rld_cc(void) -+{ -+ int sf, zf, pf; -+ int tmp = A & 0x0f; -+ A = (A & 0xf0) | ((T0 >> 4) & 0x0f); -+ T0 = ((T0 << 4) & 0xf0) | tmp; -+ -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ pf = parity_table[A]; -+ -+ F = (F & CC_C) | sf | zf | pf; -+} -+ -+void OPPROTO op_rrd_cc(void) -+{ -+ int sf, zf, pf; -+ int tmp = A & 0x0f; -+ A = (A & 0xf0) | (T0 & 0x0f); -+ T0 = (T0 >> 4) | (tmp << 4); -+ -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ pf = parity_table[A]; -+ -+ F = (F & CC_C) | sf | zf | pf; -+} -+ -+/* Block instructions */ -+ -+void OPPROTO op_bli_ld_inc_cc(void) -+{ -+ int pf; -+ -+ BC = (uint16_t)(BC - 1); -+ DE = (uint16_t)(DE + 1); -+ HL = (uint16_t)(HL + 1); -+ -+ pf = BC ? CC_P : 0; -+ F = (F & (CC_S | CC_Z | CC_C)) | pf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_bli_ld_dec_cc(void) -+{ -+ int pf; -+ -+ BC = (uint16_t)(BC - 1); -+ DE = (uint16_t)(DE - 1); -+ HL = (uint16_t)(HL - 1); -+ -+ pf = BC ? CC_P : 0; -+ F = (F & (CC_S | CC_Z | CC_C)) | pf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_bli_ld_rep(void) -+{ -+ if (BC) -+ PC = PARAM1 - 2; -+ else -+ PC = PARAM1; -+ FORCE_RET(); -+} -+ -+void OPPROTO op_bli_cp_cc(void) -+{ -+ int sf, zf, hf, pf; -+ int res, carry; -+ -+ res = (uint8_t)(A - T0); -+ sf = (res & 0x80) ? CC_S : 0; -+ zf = res ? 0 : CC_Z; -+ carry = (~A & T0) | (~(A ^ T0) & res); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = BC ? CC_P : 0; -+ -+ F = (F & CC_C) | sf | zf | hf | pf | CC_N; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_bli_cp_inc_cc(void) -+{ -+ int pf; -+ -+ BC = (uint16_t)(BC - 1); -+ HL = (uint16_t)(HL + 1); -+ -+ pf = BC ? CC_P : 0; -+ F = (F & ~CC_P) | pf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_bli_cp_dec_cc(void) -+{ -+ int pf; -+ -+ BC = (uint16_t)(BC - 1); -+ HL = (uint16_t)(HL - 1); -+ -+ pf = BC ? CC_P : 0; -+ F = (F & ~CC_P) | pf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_bli_cp_rep(void) -+{ -+ if (BC && T0 != A) -+ PC = PARAM1 - 2; -+ else -+ PC = PARAM1; -+ FORCE_RET(); -+} -+ -+void OPPROTO op_bli_io_inc(void) -+{ -+ HL = (uint16_t)(HL + 1); -+ BC = (uint16_t)BC - 0x0100; -+} -+ -+void OPPROTO op_bli_io_dec(void) -+{ -+ HL = (uint16_t)(HL - 1); -+ BC = (uint16_t)BC - 0x0100; -+} -+ -+void OPPROTO op_bli_io_rep(void) -+{ -+ if (BC & 0xff00) -+ PC = PARAM1 - 2; -+ else -+ PC = PARAM1; -+ FORCE_RET(); -+} -+ -+/* misc */ -+ -+void OPPROTO op_rlca_cc(void) -+{ -+ int cf; -+ int tmp; -+ -+ tmp = A; -+ A = (uint8_t)((A << 1) | !!(tmp & 0x80)); -+ cf = (tmp & 0x80) ? CC_C : 0; -+ F = (F & (CC_S | CC_Z | CC_P)) | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_rrca_cc(void) -+{ -+ int cf; -+ int tmp; -+ -+ tmp = A; -+ A = (A >> 1) | ((tmp & 0x01) ? 0x80 : 0); -+ cf = (tmp & 0x01) ? CC_C : 0; -+ F = (F & (CC_S | CC_Z | CC_P)) | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_rla_cc(void) -+{ -+ int cf; -+ int tmp; -+ -+ tmp = A; -+ A = (uint8_t)((A << 1) | !!(F & CC_C)); -+ cf = (tmp & 0x80) ? CC_C : 0; -+ F = (F & (CC_S | CC_Z | CC_P)) | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_rra_cc(void) -+{ -+ int cf; -+ int tmp; -+ -+ tmp = A; -+ A = (A >> 1) | ((F & CC_C) ? 0x80 : 0); -+ cf = (tmp & 0x01) ? CC_C : 0; -+ F = (F & (CC_S | CC_Z | CC_P)) | cf; -+ -+ FORCE_RET(); -+} -+ -+/* TODO */ -+void OPPROTO op_daa_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int cor = 0; -+ int tmp = A; -+ -+ if (A > 0x99 || (F & CC_C)) { -+ cor |= 0x60; -+ cf = CC_C; -+ } else { -+ cf = 0; -+ } -+ -+ if ((A & 0x0f) > 0x09 || (F & CC_H)) { -+ cor |= 0x06; -+ } -+ -+ if (!(F & CC_N)) { -+ A = (uint8_t)(A + cor); -+ } else { -+ A = (uint8_t)(A - cor); -+ } -+ -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ hf = ((tmp ^ A) & 0x10) ? CC_H : 0; -+ pf = parity_table[(uint8_t)A]; -+ -+ F = (F & CC_N) | sf | zf | hf | pf | cf; -+} -+ -+void OPPROTO op_cpl_cc(void) -+{ -+ A = (uint8_t)~A; -+ F |= CC_H | CC_N; -+} -+ -+void OPPROTO op_scf_cc(void) -+{ -+ F = (F & (CC_S | CC_Z | CC_P)) | CC_C; -+} -+ -+void OPPROTO op_ccf_cc(void) -+{ -+ int hf, cf; -+ -+ hf = (F & CC_C) ? CC_H : 0; -+ cf = (F & CC_C) ^ CC_C; -+ F = (F & (CC_S | CC_Z | CC_P)) | hf | cf; -+ -+ FORCE_RET(); -+} -+ -+/* misc */ -+ -+void OPPROTO op_neg_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int tmp = A; -+ int carry; -+ -+ A = (uint8_t)-A; -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ carry = (tmp & T0) | ((tmp | T0) & ~A); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = signed_overflow_sub(tmp, T0, A, 8) ? CC_P : 0; -+ cf = (carry & 0x80) ? CC_C : 0; -+ -+ F = sf | zf | hf | pf | CC_N | cf; -+ -+ FORCE_RET(); -+} -+ -+/* word operations -- HL only? */ -+ -+void OPPROTO op_incw_T0(void) -+{ -+ T0++; -+ T0 = (uint16_t)T0; -+} -+ -+void OPPROTO op_decw_T0(void) -+{ -+ T0--; -+ T0 = (uint16_t)T0; -+} -+ -+void OPPROTO op_sbcw_T0_T1_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int tmp = T0; -+ int carry; -+ -+ T0 = (uint16_t)(T0 - T1 - !!(F & CC_C)); -+ sf = (T0 & 0x8000) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ carry = (~tmp & T1) | (~(tmp ^ T1) & T0); -+ hf = (carry & 0x0800) ? CC_H : 0; -+ pf = signed_overflow_sub(tmp, T1, T0, 16) ? CC_P : 0; -+ cf = (carry & 0x8000) ? CC_C : 0; -+ -+ F = sf | zf | hf | pf | CC_N | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_addw_T0_T1_cc(void) -+{ -+ int hf, cf; -+ int tmp = T0; -+ int carry; -+ -+ T0 = (uint16_t)(T0 + T1); -+ carry = (tmp & T1) | ((tmp | T1) & ~T0); -+ hf = (carry & 0x0800) ? CC_H : 0; -+ cf = (carry & 0x8000) ? CC_C : 0; -+ -+ F = (F & (CC_S | CC_Z | CC_P)) | hf | cf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_adcw_T0_T1_cc(void) -+{ -+ int sf, zf, hf, pf, cf; -+ int tmp = T0; -+ int carry; -+ -+ T0 = (uint16_t)(T0 + T1 + !!(F & CC_C)); -+ sf = (T0 & 0x8000) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ carry = (tmp & T1) | ((tmp | T1) & ~T0); -+ hf = (carry & 0x0800) ? CC_H : 0; -+ pf = signed_overflow_add(tmp, T1, T0, 8) ? CC_P : 0; -+ cf = (carry & 0x8000) ? CC_C : 0; -+ -+ F = sf | zf | hf | pf | cf; -+ -+ FORCE_RET(); -+} -+ -+/* misc */ -+ -+void OPPROTO op_incb_T0_cc(void) -+{ -+ int sf, zf, hf, pf; -+ int tmp; -+ int carry; -+ -+ tmp = T0; -+ T0 = (uint8_t)(T0 + 1); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ -+ carry = (tmp & 1) | ((tmp | 1) & ~T0); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = signed_overflow_add(tmp, 1, T0, 8) ? CC_P : 0; -+ -+ F = (F & CC_C) | sf | zf | hf | pf; -+ -+ FORCE_RET(); -+} -+ -+void OPPROTO op_decb_T0_cc(void) -+{ -+ int sf, zf, hf, pf; -+ int tmp; -+ int carry; -+ -+ tmp = T0; -+ T0 = (uint8_t)(T0 - 1); -+ sf = (T0 & 0x80) ? CC_S : 0; -+ zf = T0 ? 0 : CC_Z; -+ -+ carry = (~tmp & 1) | (~(tmp ^ 1) & T0); -+ hf = (carry & 0x08) ? CC_H : 0; -+ pf = signed_overflow_sub(tmp, 1, T0, 8) ? CC_P : 0; -+ -+ F = (F & CC_C) | sf | zf | hf | CC_N | pf; -+ /* TODO: check CC_N is set */ -+ -+ FORCE_RET(); -+} -+ -+/* value on data bus is 0xff for speccy */ -+/* IM0 = execute data on bus (rst $38 on speccy) */ -+/* IM1 = execute rst $38 (ROM uses this)*/ -+/* IM2 = indirect jump -- address is held at (I << 8) | DATA */ -+ -+/* when an interrupt occurs, iff1 and iff2 are reset, disabling interrupts */ -+/* when an NMI occurs, iff1 is reset. iff2 is left unchanged */ -+ -+void OPPROTO op_imode(void) -+{ -+ /* env->imode = PARAM1; */ -+ env->imode = PARAM1; -+} -+ -+/* enable interrupts */ -+void OPPROTO op_ei(void) -+{ -+ env->iff1 = 1; -+ env->iff2 = 1; -+} -+ -+/* disable interrupts */ -+void OPPROTO op_di(void) -+{ -+ env->iff1 = 0; -+ env->iff2 = 0; -+} -+ -+/* reenable interrupts if enabled */ -+void OPPROTO op_ri(void) -+{ -+ env->iff1 = env->iff2; -+} -+ -+void OPPROTO op_halt(void) -+{ -+ helper_hlt(); -+} -+ -+void OPPROTO op_ld_R_A(void) -+{ -+ R = A; -+} -+ -+void OPPROTO op_ld_I_A(void) -+{ -+ I = A; -+} -+ -+void OPPROTO op_ld_A_R(void) -+{ -+ int sf, zf, pf; -+ -+ A = R; -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ pf = env->iff2 ? CC_P : 0; -+ -+ F = (F & CC_C) | sf | zf | pf; -+} -+ -+void OPPROTO op_ld_A_I(void) -+{ -+ int sf, zf, pf; -+ -+ A = I; -+ sf = (A & 0x80) ? CC_S : 0; -+ zf = A ? 0 : CC_Z; -+ pf = env->iff2 ? CC_P : 0; -+ -+ F = (F & CC_C) | sf | zf | pf; -+} -+ -+void OPPROTO op_dump_registers(void) -+{ -+ helper_dump_registers(PARAM1); -+} -+ -+/*********** END OF Z80 OPS ***********/ -+ -+void OPPROTO op_set_cc_op(void) -+{ -+ CC_OP = PARAM1; -+} -+ -+static int compute_all_eflags(void) -+{ -+ return CC_SRC; -+} -+ -+static int compute_c_eflags(void) -+{ -+ return CC_SRC & CC_C; -+} -+ -+CCTable cc_table[CC_OP_NB] = { -+ [CC_OP_DYNAMIC] = { /* should never happen */ }, -+ -+ [CC_OP_EFLAGS] = { compute_all_eflags, compute_c_eflags }, -+}; -+ -+/* threading support */ -+void OPPROTO op_lock(void) -+{ -+ cpu_lock(); -+} -+ -+void OPPROTO op_unlock(void) -+{ -+ cpu_unlock(); -+} ---- qemu-0.9.1/target-z80/opreg_template.h -+++ qemu-0.9.1/target-z80/opreg_template.h -@@ -0,0 +1,74 @@ -+/* -+ * Z80 micro operations (templates for various register related -+ * operations) -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+void OPPROTO glue(op_movw_T0,REGNAME)(void) -+{ -+ T0 = REG; -+} -+ -+#ifdef REGHIGH -+void OPPROTO glue(op_movb_T0,REGHIGH)(void) -+{ -+ T0 = (REG >> 8) & 0xff; -+} -+#endif -+ -+#ifdef REGLOW -+void OPPROTO glue(op_movb_T0,REGLOW)(void) -+{ -+ T0 = REG & 0xff; -+} -+#endif -+ -+void OPPROTO glue(op_movw_T1,REGNAME)(void) -+{ -+ T1 = REG; -+} -+ -+void OPPROTO glue(op_movw_A0,REGNAME)(void) -+{ -+ A0 = REG; -+} -+ -+void OPPROTO glue(glue(op_movw,REGNAME),_T0)(void) -+{ -+ REG = (uint16_t)T0; -+} -+ -+#ifdef REGHIGH -+void OPPROTO glue(glue(op_movb,REGHIGH),_T0)(void) -+{ -+ REG = (REG & 0xff) | ((T0 & 0xff) << 8); -+} -+#endif -+ -+#ifdef REGLOW -+void OPPROTO glue(glue(op_movb,REGLOW),_T0)(void) -+{ -+ REG = (REG & 0xff00) | (T0 & 0xff); -+} -+#endif -+ -+void OPPROTO glue(glue(op_movw,REGNAME),_T1)(void) -+{ -+ REG = (uint16_t)T1; -+} ---- qemu-0.9.1/target-z80/opreg_template2.h -+++ qemu-0.9.1/target-z80/opreg_template2.h -@@ -0,0 +1,63 @@ -+/* -+ * Z80 micro operations (templates for various register related -+ * operations) -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+void OPPROTO glue(op_movw_T0,REGPAIRNAME)(void) -+{ -+ T0 = (REGHIGH << 8) | REGLOW; -+} -+ -+void OPPROTO glue(op_movb_T0,REGHIGHNAME)(void) -+{ -+ T0 = REGHIGH; -+} -+ -+void OPPROTO glue(op_movb_T0,REGLOWNAME)(void) -+{ -+ T0 = REGLOW; -+} -+ -+void OPPROTO glue(op_movw_T1,REGPAIRNAME)(void) -+{ -+ T1 = (REGHIGH << 8) | REGLOW; -+} -+ -+void OPPROTO glue(glue(op_movw,REGPAIRNAME),_T0)(void) -+{ -+ REGHIGH = (uint8_t)(T0 >> 8); -+ REGLOW = (uint8_t)T0; -+} -+ -+void OPPROTO glue(glue(op_movb,REGHIGHNAME),_T0)(void) -+{ -+ REGHIGH = (uint8_t)T0; -+} -+ -+void OPPROTO glue(glue(op_movb,REGLOWNAME),_T0)(void) -+{ -+ REGLOW = (uint8_t)T0; -+} -+ -+void OPPROTO glue(glue(op_movw,REGPAIRNAME),_T1)(void) -+{ -+ REGHIGH = (uint16_t)(T1 >> 8); -+ REGLOW = (uint16_t)T1; -+} ---- qemu-0.9.1/target-z80/ops_mem.h -+++ qemu-0.9.1/target-z80/ops_mem.h -@@ -0,0 +1,59 @@ -+void OPPROTO glue(glue(op_ldub, MEMSUFFIX), _T0_A0)(void) -+{ -+ T0 = glue(ldub, MEMSUFFIX)(A0); -+} -+ -+void OPPROTO glue(glue(op_ldsb, MEMSUFFIX), _T0_A0)(void) -+{ -+ T0 = glue(ldsb, MEMSUFFIX)(A0); -+} -+ -+void OPPROTO glue(glue(op_lduw, MEMSUFFIX), _T0_A0)(void) -+{ -+ T0 = glue(lduw, MEMSUFFIX)(A0); -+} -+ -+void OPPROTO glue(glue(op_ldsw, MEMSUFFIX), _T0_A0)(void) -+{ -+ T0 = glue(ldsw, MEMSUFFIX)(A0); -+} -+ -+void OPPROTO glue(glue(op_ldub, MEMSUFFIX), _T1_A0)(void) -+{ -+ T1 = glue(ldub, MEMSUFFIX)(A0); -+} -+ -+void OPPROTO glue(glue(op_ldsb, MEMSUFFIX), _T1_A0)(void) -+{ -+ T1 = glue(ldsb, MEMSUFFIX)(A0); -+} -+ -+void OPPROTO glue(glue(op_lduw, MEMSUFFIX), _T1_A0)(void) -+{ -+ T1 = glue(lduw, MEMSUFFIX)(A0); -+} -+ -+void OPPROTO glue(glue(op_ldsw, MEMSUFFIX), _T1_A0)(void) -+{ -+ T1 = glue(ldsw, MEMSUFFIX)(A0); -+} -+ -+void OPPROTO glue(glue(op_stb, MEMSUFFIX), _T0_A0)(void) -+{ -+ glue(stb, MEMSUFFIX)(A0, T0); -+ FORCE_RET(); -+} -+ -+void OPPROTO glue(glue(op_stw, MEMSUFFIX), _T0_A0)(void) -+{ -+ glue(stw, MEMSUFFIX)(A0, T0); -+ FORCE_RET(); -+} -+ -+void OPPROTO glue(glue(op_stw, MEMSUFFIX), _T1_A0)(void) -+{ -+ glue(stw, MEMSUFFIX)(A0, T1); -+ FORCE_RET(); -+} -+ -+#undef MEMSUFFIX ---- qemu-0.9.1/target-z80/translate.c -+++ qemu-0.9.1/target-z80/translate.c -@@ -0,0 +1,1600 @@ -+/* -+ * Z80 translation -+ * -+ * Copyright (c) 2007 Stuart Brady -+ * Copyright (c) 2003 Fabrice Bellard -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "cpu.h" -+#include "exec-all.h" -+#include "disas.h" -+ -+/* XXX: move that elsewhere */ -+static uint16_t *gen_opc_ptr; -+static uint32_t *gen_opparam_ptr; -+ -+#define PREFIX_CB 0x01 -+#define PREFIX_DD 0x02 -+#define PREFIX_ED 0x04 -+#define PREFIX_FD 0x08 -+ -+#ifdef USE_DIRECT_JUMP -+#define TBPARAM(x) -+#else -+#define TBPARAM(x) (long)(x) -+#endif -+ -+//#define zprintf(...) -+#define zprintf printf -+ -+typedef struct DisasContext { -+ /* current insn context */ -+ int override; /* -1 if no override */ -+ int prefix; -+ uint16_t pc; /* pc = pc + cs_base */ -+ int is_jmp; /* 1 = means jump (stop translation), 2 means CPU -+ static state change (stop translation) */ -+ /* current block context */ -+ target_ulong cs_base; /* base of CS segment */ -+ int cc_op; /* current CC operation */ -+ int singlestep_enabled; /* "hardware" single step enabled */ -+ int jmp_opt; /* use direct block chaining for direct jumps */ -+ int flags; /* all execution flags */ -+ struct TranslationBlock *tb; -+} DisasContext; -+ -+static void gen_eob(DisasContext *s); -+static void gen_jmp(DisasContext *s, target_ulong pc); -+static void gen_jmp_tb(DisasContext *s, target_ulong pc, int tb_num); -+ -+/* i386 arith/logic operations */ -+enum { -+ OP_ADDL, -+ OP_ORL, -+ OP_ADCL, -+ OP_SBBL, -+ OP_ANDL, -+ OP_SUBL, -+ OP_XORL, -+ OP_CMPL, -+}; -+ -+enum { -+#define DEF(s, n, copy_size) INDEX_op_ ## s, -+#include "opc.h" -+#undef DEF -+ NB_OPS, -+}; -+ -+#include "gen-op.h" -+ -+enum { -+ /* 8-bit registers */ -+ OR_B, -+ OR_C, -+ OR_D, -+ OR_E, -+ OR_H, -+ OR_L, -+ OR_HLmem, -+ OR_A, -+ -+ OR_IXh, -+ OR_IXl, -+ -+ OR_IYh, -+ OR_IYl, -+ -+ OR_IXmem, -+ OR_IYmem, -+}; -+ -+char *regnames[] = { -+ [OR_B] = "b", -+ [OR_C] = "c", -+ [OR_D] = "d", -+ [OR_E] = "e", -+ [OR_H] = "h", -+ [OR_L] = "l", -+ [OR_HLmem] = "(hl)", -+ [OR_A] = "a", -+ -+ [OR_IXh] = "ixh", -+ [OR_IXl] = "ixl", -+ -+ [OR_IYh] = "iyh", -+ [OR_IYl] = "iyl", -+ -+ [OR_IXmem] = "(ix+d)", -+ [OR_IYmem] = "(iy+d)", -+}; -+ -+char *idxnames[] = { -+ [OR_IXmem] = "ix", -+ [OR_IYmem] = "iy", -+}; -+ -+/* signed hex byte value for printf */ -+#define shexb(val) (val < 0 ? '-' : '+'), (abs(val)) -+ -+static GenOpFunc *gen_op_movb_T0_reg[] = { -+ [OR_B] = gen_op_movb_T0_B, -+ [OR_C] = gen_op_movb_T0_C, -+ [OR_D] = gen_op_movb_T0_D, -+ [OR_E] = gen_op_movb_T0_E, -+ [OR_H] = gen_op_movb_T0_H, -+ [OR_L] = gen_op_movb_T0_L, -+ [OR_HLmem] = gen_op_movb_T0_HLmem, -+ [OR_A] = gen_op_movb_T0_A, -+ -+ [OR_IXh] = gen_op_movb_T0_IXh, -+ [OR_IXl] = gen_op_movb_T0_IXl, -+ -+ [OR_IYh] = gen_op_movb_T0_IYh, -+ [OR_IYl] = gen_op_movb_T0_IYl, -+}; -+ -+static GenOpFunc1 *gen_op_movb_T0_idx[] = { -+ [OR_IXmem] = gen_op_movb_T0_IXmem, -+ [OR_IYmem] = gen_op_movb_T0_IYmem, -+}; -+ -+static GenOpFunc *gen_op_movb_reg_T0[] = { -+ [OR_B] = gen_op_movb_B_T0, -+ [OR_C] = gen_op_movb_C_T0, -+ [OR_D] = gen_op_movb_D_T0, -+ [OR_E] = gen_op_movb_E_T0, -+ [OR_H] = gen_op_movb_H_T0, -+ [OR_L] = gen_op_movb_L_T0, -+ [OR_HLmem] = gen_op_movb_HLmem_T0, -+ [OR_A] = gen_op_movb_A_T0, -+ -+ [OR_IXh] = gen_op_movb_IXh_T0, -+ [OR_IXl] = gen_op_movb_IXl_T0, -+ -+ [OR_IYh] = gen_op_movb_IYh_T0, -+ [OR_IYl] = gen_op_movb_IYl_T0, -+}; -+ -+static GenOpFunc1 *gen_op_movb_idx_T0[] = { -+ [OR_IXmem] = gen_op_movb_IXmem_T0, -+ [OR_IYmem] = gen_op_movb_IYmem_T0, -+}; -+ -+static inline int regmap(int reg, int m) { -+ switch (m) { -+ case 1: -+ switch (reg) { -+ case OR_H: -+ return OR_IXh; -+ case OR_L: -+ return OR_IXl; -+ case OR_HLmem: -+ return OR_IXmem; -+ default: -+ return reg; -+ } -+ case 2: -+ switch (reg) { -+ case OR_H: -+ return OR_IYh; -+ case OR_L: -+ return OR_IYl; -+ case OR_HLmem: -+ return OR_IYmem; -+ default: -+ return reg; -+ } -+ default: -+ return reg; -+ } -+} -+ -+static inline int is_indexed(int reg) { -+ if (reg == OR_IXmem || reg == OR_IYmem) -+ return 1; -+ else -+ return 0; -+} -+ -+int reg[8] = { -+ OR_B, -+ OR_C, -+ OR_D, -+ OR_E, -+ OR_H, -+ OR_L, -+ OR_HLmem, -+ OR_A, -+}; -+ -+enum { -+ /* 16-bit registers and register pairs */ -+ OR2_AF, -+ OR2_BC, -+ OR2_DE, -+ OR2_HL, -+ -+ OR2_IX, -+ OR2_IY, -+ OR2_SP, -+ -+ OR2_AFX, -+ OR2_BCX, -+ OR2_DEX, -+ OR2_HLX, -+}; -+ -+char *regpairnames[] = { -+ [OR2_AF] = "af", -+ [OR2_BC] = "bc", -+ [OR2_DE] = "de", -+ [OR2_HL] = "hl", -+ -+ [OR2_IX] = "ix", -+ [OR2_IY] = "iy", -+ [OR2_SP] = "sp", -+ -+ [OR2_AFX] = "afx", -+ [OR2_BCX] = "bcx", -+ [OR2_DEX] = "dex", -+ [OR2_HLX] = "hlx", -+}; -+ -+static GenOpFunc *gen_op_movw_T0_reg[] = { -+ [OR2_AF] = gen_op_movw_T0_AF, -+ [OR2_BC] = gen_op_movw_T0_BC, -+ [OR2_DE] = gen_op_movw_T0_DE, -+ [OR2_HL] = gen_op_movw_T0_HL, -+ -+ [OR2_IX] = gen_op_movw_T0_IX, -+ [OR2_IY] = gen_op_movw_T0_IY, -+ [OR2_SP] = gen_op_movw_T0_SP, -+ -+ [OR2_AFX] = gen_op_movw_T0_AFX, -+ [OR2_BCX] = gen_op_movw_T0_BCX, -+ [OR2_DEX] = gen_op_movw_T0_DEX, -+ [OR2_HLX] = gen_op_movw_T0_HLX, -+}; -+ -+static GenOpFunc *gen_op_movw_T1_reg[] = { -+ [OR2_AF] = gen_op_movw_T1_AF, -+ [OR2_BC] = gen_op_movw_T1_BC, -+ [OR2_DE] = gen_op_movw_T1_DE, -+ [OR2_HL] = gen_op_movw_T1_HL, -+ -+ [OR2_IX] = gen_op_movw_T1_IX, -+ [OR2_IY] = gen_op_movw_T1_IY, -+ [OR2_SP] = gen_op_movw_T1_SP, -+ -+ [OR2_AFX] = gen_op_movw_T1_AFX, -+ [OR2_BCX] = gen_op_movw_T1_BCX, -+ [OR2_DEX] = gen_op_movw_T1_DEX, -+ [OR2_HLX] = gen_op_movw_T1_HLX, -+}; -+ -+static GenOpFunc *gen_op_movw_reg_T0[] = { -+ [OR2_AF] = gen_op_movw_AF_T0, -+ [OR2_BC] = gen_op_movw_BC_T0, -+ [OR2_DE] = gen_op_movw_DE_T0, -+ [OR2_HL] = gen_op_movw_HL_T0, -+ -+ [OR2_IX] = gen_op_movw_IX_T0, -+ [OR2_IY] = gen_op_movw_IY_T0, -+ [OR2_SP] = gen_op_movw_SP_T0, -+ -+ [OR2_AFX] = gen_op_movw_AFX_T0, -+ [OR2_BCX] = gen_op_movw_BCX_T0, -+ [OR2_DEX] = gen_op_movw_DEX_T0, -+ [OR2_HLX] = gen_op_movw_HLX_T0, -+}; -+ -+static GenOpFunc *gen_op_movw_reg_T1[] = { -+ [OR2_AF] = gen_op_movw_AF_T1, -+ [OR2_BC] = gen_op_movw_BC_T1, -+ [OR2_DE] = gen_op_movw_DE_T1, -+ [OR2_HL] = gen_op_movw_HL_T1, -+ -+ [OR2_IX] = gen_op_movw_IX_T1, -+ [OR2_IY] = gen_op_movw_IY_T1, -+ [OR2_SP] = gen_op_movw_SP_T1, -+ -+ [OR2_AFX] = gen_op_movw_AFX_T1, -+ [OR2_BCX] = gen_op_movw_BCX_T1, -+ [OR2_DEX] = gen_op_movw_DEX_T1, -+ [OR2_HLX] = gen_op_movw_HLX_T1, -+}; -+ -+static inline int regpairmap(int regpair, int m) { -+ switch (regpair) { -+ case OR2_HL: -+ switch (m) { -+ case 1: -+ return OR2_IX; -+ case 2: -+ return OR2_IY; -+ default: -+ return OR2_HL; -+ } -+ default: -+ return regpair; -+ } -+} -+ -+int regpair[4] = { -+ OR2_BC, -+ OR2_DE, -+ OR2_HL, -+ OR2_SP, -+}; -+ -+int regpair2[4] = { -+ OR2_BC, -+ OR2_DE, -+ OR2_HL, -+ OR2_AF, -+}; -+ -+static inline void gen_jmp_im(target_ulong pc) -+{ -+ gen_op_movl_pc_im(pc); -+} -+ -+static void gen_debug(DisasContext *s, target_ulong cur_pc) -+{ -+ if (s->cc_op != CC_OP_DYNAMIC) -+ gen_op_set_cc_op(s->cc_op); -+ gen_jmp_im(cur_pc); -+ gen_op_debug(); -+ s->is_jmp = 3; -+} -+ -+static void gen_eob(DisasContext *s) -+{ -+ if (s->cc_op != CC_OP_DYNAMIC) -+ gen_op_set_cc_op(s->cc_op); -+ if (s->tb->flags & HF_INHIBIT_IRQ_MASK) { -+ gen_op_reset_inhibit_irq(); -+ } -+ if (s->singlestep_enabled) { -+ gen_op_debug(); -+ } else { -+ gen_op_movl_T0_0(); -+ gen_op_exit_tb(); -+ } -+ s->is_jmp = 3; -+} -+ -+static void gen_exception(DisasContext *s, int trapno, target_ulong cur_pc) -+{ -+ if (s->cc_op != CC_OP_DYNAMIC) -+ gen_op_set_cc_op(s->cc_op); -+ gen_jmp_im(cur_pc); -+ gen_op_raise_exception(trapno); -+ s->is_jmp = 3; -+} -+ -+/* Conditions */ -+ -+char *cc[8] = { -+ "nz", -+ "z", -+ "nc", -+ "c", -+ "po", -+ "pe", -+ "p", -+ "m", -+}; -+ -+static GenOpFunc1 *gen_op_jp_cc[8] = { -+ gen_op_jp_nz, -+ gen_op_jp_z, -+ gen_op_jp_nc, -+ gen_op_jp_c, -+ gen_op_jp_po, -+ gen_op_jp_pe, -+ gen_op_jp_p, -+ gen_op_jp_m, -+}; -+ -+enum { -+ COND_NZ, -+ COND_Z, -+ COND_NC, -+ COND_C, -+ COND_PO, -+ COND_PE, -+ COND_P, -+ COND_M, -+}; -+ -+/* Arithmetic/logic operations */ -+ -+char *alu[8] = { -+ "add a,", -+ "adc a,", -+ "sub ", -+ "sbc a,", -+ "and ", -+ "xor ", -+ "or ", -+ "cp ", -+}; -+ -+static GenOpFunc *gen_op_alu[8] = { -+ gen_op_add_cc, -+ gen_op_adc_cc, -+ gen_op_sub_cc, -+ gen_op_sbc_cc, -+ gen_op_and_cc, -+ gen_op_xor_cc, -+ gen_op_or_cc, -+ gen_op_cp_cc, -+}; -+ -+/* Rotation/shift operations */ -+ -+char *rot[8] = { -+ "rlc", -+ "rrc", -+ "rl", -+ "rr", -+ "sla", -+ "sra", -+ "sll", -+ "srl", -+}; -+ -+static GenOpFunc *gen_op_rot_T0[8] = { -+ gen_op_rlc_T0_cc, -+ gen_op_rrc_T0_cc, -+ gen_op_rl_T0_cc, -+ gen_op_rr_T0_cc, -+ gen_op_sla_T0_cc, -+ gen_op_sra_T0_cc, -+ gen_op_sll_T0_cc, -+ gen_op_srl_T0_cc, -+}; -+ -+/* Block instructions */ -+ -+char *bli[4][4] = { -+ { "ldi", "cpi", "ini", "outi", }, -+ { "ldd", "cpd", "ind", "outd", }, -+ { "ldir", "cpir", "inir", "otir", }, -+ { "lddr", "cpdr", "indr", "otdr", }, -+}; -+ -+int imode[8] = { -+ 0, 0, 1, 2, 0, 0, 1, 2, -+}; -+ -+static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong pc) -+{ -+// TranslationBlock *tb; -+// -+// if (tb_num == 0) -+// gen_op_goto_tb0(TBPARAM(tb)); -+// else -+// gen_op_goto_tb1(TBPARAM(tb)); -+// gen_jmp_im(pc); -+// gen_op_movl_T0_im((long)tb + tb_num); -+// gen_op_exit_tb(); -+ -+ gen_jmp_im(pc); -+ gen_eob(s); -+} -+ -+static inline void gen_jcc(DisasContext *s, int cc, -+ target_ulong val, target_ulong next_pc) { -+ TranslationBlock *tb; -+ GenOpFunc1 *func; -+ int l1; -+ -+ func = gen_op_jp_cc[cc]; -+ -+ tb = s->tb; -+ -+ l1 = gen_new_label(); -+ func(l1); -+ -+ gen_goto_tb(s, 0, next_pc); -+ -+ gen_set_label(l1); -+ gen_goto_tb(s, 1, val); -+ -+ s->is_jmp = 3; -+} -+ -+static inline void gen_callcc(DisasContext *s, int cc, -+ target_ulong val, target_ulong next_pc) { -+ TranslationBlock *tb; -+ GenOpFunc1 *func; -+ int l1; -+ -+ func = gen_op_jp_cc[cc]; -+ -+ tb = s->tb; -+ -+ l1 = gen_new_label(); -+ func(l1); -+ -+ gen_goto_tb(s, 0, next_pc); -+ -+ gen_set_label(l1); -+ gen_op_mov_T0_im(next_pc); -+ gen_op_pushw_T0(); -+ gen_goto_tb(s, 1, val); -+ -+ s->is_jmp = 3; -+} -+ -+static inline void gen_retcc(DisasContext *s, int cc, -+ target_ulong next_pc) { -+ TranslationBlock *tb; -+ GenOpFunc1 *func; -+ int l1; -+ -+ func = gen_op_jp_cc[cc]; -+ -+ tb = s->tb; -+ -+ l1 = gen_new_label(); -+ func(l1); -+ -+ gen_goto_tb(s, 0, next_pc); -+ -+ gen_set_label(l1); -+ gen_op_popw_T0(); -+ gen_op_jmp_T0(); -+ gen_eob(s); -+ -+ s->is_jmp = 3; -+} -+ -+/* TODO: do flags properly, using cc_table. */ -+/* (search for compute_all in i386 code) */ -+/* see also opc_read_flags[], opc_write_flags[] and opc_simpler[] */ -+ -+/* micro-ops that modify condition codes should end in _cc */ -+ -+/* convert one instruction. s->is_jmp is set if the translation must -+ be stopped. Return the next pc value */ -+static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) -+{ -+ int b, prefixes; -+ int rex_w, rex_r; -+ int m; -+ -+ s->pc = pc_start; -+ prefixes = 0; -+ s->override = -1; -+ rex_w = -1; -+ rex_r = 0; -+ -+ printf("PC = %04x: ", s->pc); -+// gen_op_dump_registers(s->pc); -+next_byte: -+ s->prefix = prefixes; -+ -+/* START */ -+ -+ if (prefixes & PREFIX_DD) -+ m = 1; -+ else if (prefixes & PREFIX_FD) -+ m = 2; -+ else -+ m = 0; -+ -+ /* unprefixed opcodes */ -+ -+ if ((prefixes & (PREFIX_CB | PREFIX_ED)) == 0) { -+ b = ldub_code(s->pc); -+ s->pc++; -+ -+ int x, y, z, p, q; -+ int n, d; -+ int r1, r2; -+ -+ x = (b >> 6) & 0x03; -+ y = (b >> 3) & 0x07; -+ z = b & 0x07; -+ p = y >> 1; -+ q = y & 0x01; -+ -+ switch (x) { -+ case 0: -+ switch (z) { -+ -+ case 0: -+ switch (y) { -+ case 0: -+ zprintf("nop\n"); -+ break; -+ case 1: -+ gen_op_ex_af_afx(); -+ zprintf("ex af,af'\n"); -+ break; -+ case 2: -+ n = ldsb_code(s->pc); -+ s->pc++; -+ gen_op_djnz(s->pc + n, s->pc); -+ gen_eob(s); -+ s->is_jmp = 3; -+ zprintf("djnz $%02x\n", n); -+ break; -+ case 3: -+ n = ldsb_code(s->pc); -+ s->pc++; -+ gen_jmp_im(s->pc + n); -+ gen_eob(s); -+ s->is_jmp = 3; -+ zprintf("jr $%02x\n", n); -+ break; -+ case 4: -+ case 5: -+ case 6: -+ case 7: -+ n = ldsb_code(s->pc); -+ s->pc++; -+ zprintf("jr %s,$%04x\n", cc[y-4], (s->pc + n) & 0xffff); -+ gen_jcc(s, y-4, s->pc + n, s->pc); -+ break; -+ } -+ break; -+ -+ case 1: -+ switch (q) { -+ case 0: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ gen_op_mov_T0_im(n); -+ r1 = regpairmap(regpair[p], m); -+ gen_op_movw_reg_T0[r1](); -+ zprintf("ld %s,$%04x\n", regpairnames[r1], n); -+ break; -+ case 1: -+ r1 = regpairmap(regpair[p], m); -+ r2 = regpairmap(OR2_HL, m); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_movw_T1_reg[r2](); -+ gen_op_addw_T0_T1_cc(); -+ gen_op_movw_reg_T0[r2](); -+ zprintf("add %s,%s\n", regpairnames[r2], regpairnames[r1]); -+ break; -+ } -+ break; -+ -+ case 2: -+ switch (q) { -+ case 0: -+ switch (p) { -+ case 0: -+ gen_op_movb_T0_reg[OR_A](); -+ gen_op_movw_A0_BC(); -+ gen_op_stb_T0_A0(); -+ zprintf("ld (bc),a\n"); -+ break; -+ case 1: -+ gen_op_movb_T0_reg[OR_A](); -+ gen_op_movw_A0_DE(); -+ gen_op_stb_T0_A0(); -+ zprintf("ld (de),a\n"); -+ break; -+ case 2: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ r1 = regpairmap(OR2_HL, m); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_mov_A0_im(n); -+ gen_op_stw_T0_A0(); -+ zprintf("ld ($%04x),%s\n", n, regpairnames[r1]); -+ break; -+ case 3: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ gen_op_movb_T0_reg[OR_A](); -+ gen_op_mov_A0_im(n); -+ gen_op_stb_T0_A0(); -+ zprintf("ld ($%04x),a\n", n); -+ break; -+ } -+ break; -+ case 1: -+ switch (p) { -+ case 0: -+ gen_op_movw_A0_BC(); -+ gen_op_ldb_T0_A0(); -+ gen_op_movb_reg_T0[OR_A](); -+ zprintf("ld a,(bc)\n"); -+ break; -+ case 1: -+ gen_op_movw_A0_DE(); -+ gen_op_ldb_T0_A0(); -+ gen_op_movb_reg_T0[OR_A](); -+ zprintf("ld a,(de)\n"); -+ break; -+ case 2: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ r1 = regpairmap(OR2_HL, m); -+ gen_op_mov_A0_im(n); -+ gen_op_ldw_T0_A0(); -+ gen_op_movw_reg_T0[r1](); -+ zprintf("ld %s,($%04x)\n", regpairnames[r1], n); -+ break; -+ case 3: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ gen_op_mov_A0_im(n); -+ gen_op_ldb_T0_A0(); -+ gen_op_movb_reg_T0[OR_A](); -+ zprintf("ld a,($%04x)\n", n); -+ break; -+ } -+ break; -+ } -+ break; -+ -+ case 3: -+ switch (q) { -+ case 0: -+ r1 = regpairmap(regpair[p], m); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_incw_T0(); -+ gen_op_movw_reg_T0[r1](); -+ zprintf("inc %s\n", regpairnames[r1]); -+ break; -+ case 1: -+ r1 = regpairmap(regpair[p], m); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_decw_T0(); -+ gen_op_movw_reg_T0[r1](); -+ zprintf("dec %s\n", regpairnames[r1]); -+ break; -+ } -+ break; -+ -+ case 4: -+ r1 = regmap(reg[y], m); -+ if (is_indexed(r1)) { -+ d = ldsb_code(s->pc); -+ s->pc++; -+ gen_op_movb_T0_idx[r1](d); -+ } else -+ gen_op_movb_T0_reg[r1](); -+ gen_op_incb_T0_cc(); -+ if (is_indexed(r1)) -+ gen_op_movb_idx_T0[r1](d); -+ else -+ gen_op_movb_reg_T0[r1](); -+ if (is_indexed(r1)) -+ zprintf("inc (%s%c$%02x)\n", idxnames[r1], shexb(d)); -+ else -+ zprintf("inc %s\n", regnames[r1]); -+ break; -+ -+ case 5: -+ r1 = regmap(reg[y], m); -+ if (is_indexed(r1)) { -+ d = ldsb_code(s->pc); -+ s->pc++; -+ gen_op_movb_T0_idx[r1](d); -+ } else -+ gen_op_movb_T0_reg[r1](); -+ gen_op_decb_T0_cc(); -+ if (is_indexed(r1)) -+ gen_op_movb_idx_T0[r1](d); -+ else -+ gen_op_movb_reg_T0[r1](); -+ if (is_indexed(r1)) -+ zprintf("dec (%s%c$%02x)\n", idxnames[r1], shexb(d)); -+ else -+ zprintf("dec %s\n", regnames[r1]); -+ break; -+ -+ case 6: -+ r1 = regmap(reg[y], m); -+ if (is_indexed(r1)) { -+ d = ldsb_code(s->pc); -+ s->pc++; -+ } -+ n = ldub_code(s->pc); -+ s->pc++; -+ gen_op_mov_T0_im(n); -+ if (is_indexed(r1)) -+ gen_op_movb_idx_T0[r1](d); -+ else -+ gen_op_movb_reg_T0[r1](); -+ if (is_indexed(r1)) -+ zprintf("ld (%s%c$%02x),$%02x\n", idxnames[r1], shexb(d), n); -+ else -+ zprintf("ld %s,$%02x\n", regnames[r1], n); -+ break; -+ -+ case 7: -+ switch (y) { -+ case 0: -+ gen_op_rlca_cc(); -+ zprintf("rlca\n"); -+ break; -+ case 1: -+ gen_op_rrca_cc(); -+ zprintf("rrca\n"); -+ break; -+ case 2: -+ gen_op_rla_cc(); -+ zprintf("rla\n"); -+ break; -+ case 3: -+ gen_op_rra_cc(); -+ zprintf("rra\n"); -+ break; -+ case 4: -+ gen_op_daa_cc(); -+ zprintf("daa\n"); -+ break; -+ case 5: -+ gen_op_cpl_cc(); -+ zprintf("cpl\n"); -+ break; -+ case 6: -+ gen_op_scf_cc(); -+ zprintf("scf\n"); -+ break; -+ case 7: -+ gen_op_ccf_cc(); -+ zprintf("ccf\n"); -+ break; -+ } -+ break; -+ } -+ break; -+ -+ case 1: -+ if (z == 6 && y == 6) { -+//FIXME -+// gen_op_halt(); -+// gen_eob(s); -+// s->is_jmp = 3; -+ zprintf("halt\n"); -+ } else { -+ if (z == 6) { -+ r1 = regmap(reg[z], m); -+ r2 = regmap(reg[y], 0); -+ } else if (y == 6) { -+ r1 = regmap(reg[z], 0); -+ r2 = regmap(reg[y], m); -+ } else { -+ r1 = regmap(reg[z], m); -+ r2 = regmap(reg[y], m); -+ } -+ if (is_indexed(r1) || is_indexed(r2)) { -+ d = ldsb_code(s->pc); -+ s->pc++; -+ } -+ if (is_indexed(r1)) -+ gen_op_movb_T0_idx[r1](d); -+ else -+ gen_op_movb_T0_reg[r1](); -+ if (is_indexed(r2)) -+ gen_op_movb_idx_T0[r2](d); -+ else -+ gen_op_movb_reg_T0[r2](); -+ if (is_indexed(r1)) -+ zprintf("ld %s,(%s%c$%02x)\n", regnames[r2], idxnames[r1], shexb(d)); -+ else if (is_indexed(r2)) -+ zprintf("ld (%s%c$%02x),%s\n", idxnames[r2], shexb(d), regnames[r1]); -+ else -+ zprintf("ld %s,%s\n", regnames[r2], regnames[r1]); -+ } -+ break; -+ -+ case 2: -+ r1 = regmap(reg[z], m); -+ if (is_indexed(r1)) { -+ d = ldsb_code(s->pc); -+ s->pc++; -+ gen_op_movb_T0_idx[r1](d); -+ } else -+ gen_op_movb_T0_reg[r1](); -+ gen_op_alu[y](); /* places output in A */ -+ if (is_indexed(r1)) -+ zprintf("%s(%s%c$%02x)\n", alu[y], idxnames[r1], shexb(d)); -+ else -+ zprintf("%s%s\n", alu[y], regnames[r1]); -+ break; -+ -+ case 3: -+ switch (z) { -+ case 0: -+ gen_retcc(s, y, s->pc); -+ zprintf("ret %s\n", cc[y]); -+ break; -+ -+ case 1: -+ switch (q) { -+ case 0: -+ r1 = regpairmap(regpair2[p], m); -+ gen_op_popw_T0(); -+ gen_op_movw_reg_T0[r1](); -+ zprintf("pop %s\n", regpairnames[r1]); -+ break; -+ case 1: -+ switch (p) { -+ case 0: -+ gen_op_popw_T0(); -+ gen_op_jmp_T0(); -+ zprintf("ret\n"); -+ gen_eob(s); -+ s->is_jmp = 3; -+// s->is_ei = 1; -+ break; -+ case 1: -+ gen_op_exx(); -+ zprintf("exx\n"); -+ break; -+ case 2: -+ r1 = regpairmap(OR2_HL, m); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_jmp_T0(); -+ zprintf("jp %s\n", regpairnames[r1]); -+ gen_eob(s); -+ s->is_jmp = 3; -+ break; -+ case 3: -+ r1 = regpairmap(OR2_HL, m); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_movw_reg_T0[OR2_SP](); -+ zprintf("ld sp,%s\n", regpairnames[r1]); -+ gen_op_dump_registers(s->pc); -+ break; -+ } -+ break; -+ } -+ break; -+ -+ case 2: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ gen_jcc(s, y, n, s->pc); -+ zprintf("jp %s,$%04x\n", cc[y], n); -+ break; -+ -+ case 3: -+ switch (y) { -+ case 0: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ gen_jmp_im(n); -+ zprintf("jp $%04x\n", n); -+ gen_eob(s); -+ s->is_jmp = 3; -+ break; -+ case 1: -+ zprintf("cb prefix\n"); -+ prefixes |= PREFIX_CB; -+ goto next_byte; -+ break; -+ case 2: -+ n = ldub_code(s->pc); -+ s->pc++; -+ gen_op_movb_T0_reg[OR_A](); -+ gen_op_out_T0_im(n); -+ zprintf("out ($%02x),a\n", n); -+ break; -+ case 3: -+ n = ldub_code(s->pc); -+ s->pc++; -+ gen_op_in_T0_im(n); -+ gen_op_movb_reg_T0[OR_A](); -+ zprintf("in a,($%02x)\n", n); -+ break; -+ case 4: -+ r1 = regpairmap(OR2_HL, m); -+ gen_op_popw_T1(); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_pushw_T0(); -+ gen_op_movw_reg_T1[r1](); -+ zprintf("ex (sp),%s\n", regpairnames[r1]); -+ break; -+ case 5: -+ gen_op_ex_de_hl(); -+ zprintf("ex de,hl\n"); -+ break; -+ case 6: -+ gen_op_di(); -+ zprintf("di\n"); -+ break; -+ case 7: -+ gen_op_ei(); -+// gen_op_dump_registers(s->pc); -+ zprintf("ei\n"); -+// gen_eob(s); -+// s->is_ei = 1; -+ break; -+ } -+ break; -+ -+ case 4: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ gen_callcc(s, y, n, s->pc); -+ zprintf("call %s,$%04x\n", cc[y], n); -+ break; -+ -+ case 5: -+ switch (q) { -+ case 0: -+ r1 = regpairmap(regpair2[p], m); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_pushw_T0(); -+ zprintf("push %s\n", regpairnames[r1]); -+ break; -+ case 1: -+ switch (p) { -+ case 0: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ gen_op_mov_T0_im(s->pc); -+ gen_op_pushw_T0(); -+ gen_jmp_im(n); -+ zprintf("call $%04x\n", n); -+ gen_eob(s); -+ s->is_jmp = 3; -+ break; -+ case 1: -+ zprintf("dd prefix\n"); -+ prefixes |= PREFIX_DD; -+ goto next_byte; -+ break; -+ case 2: -+ zprintf("ed prefix\n"); -+ prefixes |= PREFIX_ED; -+ goto next_byte; -+ break; -+ case 3: -+ zprintf("fd prefix\n"); -+ prefixes |= PREFIX_FD; -+ goto next_byte; -+ break; -+ } -+ break; -+ } -+ break; -+ -+ case 6: -+ n = ldub_code(s->pc); -+ s->pc++; -+ gen_op_mov_T0_im(n); -+ gen_op_alu[y](); /* places output in A */ -+ zprintf("%s$%02x\n", alu[y], n); -+ break; -+ -+ case 7: -+ gen_op_mov_T0_im(s->pc); -+ gen_op_pushw_T0(); -+ gen_jmp_im(y*8); -+ zprintf("rst $%02x\n", y*8); -+ gen_eob(s); -+ s->is_jmp = 3; -+ break; -+ } -+ break; -+ } -+ } else if (prefixes & PREFIX_CB) { -+ /* cb mode: */ -+ -+ int x, y, z, p, q; -+ int d; -+ int r1, r2; -+ -+ if (m) { -+ d = ldsb_code(s->pc); -+ s->pc++; -+ } -+ -+ b = ldub_code(s->pc); -+ s->pc++; -+ -+ x = (b >> 6) & 0x03; -+ y = (b >> 3) & 0x07; -+ z = b & 0x07; -+ p = y >> 1; -+ q = y & 0x01; -+ -+ if (m) { -+ r1 = regmap(OR_HLmem, m); -+ gen_op_movb_T0_idx[r1](d); -+ if (z != 6) -+ r2 = regmap(reg[z], 0); -+ } else { -+ r1 = regmap(reg[z], m); -+ gen_op_movb_T0_reg[r1](); -+ } -+ -+ switch (x) { -+ case 0: -+ gen_op_rot_T0[y](); -+ if (m) { -+ gen_op_movb_idx_T0[r1](d); -+ if (z != 6) -+ gen_op_movb_reg_T0[r2](); -+ } else { -+ gen_op_movb_reg_T0[r1](); -+ } -+ zprintf("%s %s\n", rot[y], regnames[r1]); -+ break; -+ case 1: -+ gen_op_bit_T0(1 << y); -+ zprintf("bit %i,%s\n", y, regnames[r1]); -+ break; -+ case 2: -+ gen_op_res_T0(~(1 << y)); -+ if (m) { -+ gen_op_movb_idx_T0[r1](d); -+ if (z != 6) -+ gen_op_movb_reg_T0[r2](); -+ } else { -+ gen_op_movb_reg_T0[r1](); -+ } -+ zprintf("res %i,%s\n", y, regnames[r1]); -+ break; -+ case 3: -+ gen_op_set_T0(1 << y); -+ if (m) { -+ gen_op_movb_idx_T0[r1](d); -+ if (z != 6) -+ gen_op_movb_reg_T0[r2](); -+ } else { -+ gen_op_movb_reg_T0[r1](); -+ } -+ zprintf("set %i,%s\n", y, regnames[r1]); -+ break; -+ } -+ -+ } else if (prefixes & PREFIX_ED) { -+ /* ed mode: */ -+ -+ b = ldub_code(s->pc); -+ s->pc++; -+ -+ int x, y, z, p, q; -+ int n; -+ int r1, r2; -+ -+ x = (b >> 6) & 0x03; -+ y = (b >> 3) & 0x07; -+ z = b & 0x07; -+ p = y >> 1; -+ q = y & 0x01; -+ -+ switch (x) { -+ case 0: -+ case 3: -+ zprintf("nop\n"); -+ break; -+ -+ case 1: -+ switch (z) { -+ case 0: -+ gen_op_in_T0_bc_cc(); -+ if (y != 6) { -+ r1 = regmap(reg[y], m); -+ gen_op_movb_reg_T0[r1](); -+ zprintf("in %s,(c)\n", regnames[r1]); -+ } else { -+ zprintf("in (c)\n"); -+ } -+ break; -+ case 1: -+ if (y != 6) { -+ r1 = regmap(reg[y], m); -+ gen_op_movb_T0_reg[r1](); -+ zprintf("out (c),%s\n", regnames[r1]); -+ } else { -+ gen_op_mov_T0_im(0); -+ zprintf("out (c),0\n"); -+ } -+ gen_op_out_T0_bc(); -+ break; -+ case 2: -+ r1 = regpairmap(OR2_HL, m); -+ r2 = regpairmap(regpair[p], m); -+ gen_op_movw_T0_reg[r1](); -+ gen_op_movw_T1_reg[r2](); -+ if (q == 0) { -+ zprintf("sbc %s,%s\n", regpairnames[r1], regpairnames[r2]); -+ gen_op_sbcw_T0_T1_cc(); -+ } else { -+ zprintf("adc %s,%s\n", regpairnames[r1], regpairnames[r2]); -+ gen_op_adcw_T0_T1_cc(); -+ } -+ gen_op_movw_reg_T0[r1](); -+ break; -+ case 3: -+ n = lduw_code(s->pc); -+ s->pc += 2; -+ r1 = regpairmap(regpair[p], m); -+ if (q == 0) { -+ gen_op_movw_T0_reg[r1](); -+ gen_op_mov_A0_im(n); -+ gen_op_stw_T0_A0(); -+ zprintf("ld ($%02x),%s\n", n, regpairnames[r1]); -+ } else { -+ gen_op_mov_A0_im(n); -+ gen_op_ldw_T0_A0(); -+ gen_op_movw_reg_T0[r1](); -+ zprintf("ld %s,($%02x)\n", regpairnames[r1], n); -+ } -+ break; -+ case 4: -+ zprintf("neg\n"); -+ gen_op_neg_cc(); -+ break; -+ case 5: -+ /* FIXME */ -+ gen_op_popw_T0(); -+ gen_op_jmp_T0(); -+ gen_op_ri(); -+ if (q == 0) { -+ zprintf("retn\n"); -+ } else { -+ zprintf("reti\n"); -+ } -+ gen_eob(s); -+ s->is_jmp = 3; -+// s->is_ei = 1; -+ break; -+ case 6: -+ gen_op_imode(imode[y]); -+ zprintf("im im[%i]\n", imode[y]); -+// gen_eob(s); -+// s->is_ei = 1; -+ break; -+ case 7: -+ switch (y) { -+ case 0: -+ gen_op_ld_I_A(); -+ zprintf("ld i,a\n"); -+ break; -+ case 1: -+ gen_op_ld_R_A(); -+ zprintf("ld r,a\n"); -+ break; -+ case 2: -+ gen_op_ld_A_I(); -+ zprintf("ld a,i\n"); -+ break; -+ case 3: -+ gen_op_ld_A_R(); -+ zprintf("ld a,r\n"); -+ break; -+ case 4: -+ gen_op_movb_T0_reg[OR_HLmem](); -+ gen_op_rrd_cc(); -+ gen_op_movb_reg_T0[OR_HLmem](); -+ zprintf("rrd\n"); -+ break; -+ case 5: -+ gen_op_movb_T0_reg[OR_HLmem](); -+ gen_op_rld_cc(); -+ gen_op_movb_reg_T0[OR_HLmem](); -+ zprintf("rld\n"); -+ break; -+ case 6: -+ case 7: -+ zprintf("nop2\n"); -+ /* nop */ -+ break; -+ } -+ break; -+ } -+ break; -+ -+ case 2: -+ /* FIXME */ -+ if (y >= 4) { -+ switch (z) { -+ case 0: /* ldi/ldd/ldir/lddr */ -+ gen_op_movw_A0_HL(); -+ gen_op_ldb_T0_A0(); -+ gen_op_movw_A0_DE(); -+ gen_op_stb_T0_A0(); -+ -+ if (!(y & 1)) -+ gen_op_bli_ld_inc_cc(); -+ else -+ gen_op_bli_ld_dec_cc(); -+ if ((y & 2)) { -+ gen_op_bli_ld_rep(s->pc); -+ gen_eob(s); -+ s->is_jmp = 3; -+ } -+ break; -+ -+ case 1: /* cpi/cpd/cpir/cpdr */ -+ gen_op_movw_A0_HL(); -+ gen_op_ldb_T0_A0(); -+ gen_op_bli_cp_cc(); -+ -+ if (!(y & 1)) -+ gen_op_bli_cp_inc_cc(); -+ else -+ gen_op_bli_cp_dec_cc(); -+ if ((y & 2)) { -+ gen_op_bli_cp_rep(s->pc); -+ gen_eob(s); -+ s->is_jmp = 3; -+ } -+ break; -+ -+ case 2: /* ini/ind/inir/indr */ -+ gen_op_in_T0_bc_cc(); -+ gen_op_movw_A0_HL(); -+ gen_op_stb_T0_A0(); -+ if (!(y & 1)) -+ gen_op_bli_io_inc(); -+ else -+ gen_op_bli_io_dec(); -+ if ((y & 2)) { -+ gen_op_bli_io_rep(s->pc); -+ gen_eob(s); -+ s->is_jmp = 3; -+ } -+ break; -+ -+ case 3: /* outi/outd/otir/otdr */ -+ gen_op_movw_A0_HL(); -+ gen_op_ldb_T0_A0(); -+ gen_op_out_T0_bc(); -+ if (!(y & 1)) -+ gen_op_bli_io_inc(); -+ else -+ gen_op_bli_io_dec(); -+ if ((y & 2)) { -+ gen_op_bli_io_rep(s->pc); -+ gen_eob(s); -+ s->is_jmp = 3; -+ } -+ break; -+ } -+ -+ zprintf("%s\n", bli[y-4][z]); -+ break; -+ } -+ } -+ } -+ -+ prefixes = 0; -+ -+ /* now check op code */ -+// switch (b) { -+// default: -+// goto illegal_op; -+// } -+ /* lock generation */ -+ return s->pc; -+ illegal_op: -+ /* XXX: ensure that no lock was generated */ -+ gen_exception(s, EXCP06_ILLOP, pc_start - s->cs_base); -+ return s->pc; -+} -+ -+#define CC_SZHPNC (CC_S | CC_Z | CC_H | CC_P | CC_N | CC_C) -+#define CC_SZHPN (CC_S | CC_Z | CC_H | CC_P | CC_N) -+ -+static uint8_t opc_read_flags[NB_OPS] = { -+ [INDEX_op_jp_nz] = CC_SZHPNC, -+ [INDEX_op_jp_z] = CC_SZHPNC, -+ [INDEX_op_jp_nc] = CC_SZHPNC, -+ [INDEX_op_jp_c] = CC_SZHPNC, -+ [INDEX_op_jp_po] = CC_SZHPNC, -+ [INDEX_op_jp_pe] = CC_SZHPNC, -+ [INDEX_op_jp_p] = CC_SZHPNC, -+ [INDEX_op_jp_m] = CC_SZHPNC, -+//... -+}; -+ -+static uint8_t opc_write_flags[NB_OPS] = { -+ [INDEX_op_add_cc] = CC_SZHPNC, -+ [INDEX_op_adc_cc] = CC_SZHPNC, -+ [INDEX_op_sub_cc] = CC_SZHPNC, -+ [INDEX_op_sbc_cc] = CC_SZHPNC, -+ [INDEX_op_and_cc] = CC_SZHPNC, -+ [INDEX_op_xor_cc] = CC_SZHPNC, -+ [INDEX_op_or_cc] = CC_SZHPNC, -+ [INDEX_op_cp_cc] = CC_SZHPNC, -+//... -+}; -+ -+static uint16_t opc_simpler[NB_OPS] = { -+#if 0 -+ [INDEX_op_add_cc] = INDEX_op_add, -+ [INDEX_op_adc_cc] = INDEX_op_adc, -+ [INDEX_op_sub_cc] = INDEX_op_sub, -+ [INDEX_op_sbc_cc] = INDEX_op_sbc, -+ [INDEX_op_and_cc] = INDEX_op_and, -+ [INDEX_op_xor_cc] = INDEX_op_xor, -+ [INDEX_op_or_cc] = INDEX_op_or, -+ [INDEX_op_cp_cc] = INDEX_op_cp, -+//... -+#endif -+}; -+ -+void optimize_flags_init(void) -+{ -+ int i; -+ /* put default values in arrays */ -+ for(i = 0; i < NB_OPS; i++) { -+ if (opc_simpler[i] == 0) -+ opc_simpler[i] = i; -+ } -+} -+ -+/* CPU flags computation optimization: we move backward thru the -+ generated code to see which flags are needed. The operation is -+ modified if suitable */ -+static void optimize_flags(uint16_t *opc_buf, int opc_buf_len) -+{ -+} -+ -+/* generate intermediate code in gen_opc_buf and gen_opparam_buf for -+ basic block 'tb'. If search_pc is TRUE, also generate PC -+ information for each intermediate instruction. */ -+static inline int gen_intermediate_code_internal(CPUState *env, -+ TranslationBlock *tb, -+ int search_pc) -+{ -+ DisasContext dc1, *dc = &dc1; -+ target_ulong pc_ptr; -+ uint16_t *gen_opc_end; -+ int flags, j, lj, cflags; -+ target_ulong pc_start; -+ target_ulong cs_base; -+ -+ /* generate intermediate code */ -+ pc_start = tb->pc; -+ cs_base = tb->cs_base; -+ flags = tb->flags; -+ cflags = tb->cflags; -+ -+ dc->singlestep_enabled = env->singlestep_enabled; -+ dc->cc_op = CC_OP_DYNAMIC; -+ dc->cs_base = cs_base; -+ dc->tb = tb; -+ dc->flags = flags; -+ dc->jmp_opt = !(env->singlestep_enabled || -+ (flags & HF_INHIBIT_IRQ_MASK) -+#ifndef CONFIG_SOFTMMU -+ || (flags & HF_SOFTMMU_MASK) -+#endif -+ ); -+ -+ gen_opc_ptr = gen_opc_buf; -+ gen_opc_end = gen_opc_buf + OPC_MAX_SIZE; -+ gen_opparam_ptr = gen_opparam_buf; -+ nb_gen_labels = 0; -+ -+ dc->is_jmp = DISAS_NEXT; -+ pc_ptr = pc_start; -+ lj = -1; -+ -+ for(;;) { -+ if (env->nb_breakpoints > 0) { -+ for(j = 0; j < env->nb_breakpoints; j++) { -+ if (env->breakpoints[j] == pc_ptr) { -+ gen_debug(dc, pc_ptr - dc->cs_base); -+ break; -+ } -+ } -+ } -+ if (search_pc) { -+ j = gen_opc_ptr - gen_opc_buf; -+ if (lj < j) { -+ lj++; -+ while (lj < j) -+ gen_opc_instr_start[lj++] = 0; -+ } -+ gen_opc_pc[lj] = pc_ptr; -+// gen_opc_cc_op[lj] = dc->cc_op; -+ gen_opc_instr_start[lj] = 1; -+ } -+ pc_ptr = disas_insn(dc, pc_ptr); -+ /* stop translation if indicated */ -+ if (dc->is_jmp) -+ break; -+ /* if single step mode, we generate only one instruction and -+ generate an exception */ -+ /* if irq were inhibited with HF_INHIBIT_IRQ_MASK, we clear -+ the flag and abort the translation to give the irqs a -+ change to be happen */ -+ if (dc->singlestep_enabled || -+ (flags & HF_INHIBIT_IRQ_MASK) || -+ (cflags & CF_SINGLE_INSN)) { -+ gen_jmp_im(pc_ptr - dc->cs_base); -+ gen_eob(dc); -+ break; -+ } -+ /* if too long translation, stop generation too */ -+ if (gen_opc_ptr >= gen_opc_end || -+ (pc_ptr - pc_start) >= (TARGET_PAGE_SIZE - 32)) { -+ gen_jmp_im(pc_ptr - dc->cs_base); -+ gen_eob(dc); -+ break; -+ } -+ } -+ *gen_opc_ptr = INDEX_op_end; -+ /* we don't forget to fill the last values */ -+ if (search_pc) { -+ j = gen_opc_ptr - gen_opc_buf; -+ lj++; -+ while (lj <= j) -+ gen_opc_instr_start[lj++] = 0; -+ } -+ -+#ifdef DEBUG_DISAS -+ if (loglevel & CPU_LOG_TB_CPU) { -+ cpu_dump_state(env, logfile, fprintf, 0); -+ } -+ if (loglevel & CPU_LOG_TB_IN_ASM) { -+ int disas_flags; -+ fprintf(logfile, "----------------\n"); -+ fprintf(logfile, "IN: %s\n", lookup_symbol(pc_start)); -+ target_disas(logfile, pc_start, pc_ptr - pc_start, disas_flags); -+ fprintf(logfile, "\n"); -+ if (loglevel & CPU_LOG_TB_OP) { -+ fprintf(logfile, "OP:\n"); -+ dump_ops(gen_opc_buf, gen_opparam_buf); -+ fprintf(logfile, "\n"); -+ } -+ } -+#endif -+ -+ /* optimize flag computations */ -+ optimize_flags(gen_opc_buf, gen_opc_ptr - gen_opc_buf); -+ -+#ifdef DEBUG_DISAS -+ if (loglevel & CPU_LOG_TB_OP_OPT) { -+ fprintf(logfile, "AFTER FLAGS OPT:\n"); -+ dump_ops(gen_opc_buf, gen_opparam_buf); -+ fprintf(logfile, "\n"); -+ } -+#endif -+ if (!search_pc) -+ tb->size = pc_ptr - pc_start; -+ return 0; -+} -+ -+int gen_intermediate_code(CPUState *env, TranslationBlock *tb) -+{ -+ return gen_intermediate_code_internal(env, tb, 0); -+} -+ -+int gen_intermediate_code_pc(CPUState *env, TranslationBlock *tb) -+{ -+ return gen_intermediate_code_internal(env, tb, 1); -+} -+ ---- qemu-0.9.1/vl.c -+++ qemu-0.9.1/vl.c -@@ -6750,6 +6750,19 @@ - return 0; - } - -+#elif defined(TARGET_Z80) -+ -+void cpu_save(QEMUFile *f, void *opaque) -+{ -+// CPUState *env = opaque; -+} -+ -+int cpu_load(QEMUFile *f, void *opaque, int version_id) -+{ -+// CPUState *env = opaque; -+ return 0; -+} -+ - #else - - //#warning No CPU save/restore functions -@@ -7924,6 +7937,8 @@ - qemu_register_machine(&dummy_m68k_machine); - #elif defined(TARGET_CRIS) - qemu_register_machine(&bareetraxfs_machine); -+#elif defined(TARGET_Z80) -+ qemu_register_machine(&z80pc_machine); - #else - #error unsupported CPU - #endif ---- qemu-0.9.1/z80-dis.c -+++ qemu-0.9.1/z80-dis.c -@@ -0,0 +1,621 @@ -+/* Print Z80 and R800 instructions -+ Copyright 2005 Free Software Foundation, Inc. -+ Contributed by Arnold Metselaar -+ -+ Taken from GDB -+ -+ This file is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#include "dis-asm.h" -+#include -+ -+struct buffer -+{ -+ bfd_vma base; -+ int n_fetch; -+ int n_used; -+ signed char data[4]; -+} ; -+ -+typedef int (*func)(struct buffer *, disassemble_info *, char *); -+ -+struct tab_elt -+{ -+ unsigned char val; -+ unsigned char mask; -+ func fp; -+ char * text; -+} ; -+ -+#define TXTSIZ 24 -+/* Names of 16-bit registers. */ -+static char * rr_str[] = { "bc", "de", "hl", "sp" }; -+/* Names of 8-bit registers. */ -+static char * r_str[] = { "b", "c", "d", "e", "h", "l", "(hl)", "a" }; -+/* Texts for condition codes. */ -+static char * cc_str[] = { "nz", "z", "nc", "c", "po", "pe", "p", "m" }; -+/* Instruction names for 8-bit arithmetic, operand "a" is often implicit */ -+static char * arit_str[] = -+{ -+ "add a,", "adc a,", "sub ", "sbc a,", "and ", "xor ", "or ", "cp " -+} ; -+ -+static int -+fetch_data (struct buffer *buf, disassemble_info * info, int n) -+{ -+ int r; -+ -+ if (buf->n_fetch + n > 4) -+ abort (); -+ -+ r = info->read_memory_func (buf->base + buf->n_fetch, -+ (unsigned char*) buf->data + buf->n_fetch, -+ n, info); -+ if (r == 0) -+ buf->n_fetch += n; -+ return !r; -+} -+ -+static int -+prt (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ info->fprintf_func (info->stream, "%s", txt); -+ buf->n_used = buf->n_fetch; -+ return 1; -+} -+ -+static int -+prt_e (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char e; -+ int target_addr; -+ -+ if (fetch_data (buf, info, 1)) -+ { -+ e = buf->data[1]; -+ target_addr = (buf->base + 2 + e) & 0xffff; -+ buf->n_used = buf->n_fetch; -+ info->fprintf_func (info->stream, "%s0x%04x", txt, target_addr); -+ } -+ else -+ buf->n_used = -1; -+ -+ return buf->n_used; -+} -+ -+static int -+jr_cc (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ -+ snprintf (mytxt, TXTSIZ, txt, cc_str[(buf->data[0] >> 3) & 3]); -+ return prt_e (buf, info, mytxt); -+} -+ -+static int -+prt_nn (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ int nn; -+ unsigned char *p; -+ -+ p = (unsigned char*) buf->data + buf->n_fetch; -+ if (fetch_data (buf, info, 2)) -+ { -+ nn = p[0] + (p[1] << 8); -+ info->fprintf_func (info->stream, txt, nn); -+ buf->n_used = buf->n_fetch; -+ } -+ else -+ buf->n_used = -1; -+ return buf->n_used; -+} -+ -+static int -+prt_rr_nn (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ -+ snprintf (mytxt, TXTSIZ, txt, rr_str[(buf->data[0] >> 4) & 3]); -+ return prt_nn (buf, info, mytxt); -+} -+ -+static int -+prt_rr (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ info->fprintf_func (info->stream, "%s%s", txt, -+ rr_str[(buf->data[buf->n_fetch - 1] >> 4) & 3]); -+ buf->n_used = buf->n_fetch; -+ return buf->n_used; -+} -+ -+static int -+prt_n (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ int n; -+ unsigned char *p; -+ -+ p = (unsigned char*) buf->data + buf->n_fetch; -+ -+ if (fetch_data (buf, info, 1)) -+ { -+ n = p[0]; -+ info->fprintf_func (info->stream, txt, n); -+ buf->n_used = buf->n_fetch; -+ } -+ else -+ buf->n_used = -1; -+ -+ return buf->n_used; -+} -+ -+static int -+ld_r_n (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ -+ snprintf (mytxt, TXTSIZ, txt, r_str[(buf->data[0] >> 3) & 7]); -+ return prt_n (buf, info, mytxt); -+} -+ -+static int -+prt_r (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ info->fprintf_func (info->stream, txt, -+ r_str[(buf->data[buf->n_fetch - 1] >> 3) & 7]); -+ buf->n_used = buf->n_fetch; -+ return buf->n_used; -+} -+ -+static int -+ld_r_r (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ info->fprintf_func (info->stream, txt, -+ r_str[(buf->data[buf->n_fetch - 1] >> 3) & 7], -+ r_str[buf->data[buf->n_fetch - 1] & 7]); -+ buf->n_used = buf->n_fetch; -+ return buf->n_used; -+} -+ -+static int -+arit_r (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ info->fprintf_func (info->stream, txt, -+ arit_str[(buf->data[buf->n_fetch - 1] >> 3) & 7], -+ r_str[buf->data[buf->n_fetch - 1] & 7]); -+ buf->n_used = buf->n_fetch; -+ return buf->n_used; -+} -+ -+static int -+prt_cc (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ info->fprintf_func (info->stream, "%s%s", txt, -+ cc_str[(buf->data[0] >> 3) & 7]); -+ buf->n_used = buf->n_fetch; -+ return buf->n_used; -+} -+ -+static int -+pop_rr (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ static char *rr_stack[] = { "bc","de","hl","af"}; -+ -+ info->fprintf_func (info->stream, "%s %s", txt, -+ rr_stack[(buf->data[0] >> 4) & 3]); -+ buf->n_used = buf->n_fetch; -+ return buf->n_used; -+} -+ -+ -+static int -+jp_cc_nn (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ -+ snprintf (mytxt,TXTSIZ, -+ "%s%s,0x%%04x", txt, cc_str[(buf->data[0] >> 3) & 7]); -+ return prt_nn (buf, info, mytxt); -+} -+ -+static int -+arit_n (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ -+ snprintf (mytxt,TXTSIZ, txt, arit_str[(buf->data[0] >> 3) & 7]); -+ return prt_n (buf, info, mytxt); -+} -+ -+static int -+rst (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ info->fprintf_func (info->stream, txt, buf->data[0] & 0x38); -+ buf->n_used = buf->n_fetch; -+ return buf->n_used; -+} -+ -+ -+static int -+cis (struct buffer *buf, disassemble_info * info, char *txt ATTRIBUTE_UNUSED) -+{ -+ static char * opar[] = { "ld", "cp", "in", "out" }; -+ char * op; -+ char c; -+ -+ c = buf->data[1]; -+ op = ((0x13 & c) == 0x13) ? "ot" : (opar[c & 3]); -+ info->fprintf_func (info->stream, -+ "%s%c%s", op, -+ (c & 0x08) ? 'd' : 'i', -+ (c & 0x10) ? "r" : ""); -+ buf->n_used = 2; -+ return buf->n_used; -+} -+ -+static int -+dump (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ int i; -+ -+ info->fprintf_func (info->stream, "defb "); -+ for (i = 0; txt[i]; ++i) -+ info->fprintf_func (info->stream, i ? ", 0x%02x" : "0x%02x", -+ (unsigned char) buf->data[i]); -+ buf->n_used = i; -+ return buf->n_used; -+} -+ -+/* Table to disassemble machine codes with prefix 0xED. */ -+struct tab_elt opc_ed[] = -+{ -+ { 0x70, 0xFF, prt, "in f,(c)" }, -+ { 0x70, 0xFF, dump, "xx" }, -+ { 0x40, 0xC7, prt_r, "in %s,(c)" }, -+ { 0x71, 0xFF, prt, "out (c),0" }, -+ { 0x70, 0xFF, dump, "xx" }, -+ { 0x41, 0xC7, prt_r, "out (c),%s" }, -+ { 0x42, 0xCF, prt_rr, "sbc hl," }, -+ { 0x43, 0xCF, prt_rr_nn, "ld (0x%%04x),%s" }, -+ { 0x44, 0xFF, prt, "neg" }, -+ { 0x45, 0xFF, prt, "retn" }, -+ { 0x46, 0xFF, prt, "im 0" }, -+ { 0x47, 0xFF, prt, "ld i,a" }, -+ { 0x4A, 0xCF, prt_rr, "adc hl," }, -+ { 0x4B, 0xCF, prt_rr_nn, "ld %s,(0x%%04x)" }, -+ { 0x4D, 0xFF, prt, "reti" }, -+ { 0x56, 0xFF, prt, "im 1" }, -+ { 0x57, 0xFF, prt, "ld a,i" }, -+ { 0x5E, 0xFF, prt, "im 2" }, -+ { 0x67, 0xFF, prt, "rrd" }, -+ { 0x6F, 0xFF, prt, "rld" }, -+ { 0xA0, 0xE4, cis, "" }, -+ { 0xC3, 0xFF, prt, "muluw hl,bc" }, -+ { 0xC5, 0xE7, prt_r, "mulub a,%s" }, -+ { 0xF3, 0xFF, prt, "muluw hl,sp" }, -+ { 0x00, 0x00, dump, "xx" } -+}; -+ -+static int -+pref_ed (struct buffer * buf, disassemble_info * info, -+ char* txt ATTRIBUTE_UNUSED) -+{ -+ struct tab_elt *p; -+ -+ if (fetch_data(buf, info, 1)) -+ { -+ for (p = opc_ed; p->val != (buf->data[1] & p->mask); ++p) -+ ; -+ p->fp (buf, info, p->text); -+ } -+ else -+ buf->n_used = -1; -+ -+ return buf->n_used; -+} -+ -+/* Instruction names for the instructions addressing single bits. */ -+static char *cb1_str[] = { "", "bit", "res", "set"}; -+/* Instruction names for shifts and rotates. */ -+static char *cb2_str[] = -+{ -+ "rlc", "rrc", "rl", "rr", "sla", "sra", "sli", "srl" -+}; -+ -+static int -+pref_cb (struct buffer * buf, disassemble_info * info, -+ char* txt ATTRIBUTE_UNUSED) -+{ -+ if (fetch_data (buf, info, 1)) -+ { -+ buf->n_used = 2; -+ if ((buf->data[1] & 0xc0) == 0) -+ info->fprintf_func (info->stream, "%s %s", -+ cb2_str[(buf->data[1] >> 3) & 7], -+ r_str[buf->data[1] & 7]); -+ else -+ info->fprintf_func (info->stream, "%s %d,%s", -+ cb1_str[(buf->data[1] >> 6) & 3], -+ (buf->data[1] >> 3) & 7, -+ r_str[buf->data[1] & 7]); -+ } -+ else -+ buf->n_used = -1; -+ -+ return buf->n_used; -+} -+ -+static int -+addvv (struct buffer * buf, disassemble_info * info, char* txt) -+{ -+ info->fprintf_func (info->stream, "add %s,%s", txt, txt); -+ -+ return buf->n_used = buf->n_fetch; -+} -+ -+static int -+ld_v_v (struct buffer * buf, disassemble_info * info, char* txt) -+{ -+ char mytxt[TXTSIZ]; -+ -+ snprintf (mytxt, TXTSIZ, "ld %s%%s,%s%%s", txt, txt); -+ return ld_r_r (buf, info, mytxt); -+} -+ -+static int -+prt_d (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ int d; -+ signed char *p; -+ -+ p = buf->data + buf->n_fetch; -+ -+ if (fetch_data (buf, info, 1)) -+ { -+ d = p[0]; -+ info->fprintf_func (info->stream, txt, d); -+ buf->n_used = buf->n_fetch; -+ } -+ else -+ buf->n_used = -1; -+ -+ return buf->n_used; -+} -+ -+static int -+prt_d_n (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ int d; -+ signed char *p; -+ -+ p = buf->data + buf->n_fetch; -+ -+ if (fetch_data (buf, info, 1)) -+ { -+ d = p[0]; -+ snprintf (mytxt, TXTSIZ, txt, d); -+ return prt_n (buf, info, mytxt); -+ } -+ else -+ buf->n_used = -1; -+ -+ return buf->n_used; -+} -+ -+static int -+arit_d (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ signed char c; -+ -+ c = buf->data[buf->n_fetch - 1]; -+ snprintf (mytxt, TXTSIZ, txt, arit_str[(c >> 3) & 7]); -+ return prt_d (buf, info, mytxt); -+} -+ -+static int -+ld_r_d (struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ signed char c; -+ -+ c = buf->data[buf->n_fetch - 1]; -+ snprintf (mytxt, TXTSIZ, txt, r_str[(c >> 3) & 7]); -+ return prt_d (buf, info, mytxt); -+} -+ -+static int -+ld_d_r(struct buffer *buf, disassemble_info * info, char *txt) -+{ -+ char mytxt[TXTSIZ]; -+ signed char c; -+ -+ c = buf->data[buf->n_fetch - 1]; -+ snprintf (mytxt, TXTSIZ, txt, r_str[c & 7]); -+ return prt_d (buf, info, mytxt); -+} -+ -+static int -+pref_xd_cb (struct buffer * buf, disassemble_info * info, char* txt) -+{ -+ if (fetch_data (buf, info, 2)) -+ { -+ int d; -+ char arg[TXTSIZ]; -+ signed char *p; -+ -+ buf->n_used = 4; -+ p = buf->data; -+ d = p[2]; -+ -+ if (((p[3] & 0xC0) == 0x40) || ((p[3] & 7) == 0x06)) -+ snprintf (arg, TXTSIZ, "(%s%+d)", txt, d); -+ else -+ snprintf (arg, TXTSIZ, "(%s%+d),%s", txt, d, r_str[p[3] & 7]); -+ -+ if ((p[3] & 0xc0) == 0) -+ info->fprintf_func (info->stream, "%s %s", -+ cb2_str[(buf->data[3] >> 3) & 7], -+ arg); -+ else -+ info->fprintf_func (info->stream, "%s %d,%s", -+ cb1_str[(buf->data[3] >> 6) & 3], -+ (buf->data[3] >> 3) & 7, -+ arg); -+ } -+ else -+ buf->n_used = -1; -+ -+ return buf->n_used; -+} -+ -+/* Table to disassemble machine codes with prefix 0xDD or 0xFD. */ -+static struct tab_elt opc_ind[] = -+{ -+ { 0x24, 0xF7, prt_r, "inc %s%%s" }, -+ { 0x25, 0xF7, prt_r, "dec %s%%s" }, -+ { 0x26, 0xF7, ld_r_n, "ld %s%%s,0x%%%%02x" }, -+ { 0x21, 0xFF, prt_nn, "ld %s,0x%%04x" }, -+ { 0x22, 0xFF, prt_nn, "ld (0x%%04x),%s" }, -+ { 0x2A, 0xFF, prt_nn, "ld %s,(0x%%04x)" }, -+ { 0x23, 0xFF, prt, "inc %s" }, -+ { 0x2B, 0xFF, prt, "dec %s" }, -+ { 0x29, 0xFF, addvv, "%s" }, -+ { 0x09, 0xCF, prt_rr, "add %s," }, -+ { 0x34, 0xFF, prt_d, "inc (%s%%+d)" }, -+ { 0x35, 0xFF, prt_d, "dec (%s%%+d)" }, -+ { 0x36, 0xFF, prt_d_n, "ld (%s%%+d),0x%%%%02x" }, -+ -+ { 0x76, 0xFF, dump, "h" }, -+ { 0x46, 0xC7, ld_r_d, "ld %%s,(%s%%%%+d)" }, -+ { 0x70, 0xF8, ld_d_r, "ld (%s%%%%+d),%%s" }, -+ { 0x64, 0xF6, ld_v_v, "%s" }, -+ { 0x60, 0xF0, ld_r_r, "ld %s%%s,%%s" }, -+ { 0x44, 0xC6, ld_r_r, "ld %%s,%s%%s" }, -+ -+ { 0x86, 0xC7, arit_d, "%%s(%s%%%%+d)" }, -+ { 0x84, 0xC6, arit_r, "%%s%s%%s" }, -+ -+ { 0xE1, 0xFF, prt, "pop %s" }, -+ { 0xE5, 0xFF, prt, "push %s" }, -+ { 0xCB, 0xFF, pref_xd_cb, "%s" }, -+ { 0xE3, 0xFF, prt, "ex (sp),%s" }, -+ { 0xE9, 0xFF, prt, "jp (%s)" }, -+ { 0xF9, 0xFF, prt, "ld sp,%s" }, -+ { 0x00, 0x00, dump, "?" }, -+} ; -+ -+static int -+pref_ind (struct buffer * buf, disassemble_info * info, char* txt) -+{ -+ if (fetch_data (buf, info, 1)) -+ { -+ char mytxt[TXTSIZ]; -+ struct tab_elt *p; -+ -+ for (p = opc_ind; p->val != (buf->data[1] & p->mask); ++p) -+ ; -+ snprintf (mytxt, TXTSIZ, p->text, txt); -+ p->fp (buf, info, mytxt); -+ } -+ else -+ buf->n_used = -1; -+ -+ return buf->n_used; -+} -+ -+/* Table to disassemble machine codes without prefix. */ -+static struct tab_elt opc_main[] = -+{ -+ { 0x00, 0xFF, prt, "nop" }, -+ { 0x01, 0xCF, prt_rr_nn, "ld %s,0x%%04x" }, -+ { 0x02, 0xFF, prt, "ld (bc),a" }, -+ { 0x03, 0xCF, prt_rr, "inc " }, -+ { 0x04, 0xC7, prt_r, "inc %s" }, -+ { 0x05, 0xC7, prt_r, "dec %s" }, -+ { 0x06, 0xC7, ld_r_n, "ld %s,0x%%02x" }, -+ { 0x07, 0xFF, prt, "rlca" }, -+ { 0x08, 0xFF, prt, "ex af,af'" }, -+ { 0x09, 0xCF, prt_rr, "add hl," }, -+ { 0x0A, 0xFF, prt, "ld a,(bc)" }, -+ { 0x0B, 0xCF, prt_rr, "dec " }, -+ { 0x0F, 0xFF, prt, "rrca" }, -+ { 0x10, 0xFF, prt_e, "djnz " }, -+ { 0x12, 0xFF, prt, "ld (de),a" }, -+ { 0x17, 0xFF, prt, "rla" }, -+ { 0x18, 0xFF, prt_e, "jr "}, -+ { 0x1A, 0xFF, prt, "ld a,(de)" }, -+ { 0x1F, 0xFF, prt, "rra" }, -+ { 0x20, 0xE7, jr_cc, "jr %s,"}, -+ { 0x22, 0xFF, prt_nn, "ld (0x%04x),hl" }, -+ { 0x27, 0xFF, prt, "daa"}, -+ { 0x2A, 0xFF, prt_nn, "ld hl,(0x%04x)" }, -+ { 0x2F, 0xFF, prt, "cpl" }, -+ { 0x32, 0xFF, prt_nn, "ld (0x%04x),a" }, -+ { 0x37, 0xFF, prt, "scf" }, -+ { 0x3A, 0xFF, prt_nn, "ld a,(0x%04x)" }, -+ { 0x3F, 0xFF, prt, "ccf" }, -+ -+ { 0x76, 0xFF, prt, "halt" }, -+ { 0x40, 0xC0, ld_r_r, "ld %s,%s"}, -+ -+ { 0x80, 0xC0, arit_r, "%s%s" }, -+ -+ { 0xC0, 0xC7, prt_cc, "ret " }, -+ { 0xC1, 0xCF, pop_rr, "pop" }, -+ { 0xC2, 0xC7, jp_cc_nn, "jp " }, -+ { 0xC3, 0xFF, prt_nn, "jp 0x%04x" }, -+ { 0xC4, 0xC7, jp_cc_nn, "call " }, -+ { 0xC5, 0xCF, pop_rr, "push" }, -+ { 0xC6, 0xC7, arit_n, "%s0x%%02x" }, -+ { 0xC7, 0xC7, rst, "rst 0x%02x" }, -+ { 0xC9, 0xFF, prt, "ret" }, -+ { 0xCB, 0xFF, pref_cb, "" }, -+ { 0xCD, 0xFF, prt_nn, "call 0x%04x" }, -+ { 0xD3, 0xFF, prt_n, "out (0x%02x),a" }, -+ { 0xD9, 0xFF, prt, "exx" }, -+ { 0xDB, 0xFF, prt_n, "in a,(0x%02x)" }, -+ { 0xDD, 0xFF, pref_ind, "ix" }, -+ { 0xE3, 0xFF, prt, "ex (sp),hl" }, -+ { 0xE9, 0xFF, prt, "jp (hl)" }, -+ { 0xEB, 0xFF, prt, "ex de,hl" }, -+ { 0xED, 0xFF, pref_ed, ""}, -+ { 0xF3, 0xFF, prt, "di" }, -+ { 0xF9, 0xFF, prt, "ld sp,hl" }, -+ { 0xFB, 0xFF, prt, "ei" }, -+ { 0xFD, 0xFF, pref_ind, "iy" }, -+ { 0x00, 0x00, prt, "????" }, -+} ; -+ -+int -+print_insn_z80 (bfd_vma addr, disassemble_info * info) -+{ -+ struct buffer buf; -+ struct tab_elt *p; -+ -+ buf.base = addr; -+ buf.n_fetch = 0; -+ buf.n_used = 0; -+ -+ if (! fetch_data (& buf, info, 1)) -+ return -1; -+ -+ for (p = opc_main; p->val != (buf.data[0] & p->mask); ++p) -+ ; -+ p->fp (& buf, info, p->text); -+ -+ return buf.n_used; -+} diff --git a/qemu.changes b/qemu.changes index 4c59e64b..564bb6bb 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Jul 24 13:56:06 CEST 2008 - uli@suse.de + +- update -> current SVN + - MIPS Magnum R4000 machine (Hervé Poussineau) + - Braille support (Samuel Thibault) + - Freecom MusicPal system emulation (Jan Kiszka) + - OMAP242x and Nokia N800, N810 machines (Andrzej Zaborowski) + - EsounD audio driver (Frederick Reeve) + - Gravis Ultrasound GF1 sound card (Tibor "TS" Schütz) +- added pcap networking +- ditched GCC3 thanks to TCG. Hooray! + (downside: no PPC and SH4 emulation, no S/390 host) + ------------------------------------------------------------------- Thu May 15 17:33:53 CEST 2008 - cthiel@suse.de diff --git a/qemu.spec b/qemu.spec index 988296aa..88cc727e 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,5 +1,5 @@ # -# spec file for package qemu (Version 0.9.1) +# spec file for package qemu (Version 0.9.2svn20080703) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,34 +12,25 @@ Name: qemu -BuildRequires: SDL-devel bison e2fsprogs-devel +BuildRequires: SDL-devel bison e2fsprogs-devel libgnutls-devel libpcap-devel ncurses-devel Url: http://fabrice.bellard.free.fr/qemu/ License: BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later; X11/MIT Group: System/Emulators/PC Summary: Universal CPU emulator -Version: 0.9.1 -Release: 46 -Source: %name-%version.tar.bz2 -#Patch400: qemu-0.7.0-gcc4-dot-syms.patch -#Patch401: qemu-0.8.0-gcc4-hacks.patch -#Patch402: qemu-0.8.3-gcc4.patch +Version: 0.9.2svn20080703 +Release: 1 +Source: %name-20080703.tar.bz2 Patch1: qemu-0.9.0.cvs-binfmt.patch Patch6: qemu-0.7.0-amd64.patch Patch8: qemu-cvs-pthread.patch -Patch10: linkerscripts.patch Patch14: qemu-0.7.1-jobsignals.patch -Patch16: qemu-0.7.1-armfpaex.patch Patch19: qemu-0.9.0-nousbdevfs.patch Patch34: qemu-0.9.0-migration.patch Patch37: qemu-0.9.0-kvm.patch Patch38: qemu-0.9.0-kvm-bios.patch Patch39: qemu-0.9.0-kvm-kqemu-window-caption.patch -Patch48: qemu-z80.diff Patch50: qemu-cvs-newpath.patch -Patch51: qemu-cvs-tls.patch -Patch52: qemu-cvs-futex.patch Patch53: qemu-cvs-sched_getaffinity.patch -Patch54: qemu-cvs-mplayer.patch Patch56: qemu-cvs-ipc.patch Patch57: qemu-cvs-ipc_semop.patch Patch58: qemu-cvs-ioctl_debug.patch @@ -51,58 +42,15 @@ Patch63: qemu-cvs-gettimeofday.patch Patch64: qemu-cvs-nofadvise64.patch Patch65: qemu-cvs-flash.patch Patch66: qemu-cvs-mmap-amd64.patch -Patch67: qemu-cvs-noppcemb.patch -Patch68: qemu-0.8.3-gcc4.patch +#Patch67: qemu-cvs-noppcemb.patch Patch69: qemu-cvs-ia64.patch -Patch70: qemu-m68k.diff -Patch71: qemu-s390.patch Patch82: qemu-cvs-svm2.patch Patch83: qemu-cvs-ppcspe.patch -Patch84: qemu-s390dis-license.patch Patch85: qemu-img-vmdk-scsi.patch -Patch86: bug-380828_qemu-block-format-arg.diff +Patch86: qemu-svn-ncurses.patch +Patch87: qemu-svn-nodyngen.patch +Patch88: qemu-svn-pcap.patch Source200: kvm_bios.bin -Source201: zx-rom.bin -Source202: COPYING.zx-rom -# GCC 3 sources/patches -Source601: gcc-3.3.5.tar.bz2 -Patch600: gcc-gcc-3.3.5-hammer.patch.bz2 -Patch601: gcc-gcc-noalias-warn.diff -Patch602: gcc-configure.patch -Patch603: gcc-head-tail.patch -Patch604: gcc-bug-reporting.patch -Patch605: gcc-libgc.patch -Patch606: gcc-ia64intrin.patch -Patch607: gcc-ffi.patch -Patch608: gcc-fworking-directory.patch -Patch610: gcc-altivec.diff -Patch611: gcc-compact-dwarf2.patch -Patch616: gcc-c99-double-inline.diff -Patch617: gcc-c99numbers.diff -Patch621: gcc-gcse-volatile.patch -Patch622: gcc-swig-alias.patch -Patch632: gcc-aliasing.diff -Patch633: gcc-aliasing12.diff -Patch634: gcc-aliasing3.diff -Patch637: gcc-cse-mem-expr.patch -Patch642: gcc-emit-note.patch -Patch643: gcc-unwind-ia64.patch -Patch644: gcc-hppa.patch -Patch645: gcc-suse46595.diff -Patch646: gcc-stl-multiple-defs.diff -# Ada patches -Patch653: gcc-gcc32-ada-link.patch -Patch654: gcc-gcc32-ada-addr2line.patch -# c++ patches -# PPC specific -Patch661: gcc-gcc-3.3-ppc64.patch -# Do not merge this patch into the Alan M patch, it will just get lost later. -# If you think it is useless, try building "fam" and watch libtool break. -Patch663: gcc-ppc-nostartfileprefix.patch -Patch664: gcc-ppc-nof.patch -Patch700: gcc-abuildappease.patch -Patch701: gcc-3.3.5.dif -Patch702: gcc-o_creat.dif # this is to make lint happy Source300: rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -122,27 +70,15 @@ Authors: Fabrice Bellard %prep -%setup -q -a601 -#%patch400 -p1 -#%patch401 -p1 -#%patch402 -p1 +%setup -q -n %name +ln -s fpu/*.h . %patch1 -p1 %patch6 %patch8 -p1 -%patch10 %patch14 -%patch16 %patch19 -#%patch34 -p1 -#%patch37 -p1 -#%patch38 -p1 -#%patch39 -p1 -%patch48 -p1 %patch50 -p1 -%patch51 -p1 -%patch52 -p1 %patch53 -p1 -%patch54 -p1 %patch56 -p1 %patch57 -p1 %patch58 -p1 @@ -154,122 +90,33 @@ Authors: %patch64 -p1 %patch65 -p1 %patch66 -p1 -%patch67 -p1 +#%patch67 -p1 %patch69 -%patch70 -%patch71 -p1 -%ifarch ia64 ppc64 -#this is the dyngen for gcc4 patch (does not work on x86) -%patch68 -p1 -%endif %patch83 -%patch84 %patch85 -p1 -%patch86 -p1 -%if 1 -cd gcc-3.3.5 -%patch600 -%patch601 -%patch602 -%patch603 -%patch604 -%patch605 -%patch606 -%patch607 -%patch608 -p1 -%patch610 -%patch611 -%patch616 -%patch617 -%patch621 -%patch622 -%patch632 -%patch633 -%patch634 -%patch637 -%patch642 -%patch643 -%patch644 -%patch645 -%patch646 -%patch653 -%patch654 -#%ifarch ppc ppc64 -%patch661 -p1 -#%patch6063 -p1 -#%endif -%patch700 -p1 -%patch701 -%patch702 -cd .. -%endif +%patch86 +%patch87 +%patch88 %build cp -p %SOURCE200 pc-bios/ -cp -p %SOURCE202 . -%ifarch ia64 ppc64 -%define qemucc gcc -%else -%define gcc33tmp /tmp/gcc33 -%define qemucc %{gcc33tmp}/bin/gcc -QEMU_OPT_FLAGS="$RPM_OPT_FLAGS" -# fix opt flags for gcc3 -%ifarch %ix86 -QEMU_OPT_FLAGS="${RPM_OPT_FLAGS/-mtune=/-mcpu=}" -%endif -QEMU_OPT_FLAGS="${QEMU_OPT_FLAGS//-fstack-protector/}" -# build gcc 3.3 -%define GCCDIST %{_target_cpu}-suse-linux -cd gcc-3.3.5 -./configure --enable-threads=posix \ - --prefix=%{gcc33tmp} --with-local-prefix=/usr/local \ - --enable-languages=c \ - --enable-shared --disable-biarch --disable-multilib \ -%ifarch sparc - --with-cpu=v7 \ -%endif - --host=%{GCCDIST} -make bootstrap-lean BOOT_CFLAGS="$QEMU_OPT_FLAGS" STAGE1_CFLAGS="$QEMU_OPT_FLAGS" CFLAGS="$QEMU_OPT_FLAGS" %{?jobs:-j%{jobs}} -make install -cd .. -QEMU_OPT_FLAGS="$QEMU_OPT_FLAGS -fno-strict-aliasing" -%endif # build QEMU mkdir -p dynamic # build qemu-system without kqemu support ./configure --prefix=/usr \ --interp-prefix=/usr/share/qemu/qemu-i386 \ - --cc=%qemucc --enable-adlib --disable-gcc-check \ + --audio-card-list="ac97 adlib cs4231a gus" \ + --audio-drv-list="alsa sdl" --enable-mixemu \ + --disable-gcc-check \ --extra-cflags="$QEMU_OPT_FLAGS" --enable-system --disable-linux-user make %{?jobs:-j%{jobs}} mv */qemu */qemu-* dynamic || true make clean -# build qemu-system with kqemu support -# kqemu target -%ifarch %ix86 x86_64 -%ifarch x86_64 -target_list_kqemu="x86_64-softmmu" -%else -target_list_kqemu="i386-softmmu" -%endif -./configure --prefix=/usr \ - --interp-prefix=/usr/share/qemu/qemu-i386 \ - --target-list="$target_list_kqemu" --cc=%qemucc \ - --enable-adlib --extra-cflags="$QEMU_OPT_FLAGS" -echo '#define USE_KQEMU 1' >>config-host.h -make %{?jobs:-j%{jobs}} -mv */qemu */qemu-* dynamic || true -make clean -%endif # build userland emus ./configure --prefix=/usr \ --interp-prefix=/usr/share/qemu/qemu-i386 \ -%ifarch s390 # alpha-linux-user broken (ICE) - --target-list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user mips-linux-user mipsel-linux-user m68k-linux-user sh4-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user x86_64-linux-user cris-linux-user" \ -%else --enable-linux-user \ -%endif - --disable-system --cc=%qemucc \ + --disable-system \ --static --disable-gcc-check \ --extra-cflags="$QEMU_OPT_FLAGS" make %{?jobs:-j%{jobs}} @@ -297,15 +144,13 @@ ln -sf ../../../emul/ia32-linux $RPM_BUILD_ROOT/usr/share/qemu/qemu-i386 %ifnarch ia64 mkdir -p $RPM_BUILD_ROOT/emul/ia32-linux %endif -install -m 644 %SOURCE201 $RPM_BUILD_ROOT/usr/share/qemu/ %clean rm -rf ${RPM_BUILD_ROOT} -rm -rf %{gcc33tmp} %files %defattr(-, root, root) -%doc COPYING COPYING.LIB Changelog README TODO VERSION qemu-doc.html COPYING.zx-rom +%doc COPYING COPYING.LIB Changelog README TODO VERSION qemu-doc.html %ifnarch alpha /usr/bin/qemu %endif @@ -318,6 +163,17 @@ rm -rf %{gcc33tmp} %endif %changelog +* Thu Jul 24 2008 uli@suse.de +- update -> current SVN + - MIPS Magnum R4000 machine (Hervé Poussineau) + - Braille support (Samuel Thibault) + - Freecom MusicPal system emulation (Jan Kiszka) + - OMAP242x and Nokia N800, N810 machines (Andrzej Zaborowski) + - EsounD audio driver (Frederick Reeve) + - Gravis Ultrasound GF1 sound card (Tibor "TS" Schütz) +- added pcap networking +- ditched GCC3 thanks to TCG. Hooray! + (downside: no PPC and SH4 emulation, no S/390 host) * Thu May 15 2008 cthiel@suse.de - use lsilogic instead of buslogic for SCSI VMDK images * Thu May 08 2008 uli@suse.de diff --git a/zx-rom.bin b/zx-rom.bin deleted file mode 100644 index e4866bbe..00000000 --- a/zx-rom.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d55daa439b673b0e3f5897f99ac37ecb45f974d1862b4dadb85dec34af99cb42 -size 16384