diff options
author | kan <kan@FreeBSD.org> | 2005-06-03 03:28:44 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2005-06-03 03:28:44 +0000 |
commit | 2156e40a831a8e0ab68e4bc091c2940bf46ca6df (patch) | |
tree | f0dc8ad34f9fcaf27052e24e893a4284b5fee6e9 /contrib | |
parent | 0a20abcc95340c9d2bb59421bac84eca4fb43b0c (diff) | |
download | FreeBSD-src-2156e40a831a8e0ab68e4bc091c2940bf46ca6df.zip FreeBSD-src-2156e40a831a8e0ab68e4bc091c2940bf46ca6df.tar.gz |
Gcc 3.4.4 release.
Diffstat (limited to 'contrib')
193 files changed, 19397 insertions, 8748 deletions
diff --git a/contrib/gcc/ChangeLog b/contrib/gcc/ChangeLog index efcecf7..fe9363f 100644 --- a/contrib/gcc/ChangeLog +++ b/contrib/gcc/ChangeLog @@ -1,3 +1,2325 @@ +2005-05-19 Release Manager + + * GCC 3.4.4 released. + +2005-05-11 Mark Mitchell <mark@codesourcery.com> + + Revert: + 2005-05-10 H.J. Lu <hongjiu.lu@intel.com> + Backport from mainline + 2004-02-12 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * function.c (fixup_var_refs): Save volatile_ok and set to 1. + * expr.c (emit_block_move_via_movstr): Save and restore + volatile_ok. + 2005-05-09 Grigory Tolstolytkin <gtolstolytkin@ru.mvista.com> + Backport from mainline + 2004-02-12 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * emit-rtl.c (set_mem_attributes_minus_bitpos): Don't kill previous + MEM_VOLATILE in REF. + +2005-05-11 Ben Elliston <bje@au.ibm.com> + + * dwarf2out.c: Revert my 2005-05-10 patch. + +2005-05-10 H.J. Lu <hongjiu.lu@intel.com> + + Backport from mainline + 2004-02-12 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * function.c (fixup_var_refs): Save volatile_ok and set to 1. + * expr.c (emit_block_move_via_movstr): Save and restore + volatile_ok. + +2005-05-10 Jakub Jelinek <jakub@redhat.com> + + * config/i386/i386.md (sse_mov?fcc* splitters): Add mode to + IF_THEN_ELSE, remove mode from MATCH_OPERATOR. Fix a typo. + +2005-05-09 Grigory Tolstolytkin <gtolstolytkin@ru.mvista.com> + + Backport from mainline + 2004-02-12 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * emit-rtl.c (set_mem_attributes_minus_bitpos): Don't kill previous + MEM_VOLATILE in REF. + +2005-05-10 Ben Elliston <bje@au.ibm.com> + + PR debug/16676 + * dwarf2out.c (dwarf2out_decl): Always set context_die to NULL, + even when debug_info_level is DINFO_LEVEL_TERSE. + +2005-05-08 Stephane Carrez <stcarrez@nerim.fr> + + * config/m68hc11/m68hc11.c (m68hc11_z_replacement): Use emit_insn_after + when adding the save Z instruction so that it is part of the good BB. + (reg_or_some_mem_operand): Do not allow the 68HC12 address indirect + addressing mode as it is not supported by bset and bclr. + (m68hc11_gen_movhi): Fix invalid generation of indexed indirect + addressing with movw. + (m68hc11_gen_movqi): Use pula and pulb instead of lda and ldb for + 68HC12. + * config/m68hc11/m68hc11.md ("movhi_const0"): Use this pattern only + for 68HC11. + ("*movhi_68hc12"): Handle movhi_const0. + ("*subhi3", "subqi3"): Use general_operand for operand 1. + ("*subhi3_zext"): Likewise. + +2005-05-08 Stephane Carrez <stcarrez@nerim.fr> + + PR target/19051 + * config/m68hc11/m68hc11.md ("mulqi3"): Use general_operand for operand + 1 and fix constraints. + ("mulqihi3"): Use general_operand for operand 2. + +2005-05-08 Richard Sandiford <rsandifo@redhat.com> + + PR target/21416 + * config/mips/mips.c (mips_emit_compare): Don't reverse UNGE and UNGT + comparisons. + * config/mips/mips.md (sungt_df, sunge_df, sungt_sf, sunge_sf): New + patterns. + +2005-05-08 Stephane Carrez <stcarrez@nerim.fr> + + PR target/16925 + * config/m68hc11/m68hc11.c (m68hc11_gen_highpart): Handle split of + 64-bit constants on 64-bit hosts. + (m68hc11_split_logical): Simplify. + (m68hc11_split_move): Likewise. + +2005-05-06 Bruce Korb <bkorb@gnu.org> + Joseph S. Myers <joseph@codesourcery.com> + + * fixinc/inclhack.def: Correct backslashes + * fixinc/fixincl.x: regen + +2005-05-02 Janis Johnson <janis187@us.ibm.com> + + PR 19985 + * gcov-io.h: Declare gcov external functions hidden. + +2005-05-01 Gerald Pfeifer <gerald@pfeifer.com> + + * config/freebsd-spec.h (FBSD_CPP_SPEC): Revert last change. + +2005-05-01 Gerald Pfeifer <gerald@pfeifer.com> + + Backport from mainline + * doc/install.texi (Specific): Avoid using asterisks in @anchor + names related to target triplets. + Remove i?86-*-esix from platform directory. + Remove powerpc-*-eabiaix from platform directory. + +2005-05-01 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR bootstrap/20633 + * config/freebsd-spec.h (FBSD_CPP_SPEC): Add %(cpp_arch). + +2005-05-01 Gerald Pfeifer <gerald@pfeifer.com> + + * doc/install.texi (Specific): Omit dots in the @anchors names + for i?86-*-sco3.2v5* and sparc-sun-solaris2.7. + Omit underscores for x86_64-*-* and the "all ELF targets" entry. + +2005-05-01 Joseph S. Myers <joseph@codesourcery.com> + + PR c/21213 + * c-decl.c (finish_struct): Don't dereference NULL TYPE_FIELDS of + transparent union. + +2005-05-01 Joseph S. Myers <joseph@codesourcery.com> + + PR c/20740 + * c-format.c (init_dynamic_asm_fprintf_info): Give errors, not + aborts, if __gcc_host_wide_int__ is not properly defined. + (init_dynamic_diag_info): Give errors, not aborts, if location_t, + tree or __gcc_host_wide_int__ are not properly defined. + +2005-05-01 Joseph S. Myers <joseph@codesourcery.com> + + PR c/11459 + PR c/18502 + * gcc.c (cpp_unique_options): Remove %{trigraphs}. + (cpp_options, cc1_options): Change %{std*} %{ansi} to + %{std*&ansi&trigraphs}. + +2005-04-29 Alan Modra <amodra@bigpond.net.au> + + PR target/21098 + * config/rs6000/rs6000.c (rs6000_elf_end_indicate_exec_stack): New. + * config/rs6000/linux64.h (TARGET_ASM_FILE_END): Use the above. + +2005-04-25 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config.gcc (avr-*-*): Remove redundant "case". + +2005-04-25 Ralf Corsepius <ralf.corsepius@rtems.org> + + PR target/17822 + * config/avr/t-avr (AR_FOR_TARGET,RANLIB_FOR_TARGET): Remove. + +2005-04-25 Ralf Corsepius <ralf.corsepius@rtems.org> + + PR target/17824 + * config/c4x/c4x.h (ASM_PROG, LD_PROG): Remove. + +2005-04-22 David Edelsohn <edelsohn@gnu.org> + + Backport from mainline. + * config/rs6000/rs6000.c (rs6000_init_libfuncs): Set TFmode + optabs to xlq names if TARGET_XL_COMPAT. + +2005-04-22 Eric Botcazou <ebotcazou@libertysurf.fr> + + * doc/invoke.texi (SPARC options): Document that -mapp-regs + is turned off by default on Solaris. + +2005-04-15 Dave Korn <dave.korn@artimi.com> + + * gcc.c (default_compilers): Clarify obscure error message when + reading from standard input. + +2005-04-15 Eric Botcazou <ebotcazou@libertysurf.fr> + + * config/sparc/sparc.c (legitimate_address_p): Use TARGET_ARCH32. + +2005-04-11 David Edelsohn <edelsohn@gnu.org> + + Backport from mainline: + * config/rs6000/aix52.h (atoll): Declare. + +2005-04-08 Ulrich Weigand <uweigand@de.ibm.com> + + Backport from mainline: + * config/s390/tpf.h (ASM_SPEC): Define. + +2005-04-06 Dale Johannesen <dalej@apple.com> + + PR middle-end/19225 + * calls.c (expand_call): Flush pending deferrals before + throwing call. + +2005-04-06 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR target/17245 + * config/sparc/sparc.c (legitimate_address_p): Remove 'imm2'. + Revert 2004-10-08 patch. Reject TFmode LO_SUM in 32-bit mode. + +2005-04-05 James E. Wilson <wilson@specifixinc.com> + + PR target/20670 + * unwind-ia64.c (uw_intall_context): Add missing load of r27. + +2005-04-04 Eric Botcazou <ebotcazou@libertysurf.fr> + + * doc/invoke.texi (SPARC options): Document that + -mlittle-endian is not supported on Linux either. + +2005-03-25 Gabriel Dos Reis <gdr@integrable-solutions.net> + + PR c++/18644 + * doc/invoke.texi (-Wsynth): Don't document, as it now is void of + semantics. + +2005-03-31 Alan Modra <amodra@bigpond.net.au> + + PR target/20611 + * config/rs6000/rs6000.md (load_toc_v4_PIC_1b): Remove inline + label operand. Remove (use (unspec..)). Don't emit a label on + the offset word. + * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Don't + generate inline label for load_toc_v4_PIC_1b. + (rs6000_emit_load_toc_table): Likewise. + +2005-03-31 Alan Modra <amodra@bigpond.net.au> + + * config.gcc (cpu_is_64bit): Set for 64-bit powerpc cpus. + (powerpc64-*-linux*): Use it. Rearrange tm_file assignment. + (powerpc-*-linux*): Build a biarch compiler when --enable-targets + is given with "powerpc64*" or "all", or when --with-cpu chooses + a 64-bit cpu. + +2005-03-30 Alan Modra <amodra@bigpond.net.au> + + * doc/install.texi: Update binutils requirement for powerpc*-linux. + +2005-03-25 John David Anglin <dave.anglin@nrc-crnc.gc.ca> + + PR target/15491 + * vax.c (vax_rtx_costs_1): Merge with vax_rtx_costs. + (vax_rtx_costs): Return false when passed unsupported rtx's. Handle + FLOAT_EXTEND, FLOAT_TRUNCATE and TRUNCATE. Fix costs for POST_INC, + PRE_DEC, NEG and NOT. + +2005-03-23 Uros Bizjak <uros@kss-loka.si> + + * simplify-rtx.c (simplify_unary_operation) <NOT>: Add missing break + in code that deals with logicals on floats. + +2005-03-22 Uros Bizjak <uros@kss-loka.si> + + PR target/14981 + Backport from mainline + 2004-02-18 Jan Hubicka <jh@suse.cz> + * simplify-rtx.c (simplify_unary_operation): Deal with logicals on + floats. + (simplify_binary_operation): Deal with logicals on floats. + * i386.md (SSE fabs splitters): Emit new patterns. + (SSE cmov splitters): Likewise. + (sse_andv4sf3, sse_nandv4sf3, sse_iorv4sf3, sse_xorv4sf3 + (sse_andv2df3, sse_nandv2df3, sse_iorv2df3, sse_xorv2df3): Do not use + subregs. + (sse_andsf3, sse_nandsf3, sse_xorsf3): Kill. + (sse_anddf3, sse_nanddf3, sse_xordf3): Kill. + +2005-03-20 Marek Michalkiewicz <marekm@amelek.gda.pl> + + PR target/18551 + * config/avr/avr.c (avr_output_function_prologue): Do not use + current_function_name() in a label, use a local label instead. + +2005-03-19 Joseph S. Myers <joseph@codesourcery.com> + + * c.opt (ansi, std=iso9899:1990, std=iso9899:1999, + std=iso9899:199x): Correct descriptions. + +2005-03-19 Andy Hutchinson <HutchinsonAndy@netscape.net> + + PR target/18251 + * config/avr/avr.md (movstrhi): Rewrite as RTL loop. + (*movstrqi_insn): Delete. + (*movstrhi): Delete. + +2005-03-17 Richard Sandiford <rsandifo@redhat.com> + + PR rtl-optimization/19683 + * reload1.c (choose_reload_regs): Pass the number of bits, not the + number of bytes, to smallest_int_for_mode. Fix arguments to + REG_CANNOT_CHANGE_MODE_P. + +2005-03-17 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/linux-unwind.h: New file backported from gcc-4.0. + * config/rs6000/linux.h: #include linux-unwind.h in place of all + unwind support in this file. + * config/rs6000/linux64.h: Likewise. + +2005-03-16 Roger Sayle <roger@eyesopen.com> + + PR rtl-optimization/17825 + Backport from mainline + 2004-11-27 Jakub Jelinek <jakub@redhat.com> + * combine.c (subst): Ignore STRICT_LOW_PART no matter if REG_P (new) + or not. + +2005-03-16 Roger Sayle <roger@eyesopen.com> + + PR target/18371 + Backport from mainline + 2004-12-19 Steven Bosscher <stevenb@suse.de> + * config/i386/i386.c (ix86_split_to_parts): Use an array with + four elements for decoding a CONST_DOUBLE on 64 bits targets. + +2005-03-14 Alan Modra <amodra@bigpond.net.au> + + * config.gcc: Remove excess indentation. + (powerpc*-*-*, rs6000-*-*): Accept --with-cpu/tune power5. + +2005-03-13 Marek Michalkiewicz <marekm@amelek.gda.pl> + + PR target/20288 + * config/avr/avr.c (print_operand): Add 'p' and 'r'. + (out_movhi_r_mr): Read low byte of volatile MEM first. + (out_movhi_mr_r): Write high byte of volatile MEM first. + +2005-03-10 Aldy Hernandez <aldyh@redhat.com> + + * doc/invoke.texi: Add 8540 to list of cpus in rs6000 cpu section. + +2005-03-08 James E Wilson <wilson@specifixinc.com> + + Backport from mainline + 2004-04-13 James E Wilson <wilson@specifixinc.com> + PR middle-end/20364 + * c-opt.c (c_common_post_options): If this_input_filename is NULL, + increment errorcount and return false instead of true. + + Backport from mainline + 2005-02-21 James E Wilson <wilson@specifixinc.com> + * toplev.c (backend_init): Don't call init_adjust_machine_modes here. + (do_compile): Do call it here. + +2005-03-07 David Billinghurst <David.Billinghurst@riotinto.com> + + * config/i386/cygwin1.c(mingw_scan): Use xstrdup in calls to putenv. + +2005-03-03 Alan Modra <amodra@bigpond.net.au> + + PR target/20277 + * config/rs6000/rs6000.c (rs6000_override_options): Don't allow + -mcpu to override any other explicitly given flags. + +2005-03-02 Mark Mitchell <mark@codesourcery.com> + + PR c++/19916 + * varasm.c (initializer_constant_valid_p): Allow conversions + between OFFSET_TYPEs. Tidy. + +2005-02-28 John David Anglin <dave.anglin#nrc-cnrc.gc.ca> + + PR target/19819 + * pa.h (GO_IF_LEGITIMATE_ADDRESS): Allow allow hard registers during + and after reload in REG+REG indexed addresses without REG_POINTER + set in the base and not set in the index. + +2005-02-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR rtl-optimization/17728 + * pa.md (mulsi3, divsi3, udivsi3, modsi3): Change predicate for + operand 0 from general_operand to move_dest_operand. + +2005-02-26 Paolo Carlini <pcarlini@suse.de> + + * doc/extend.texi (Declaring Attributes of Functions)<noreturn>: + Clarify that the alternative way doesn't work in GNU C++. + +2005-02-25 David Edelsohn <edelsohn@gnu.org> + + Backport from mainline: + 2005-02-24 David Edelsohn <edelsohn@gnu.org> + PR target/19019 + * reload.c (operands_match_p): Only increment register number for + SCALAR_INT_MODE_P modes in multiple hard registers. + * config/rs6000/rs6000.md (trunctfdf2): Remove register constraints. + Fix formatting. + +2005-02-24 Jakub Jelinek <jakub@redhat.com> + + PR target/19019 + * Makefile.in (LIB2FUNCS_SHARED_EXTRA, LIB2ADD_SH): New. + (libgcc.mk): Depend on $(LIB2ADD_SH), pass LIB2ADD_SH to mklibgcc. + (LIBGCC_DEPS): Add $(LIB2ADD_SH). + * mklibgcc.in: Handle LIB2ADD_SH. + * config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Remove darwin-ldouble.c. + (LIB2FUNCS_STATIC_EXTRA, LIB2FUNCS_SHARED_EXTRA): Set. + * config/rs6000/darwin-ldouble.c: Protect .symver asm also with + defined IN_LIBGCC2_S. + * config/rs6000/darwin-ldouble-shared.c: New file. + +2005-02-23 Michael Beach <michaelb@ieee.org> + + PR target/20159 + * config/sparc/t-elf (startup files): Assemble with CPP. + +2005-02-17 Gerald Pfeifer <gerald@pfeifer.com> + + * doc/install.texi (Specific): Update link for Darwin-specific + tool binary site. + +2005-02-16 David Edelsohn <edelsohn@gnu.org> + + PR target/19019 + Backport from mainline: + 2005-02-16 David Edelsohn <edelsohn@gnu.org> + * config/rs6000/t-aix43 (SHLIB_MAPFILES): Add libgcc-ppc64.ver. + * config/rs6000/t-aix52 (SHLIB_MAPFILES): Same. + 2005-02-15 David Edelsohn <edelsohn@gnu.org> + Alan Modra <amodra@bigpond.net.au> + * config/rs6000/darwin-ldouble.c (_xlqadd): Rename to __gcc_qadd. + (_xlqsub): Rename to __gcc_qsub. + (_xlqmul): Rename to __gcc_qmul. + (_xlqdiv): Rename to __gcc_qdiv. + Provide versioned symbol aliases with old names. + * config/rs6000/libgcc-ppc64.ver: Rename symbols. + * config/rs6000/rs6000.c (rs6000_init_libfuncs): Rename symbols. + * config/rs6000/t-aix43 (LIB2FUNCS_EXTRA): New. + * config/rs6000/t-aix52 (LIB2FUNCS_EXTRA): New. + * config/rs6000/t-newas (LIB2FUNCS_EXTRA): New. + 2005-02-14 David Edelsohn <edelsohn@gnu.org> + * config/rs6000/rs6000.md (trunctfdf2): Change to define_expand. + (trunctfdf2_internal1): New. + (trunctfdf2_internal2): Renamed from trunctfdf2. + 2005-02-13 David Edelsohn <edelsohn@gnu.org> + * config/rs6000/aix.h ({TARGET,MASK}_XL_CALL): Rename to + {TARGET,MASK}_XL_COMPAT. + (SUBTARGET_SWITCHES): Rename xl-call to xl-compat. Use + MASK_XL_COMPAT. + * config/rs6000/beos.h ({TARGET,MASK}_XL_CALL): Remove. + * config/rs6000/rs6000.c (function_arg): Change TARGET_XL_CALL to + TARGET_XL_COMPAT. + (rs6000_arg_partial_bytes): Same. + (rs6000_generate_compare): Generate PARALLEL for compare if TFmode + and XL compatibility enabled. + * config/rs6000/rs6000.h (TARGET_XL_CALL): Rename to TARGET_XL_COMPAT. + * config/rs6000/rs6000.md (cmptf_internal1): Add !TARGET_XL_COMPAT + test to final condition. + (cmptf_internal2): New. + * doc/invoke.texi (RS/6000 Subtarget Options): Change xl-call to + xl-compat. Add TFmode information to description. + +2005-02-16 Eric Christopher <echristo@redhat.com> + + PR preprocessor/19077 + * cppmacro.c (cpp_macro_definition): Move handling of whitespace + to PREV_WHITE conditional. Remove overloading of len + variable. + +2005-02-16 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR target/19715 + * config.gcc (sparc-*-elf*): Include sparc/sol2-gld.h. + (sparc-*-rtems*): Likewise. + (sparclite-*-elf*): Likewise. + (sparc86x-*-elf*): Likewise. + (sparc64-*-elf*): Likewise. + +2005-02-11 John David Anglin <dave.anglin@nrc-crnc.gc.ca> + + PR middle-end/19697 + 2005-01-30 Roger Sayle <roger@eyesopen.com> + * config/pa/pa.md (anddi3, iordi3): On HPPA64, disallow an integer + constant as the second operand and a register as the third. + +2005-02-11 Jakub Jelinek <jakub@redhat.com> + + PR c++/19666 + 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu> + * fold-const.c (fold_convert): Treat OFFSET_TYPE like + POINTER_TYPE and INTEGER_TYPE. + + * config/rs6000/sysv4.h (ENDFILE_LINUX_SPEC): Use crtendS.o instead of + crtend.o if -pie. Use %{x:a;:b} spec syntax. + +2005-02-10 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/19579 + * ifcvt.c (noce_try_cmove_arith): If emitting instructions to set up + both A and B, see if they don't clobber registers the other expr uses. + +2005-02-08 Alan Modra <amodra@bigpond.net.au> + + PR target/19803 + * predict.c (PROB_VERY_UNLIKELY): Use 1% instead of 10%. + +2005-02-07 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config/m68k/t-rtems (MULTILIB_MATCHES): Let m528x match m5200. + +2005-02-03 Richard Guenther <rguenth@gcc.gnu.org> + + PR middle-end/19775 + * builtins.c (fold_builtin_sqrt): Transform + sqrt(pow(x,y)) to pow(fabs(x),y*0.5), not + pow(x,y*0.5). + +2005-02-01 Richard Earnshaw <rearnsha@arm.com> + + PR target/16201 + * arm.c (arm_eliminable_register): New function. + (adjacent_mem_locations): Don't allow eliminable registers. Use + HOST_WIDE_INT for address offsets. + * arm-protos.h (arm_eliminable_register): Add prototype. + +2005-01-31 Daniel Jacobowitz <dan@codesourcery.com> + + 2004-09-22 Mark Mitchell <mark@codesourcery.com> + * gcc/dwarf2out.c (scope_die_for): If the containing scope is a + TRANSLATION_UNIT_DECL, consider it to be a global. + +2005-01-29 Alan Modra <amodra@bigpond.net.au> + + * unwind-dw2.c (execute_stack_op): Add missing cases for + DW_OP_shl, DW_OP_shr, DW_OP_shra, DW_OP_xor. + +2005-01-28 Stephane Carrez <stcarrez@nerim.fr> + + PR target/15384 + * config/m68hc11/t-m68hc11-gas (dp-bit.c): Fix typo causing a + configuration part of dp-bit.c to be lost. + +2005-01-27 Ulrich Weigand <uweigand@de.ibm.com> + + PR target/17771 + Backport from mainline: + * config/s390/s390.md ("reload_outti"): Remove predicate for + output operand. Abort if operand is not a MEM. + ("reload_outdi", "reload_outdf"): Likewise. + +2005-01-27 Marek Michalkiewicz <marekm@amelek.gda.pl> + + PR target/19293 + PR target/19329 + * config/avr/avr.c (notice_update_cc): Only set condition code for + ashrqi3 if shift count > 0. + (out_shift_with_cnt): Handle shift count <= 0 as a no-op. + (ashlqi3_out, ashlhi3_out, ashlsi3_out, ashrqi3_out, ashrhi3_out, + ashrsi3_out, lshrqi3_out, lshrhi3_out, lshrsi3_out): Handle shift + count <= 0 as a no-op, and shift count >= width by copying zero + or sign bit to all bits of the result. + * config/avr/avr.md (all shifts): Add alternatives for zero shift + count, with attribute "length" set to 0 and "cc" set to "none". + +2005-01-27 J"orn Rennecke <joern.rennecke@st.com> + + * real.c (do_add): Initialize signalling and canonical members. + + * real.c (real_from_integer): Zero out destination. + +2005-01-26 Ulrich Weigand <uweigand@de.ibm.com> + + Backport from mainline: + * dbxout.c (dbxout_symbol_location): Resolve constant pool references + even for variables with NULL DECL_INITIAL. + +2005-01-25 Richard Earnshaw <rearnsha@arm.com> + + PR target/19393 + Backport: + 2004-03-30 Nick Clifton <nickc@redhat.com> + * config/arm/arm.md (thumb_jump): Reduce the backward branch + range, and increase the forward branch range, to allow for + the fact that the PC will be off by 4. + +2005-01-24 Richard Henderson <rth@redhat.com> + Aldy Hernandez <aldyh@redhat.com> + + * regrename.c (note_sets): Handle subregs. + +2005-01-24 Jakub Jelinek <jakub@redhat.com> + + * flow.c (propagate_one_insn): Formatting. + + PR middle-end/19551 + * flow.c (libcall_dead_p): Be more conservative if unsure. + If there are any instructions between insn and call, see if they are + all dead before saying the libcall is dead. + +2005-01-22 Ralf Corsepius <ralf.corsepius@rtems.org> + + PR target/19548 + * config/rs6000/rtems.h: Resurrect cpp_os_rtems_spec from gcc < 3.4. + (CPP_OS_RTEMS_SPEC): New (From gcc-3.3's config/rs6000/sys4.h). + (SUBSUBTARGET_EXTRA_SPECS): Use CPP_OS_RTEMS_SPEC. + +2005-01-19 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/15139 + * combine.c: Include params.h. + (count_rtxs): New function. + (record_value_for_reg): If replace_rtx would replace at least + 2 occurrences of REG in VALUE and TEM is really large, replace REG with + (clobber (const_int 0)) instead of TEM. + * params.def (PARAM_MAX_LAST_VALUE_RTL): New. + * params.h (MAX_LAST_VALUE_RTL): New. + * Makefile.in (combine.o): Depend on $(PARAMS_H). + * doc/invoke.texi (--param max-last-value-rtl=N): Document. + + PR c/17297 + * c-typeck.c (digest_init): Only call build_vector if all constructor + elements are *_CST nodes. + + PR middle-end/19164 + * c-typeck.c (digest_init): Only call build_vector if inside_init + is a CONSTRUCTOR. + +2005-01-18 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR debug/16261 + Backport from mainline: + 2004-01-27 Devang Patel <dpatel@apple.com> + + * dwarf2out.c: (remove_child_TAG): New function. + (gen_subprogram_die): Do not remove all children dies while reusing + declaration die for definition. Instead, selectively remove only + formal parameters. + +2005-01-18 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR rtl-optimization/19296 + * combine.c (simplify_comparison): Rewrite the condition under + which a non-paradoxical SUBREG of a PLUS can be lifted when + compared against a constant. + +2005-01-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * varasm.c (process_pending_assemble_output_defs): Fix previous change. + +2005-01-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR target/16304 + * defaults.h (TARGET_DEFERRED_OUTPUT_DEFS): Provide default. + * toplev.c (compile_file): Call process_pending_assemble_output_defs + just before targetm.asm_out.file_end. + * tree.h (process_pending_assemble_output_defs): Declare. + * varasm.c (assemble_output_def, process_pending_assemble_output_defs): + New functions. + (assemble_alias): Defer generation of assembly code for defines when + TARGET_DEFERRED_OUTPUT_DEFS is true. + * config/rs6000/aix41.h (TARGET_DEFERRED_OUTPUT_DEFS): Define. + * config/rs6000/aix43.h (TARGET_DEFERRED_OUTPUT_DEFS): Define. + * doc/tm.texi (TARGET_DEFERRED_OUTPUT_DEFS): document. + +2005-01-15 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config/mips/rtems.h (MIPS_DEFAULT_GVALUE): Set to 0. + * config/mips/t-rtems (MULTILIBS_DIRNAMES,MULTILIB_OPTIONS): + Remove little endian multilib variants. + Add mips32 multilib variant. + +2005-01-14 David Edelsohn <edelsohn@gnu.org> + + * config/rs6000/aix52.h (CPLUSPLUS_CPP_SPEC): Revert last change. + +2005-01-13 David O'Brien <obrien@FreeBSD.org> + + Backport from mainline: + * config/freebsd-spec.h: Make KSE pthread lib logic the default. + +2005-01-13 David Edelsohn <edelsohn@gnu.org> + + * config/rs6000/aix52.h (CPLUSPLUS_CPP_SPEC): Change _XOPEN_SOURCE + definition to 600. + +2005-01-13 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config/i386/t-rtems-i386: Multilib on -mtune instead of -mcpu. + +2004-01-12 David Mosberger <davidm@hpl.hp.com> + James E Wilson <wilson@specifixinc.com> + + PR target/18987 + * config/ia64/ia64.c (process_set): For alloc insn, only call + process_epilogue is !frame_pointer_needed. + + PR target/13158 + * config/ia64/ia64.c (ia64_expand_epilogue): Set RTX_FRAME_RELATED_P on + sibcall alloc instruction. + (process_set): Handle sibcall alloc instruction. + +2005-01-10 David Edelsohn <edelsohn@gnu.org> + + PR target/18720 + Backport from mainline + * collect2.c (main): Set aixrtl_flag for -brtl option. + (resolve_lib_name): Search for .so file extension before .a + if aixrtl_flag set. + +2005-01-08 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/19012 + * config/i386/i386.md (addqi_1_slp): Set memory attribute. + +2005-01-07 Eric Botcazou <ebotcazou@libertysurf.fr> + + * configure.ac (HAVE_AS_OFFSETABLE_LO10): Fix typo. + * configure: Regenerate. + +2005-01-07 Jakub Jelinek <jakub@redhat.com> + + * c-common.c (handle_mode_attribute): For ENUMERAL_TYPE, also copy + TYPE_MODE. + +2005-01-06 Richard Sandiford <rsandifo@redhat.com> + + PR rtl-opt/13299 + * loop.c (get_monotonic_increment, biased_biv_fits_mode_p, + biv_fits_mode_p, extension_within_bounds_p): New functions. + (check_ext_dependent_givs): Use them. + +2005-01-05 Richard Henderson <rth@redhat.com> + + PR rtl-opt/10692 + * reload1.c (do_input_reload): Restrict the optimization deleteing + a previous output reload to RELOAD_FOR_INPUT. + +2005-01-06 Jakub Jelinek <jakub@redhat.com> + + Backport from mainline: + 2004-03-22 Diego Novillo <dnovillo@redhat.com> + + * c-typeck.c (same_translation_unit_p): Fix pasto. + +2005-01-02 Roger Sayle <roger@eyesopen.com> + Andrew Pinski <pinskia@physics.uc.edu> + James E. Wilson <wilson@specifixinc.com> + + PR rtl-optimization/12092 + * loop.c (emit_prefetch_instructions): Do nothing if PREFETCH_BLOCK + is zero. + +2004-12-30 Roger Sayle <roger@eyesopen.com> + + PR middle-end/19175 + * loop-unroll.c (expand_bct): Pass the code_label to the function + do_compare_rtx_and_jump, not the label ref. Clean-up style issues. + +2004-12-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * vax.c (vax_address_cost, vax_rtx_cost): Correct casts. + (vax_rtx_cost): Handle small offsets for both PLUS and MINUS. + +2004-12-27 Steven Bosscher <stevenb@suse.de> + John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + rtl-optimization/12863 + * config/vax/vax.h (CASE_DROPS_THROUGH): Don't define. + * config/vax/vax.md (casesi): Emit a test-and-branch to make sure + that the case is in range, to make sure the casesi insn is always + in range and never falls through. + (casesi1): Add comment to explain why casesi never falls through. + Remove the unnamed special case casesi pattern. + +2004-12-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR c++/14607. + Backported from main. + * configure.ac (HAVE_GAS_NSUBSPA_COMDAT): Add check for .NSUBSPA + COMDAT support. + * configure. config.in: Rebuilt. + * config/pa/pa-protos.h (som_text_section_asm_op, + som_readonly_data_section, som_one_only_readonly_data_section, + som_one_only_data_section, forget_section): Declare. + * pa.c (override_options): Set init_machine_status to + pa_init_machine_status. + (pa_init_machine_status): New function. + (pa_output_function_epilogue): Call forget_section if TARGET_SOM and + TARGET_GAS. + (pa_asm_output_mi_thunk): Likewise. + (som_text_section_asm_op): New function. + (pa_select_section): Call som_one_only_readonly_data_section and + som_one_only_data_section when appropriate. + * pa.h (struct machine_function): Define. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, + SOM_READONLY_DATA_SECTION_FUNCTION, + SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION + SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): New + macros. + * som.h (ASM_OUTPUT_FUNCTION_PREFIX): Delete. + (TEXT_SECTION_ASM_OP): Call som_text_section_asm_op. + (READONLY_DATA_ASM_OP, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. + (READONLY_DATA_SECTION): Call som_readonly_data_section when not PIC. + (SUPPORTS_SOM_COMDAT): New define. + (SUPPORTS_ONE_ONLY): True if SUPPORTS_WEAK or SUPPORTS_SOM_COMDAT. + (MAKE_DECL_ONE_ONLY): Rework common support. + +2004-12-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR target/17643 + * pa.c (pa_function_ok_for_sibcall): Sibcalls are not ok when + generating code for the portable runtime. + +2004-12-25 Alan Modra <amodra@bigpond.net.au> + + PR target/19147 + * config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8): Delete. + +2004-12-23 Richard Henderson <rth@redhat.com> + + PR c/18282 + * c-decl.c (finish_enum): Retain precision acquired from an attribute. + +2004-12-23 Alexandre Oliva <aoliva@redhat.com> + + PR target/16819 + * calls.c (load_register_parameters): Don't call use_regs when + nregs is zero. + +2004-12-22 Richard Henderson <rth@redhat.com> + + PR target/19102 + * config/i386/i386.c (x86_inter_unit_moves): Disable. + (ix86_hard_regno_mode_ok): Disallow SSE2 and MMX scalar modes + in SSE registers when only SSE1 enabled. + +2004-12-21 David O'Brien <obrien@FreeBSD.org> + + Backport from mainline: + * config/freebsd-spec.h: Use KSE pthread lib for -pthread. + +2004-12-19 Richard Henderson <rth@redhat.com> + + * config/i386/i386.c (ix86_hard_regno_mode_ok): Always accept all SSE, + MMX, 3DNOW modes in SSE registers; always accept all MMX, 3DNOW modes + in MMX registers. + * config/i386/i386.h (VALID_SSE2_REG_MODE): Don't include + VALID_MMX_REG_MODE. + * config/i386/i386.md (movv4sf_internal, movv4si_internal, + movv2di_internal, movv2si_internal, movv4hi_internal, + movv2sf_internal, movv2df_internal, movv8hi_internal, + movv16qi_internal, movti_internal): Add leading '*' to name. + (movv2di_internal, movv2df_internal, movv8hi_internal, + movv16qi_internal, movv2df, movv8hi, movv16qi, movv2di, + pushv2di, pushv8hi, pushv16qi): Enable for SSE1. + (movv2si_internal, movv4hi_internal): Add SSE alternatives. + (movv8qi_internal, movv2sf_internal): Likewise. + (movtf): Simplify conditional. + (movv2sf, pushv2sf): Enable for MMX. + +2004-12-19 Roger Sayle <roger@eyesopen.com> + + PR middle-end/19068 + * expr.c (expand_expr_real_1) <MAX_EXPR>: Ensure that target, op0 + and op1 are all registers (or constants) before expanding the RTL + comparison sequence [to avoid reg_overlap_mentioned (target, op1)]. + +2004-12-18 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR rtl-optimization/16968 + * loop.c (scan_loop): Stop scanning the loop for movable + insns as soon as an optimization barrier is encountered. + +2004-12-16 H.J. Lu <hongjiu.lu@intel.com> + + PR other/18508 + * config/alpha/t-osf4 (SHLIB_LINK): Use `.backup' as the suffix + to back up the existing shared library. + * config/arm/t-netbsd (SHLIB_LINK): Likewise. + * config/mips/t-iris5-6 (SHLIB_LINK): Likewise. + * config/pa/t-hpux-shlib (SHLIB_LINK): Likewise. + * config/sh/t-linux (SHLIB_LINK): Likewise. + * config/t-libunwind-elf (SHLIBUNWIND_LINK): Likewise. + * config/t-slibgcc-darwin (SHLIB_LINK): Likewise. + * config/t-slibgcc-elf-ver (SHLIB_LINK): Likewise. + * config/t-slibgcc-sld (SHLIB_LINK): Likewise. + +2004-12-16 Roger Sayle <roger@eyesopen.com> + + PR middle-end/18493 + * c-typeck.c (c_finish_case): Rechain statements if we didn't + encounter any case labels or a default. + +2004-12-16 Eric Botcazou <ebotcazou@adacore.com> + + PR middle-end/18882 + * function.c (assign_stack_local_1): Use BITS_PER_UNIT alignment + when passed -2 as 'align'. + (put_var_into_stack): Use 'bool' as the type for the three local + predicates. Adjust calls to put_reg_into_stack. + When passed a CONCAT, instruct put_reg_into_stack to use + a consecutive stack slot for the second part. + (put_reg_into_stack): Remove 'promoted_mode' parameter, add + 'consecutive_p' parameter. Turn the three predicates into 'bool' + parameters. Retrieve the register mode from 'reg'. + When consecutive_p is true, instruct assign_stack_local_1 to use + BITS_PER_UNIT alignment. + (put_addressof_into_stack): Use 'bool' as the type for the two + local predicates. Adjust call to put_reg_into_stack. + +2004-12-16 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR middle-end/18590 + * function.c (fixup_var_refs_insns_with_hash): Do not invoke + fixup_var_refs_insn on insns marked as deleted. + +2004-12-15 Richard Henderson <rth@redhat.com> + + PR target/19028 + * config/i386/i386.md (sse compare splitter): Test for SF and DFmode + explicitly instead of using VALID_SSE_REG_MODE. + +2004-12-15 Richard Henderson <rth@redhat.com> + + PR target/19005 + * config/i386/i386.md (swaphi_1): Swap with swaphi_2, allow with + optimize_size. + (swapqi_1): Rename from swapqi. Enable only for no partial reg + stall and optimize_size. + (swapqi_2): New. + (swaphi_1, swaphi_2, swapqi_1): Add athlon_decode. + (swapsi, swaphi_1, swaphi_2, swapqi_1, swapdi): Remove modrm override. + +2004-12-15 H.J. Lu <hongjiu.lu@intel.com> + + PR target/18153 + * configure.ac: Define HAVE_LD_STATIC_DYNAMIC if linker supports + -Bstatic/-Bdynamic option. + * config.in: Regenerated. + * configure: Likewise. + + * gcc.c (init_spec): Pass -Bstatic/-Bdynamic to ld for static + -lunwind if possible. + +2004-12-15 Richard Henderson <rth@redhat.com> + + PR target/19010 + * config/i386/i386.c (gen_reg_or_parallel): New. + (function_arg): Use it. + (ix86_hard_regno_mode_ok): Test SSE1 and SSE2 separately, + MMX and 3DNOW separately. + (ix86_rtx_costs): Simplify FLOAT_EXTEND case. + * config/i386/i386.h (VALID_SSE2_REG_MODE): Move SSE2 cases from ... + (VALID_SSE_REG_MODE): ... here. + * config/i386/i386.md (movv4sf_internal): Validate one MEM. + (movv4si_internal): Likewise. + (movv2di_internal): Likewise. Enable for SSE2 only. + (movv2di): Enable for SSE2 only. + (pushv4si): Enable for SSE1. + +2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR c++/17972 + * tree-inline.c (expand_call_inline): Set TREE_SIDE_EFFECTS + on the STMT_EXPR wrapping up the inlined body. + +2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR preprocessor/15167 + * cppfiles.c (destroy_cpp_file): New function. + (should_stack_file): Make a new file if the + compared file is still stacked. + +2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR other/18665 + * libgcc-std.ver (GCC_3.4.4): Inherit from GCC_3.4.2. + Export __absvti2, __addvti3, __mulvti3, __negvti2 and __subvti3. + * libgcc-darwin.ver (GCC_3.4.4): Inherit from GCC_3.4. + Export __absvti2, __addvti3, __mulvti3, __negvti2 and __subvti3. + * libgcc2.c (__addvsi3): Rename to __addvSI3. + New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC. + (__addvdi3): Rename to __addvDI3. + (__subvsi3): Rename to __subvSI3. Use word type for the result. + New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC. + (__subvdi3): Rename to __subvDI3. + (_mulvsi3): Rename to _mulvSI3. + New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC. + (_mulvdi3): Rename to _mulvDI3. + (__negvsi2): Rename to __negvSI2. + New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC. + (__negvdi2): Rename to __negvDI2. + (__absvsi2): Rename to __absvSI2. + New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC. + (__absvdi2): Rename to __absvDI2. + * libgcc2.h (64-bit targets): Define COMPAT_SIMODE_TRAPPING_ARITHMETIC. + (__absvSI2, __addvSI3, __subvSI3, __mulvSI3, __negvSI2, __absvDI2, + __addvDI3, __subvDI3, __mulvDI3, __negvDI2): Define to the appropriate + symbol and declare. + (__absvsi2, __addvsi3, __subvsi3, __mulvsi3, __negvsi2): Declare if + COMPAT_SIMODE_TRAPPING_ARITHMETIC. + +2004-12-14 Steve Ellcey <sje@cup.hp.com> + + * doc/invoke.texi (IA-64 options): Add existing options that + weren't already listed. + +2004-12-14 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/18951 + * builtins.c (expand_builtin_mathfn, expand_builtin_mathfn_2): Avoid + using arguments passed to save_expr after that call. + +2004-12-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR middle-end/18730 + * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn): When + the first/last insn is a sequence, return the first/last insn of the + sequence. + +2004-12-13 Roger Sayle <roger@eyesopen.com> + + PR target/18002 + PR middle-end/18424 + Backport from mainline + + 2004-03-20 Richard Sandiford <rsandifo@redhat.com> + * Makefile.in (dojump.o): Depend on $(GGC_H) and dojump.h. + (GTFILES): Add $(srcdir)/dojump.h. + (gt-dojump.h): New dependency. + * dojump.c (and_reg, and_test, shift_test): New static variables. + (prefer_and_bit_test): New function. + (do_jump): Use it to choose between (X & (1 << C)) and (X >> C) & 1. + + 2004-03-21 Andrew Pinski <pinskia@gcc.gnu.org> + * dojump.c (prefer_and_bit_test): Fix which part of + the and_test is replaced. + + 2004-12-10 Roger Sayle <roger@eyesopen.com> + * dojump.c (do_jump): When attempting to reverse the effects of + fold_single_bit_test, we need to STRIP_NOPS and narrowing type + conversions, and handle BIT_XOR_EXPR that's used to invert the + sense of the single bit test. + +2004-12-13 Richard Henderson <rth@redhat.com> + + PR target/17990 + * config/i386/i386.md (negsf2): Fix condition for using sse. + (negdf2, abssf2, absdf2): Likewise. + (negsf2_if, abssf2_if): Don't disable if sse enabled. + (movv4sf_internal splitter): Postpone til after reload. + (movv2di_internal splitter): Likewise. + +2004-12-13 Richard Henderson <rth@redhat.com> + + PR middle-end/17930 + * toplev.c (rest_of_compilation): Fix computation of + preferred_incoming_stack_boundary. + +2004-12-12 Richard Henderson <rth@redhat.com> + + PR rtl-opt/17186 + * reg-stack.c (move_for_stack_reg): Handle source register not + live with a nan. + +2004-12-12 Richard Henderson <rth@redhat.com> + + PR target/18932 + * config/i386/i386.md (all splits and peepholes): Use flags_reg_operand + and compare_operator to propagate the input CC mode to the output. + * config/i386/i386.c (compare_operator): New. + * config/i386/i386.h (PREDICATE_CODES): Add it. + * config/i386/i386-protos.h: Update. + +2004-12-09 Richard Henderson <rth@redhat.com> + + PR c/18282 + * attribs.c (decl_attributes): Clear DECL_ALIGN when relaying out decl. + * c-common.c (handle_mode_attribute): Handle enumeral types. + +2004-12-09 Richard Henderson <rth@redhat.com> + + PR target/17025 + * config/i386/i386.md (testqi_1_maybe_si, andqi_2_maybe_si): New. + (test_qi_1, andqi_2): Do not promote to simode. + +2004-12-07 David Mosberger <davidm@hpl.hp.com> + + PR target/18443 + * config/ia64/ia64.c (ia64_assemble_integer): Add support for + emitting unaligned pointer-sized integers. + +2004-12-07 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR middle-end/17827 + * c-semantics.c (expand_unreachable_if_stmt): Invoke + expand_cond on the condition. + +2004-12-06 Aldy Hernandez <aldyh@redhat.com> + + * config/rs6000/sysv4.h: Define RELOCATABLE_NEEDS_FIXUP to 1. + +2004-12-05 Richard Henderson <rth@redhat.com> + + PR target/18841 + * config/alpha/alpha.md (UNSPECV_SETJMPR_ER): New. + (builtin_setjmp_receiver_er_sl_1): Use it. + (builtin_setjmp_receiver_er_1): Likewise. + (builtin_setjmp_receiver_er, exception_receiver_er): Remove. + (builtin_setjmp_receiver): Don't split for explicit relocs until + after reload. + (exception_receiver): Likewise. + +2004-12-05 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/rs6000.c (rs6000_assemble_integer): Fix typo. + +2004-12-04 Richard Henderson <rth@redhat.com> + + * emit-rtl.c, expr.c, function.c, integrate.c, optabs.c, rtl.h: + Revert the patches for PR rtl-opt/15289. + +2004-12-03 Eric Botcazou <ebotcazou@adacore.com> + + * integrate.c (expand_inline_function): Accept non-CONCAT arguments + for CONCAT parameters and invoke read_complex_part on them. + +2004-12-02 Richard Henderson <rth@redhat.com> + + * expr.c (write_complex_part): Use simplify_gen_subreg when the + submode is at least as large as a word. + (read_complex_part): Likewise. + +2004-12-02 Roger Sayle <roger@eyesopen.com> + + PR target/9908 + * config/i386/i386.md (*call_value_1, *sibcall_value_1): Correct + Intel assembler syntax by using %A1 instead of %*%1. + +2004-12-02 Richard Henderson <rth@redhat.com> + + PR rtl-opt/15289 + * emit-rtl.c (gen_complex_constant_part): Remove. + (gen_realpart, gen_imagpart, subreg_realpart_p): Remove. + * expr.c (write_complex_part, read_complex_part): New. + (emit_move_via_alt_mode, emit_move_via_integer, emit_move_resolve_push, + emit_move_complex_push, emit_move_complex, emit_move_ccmode, + emit_move_multi_word): Split out from ... + (emit_move_insn_1): ... here. + (expand_expr_real) <COMPLEX_EXPR>: Use write_complex_part. + <REALPART_EXPR, IMAGPART_EXPR>: Use read_complex_part. + <CONJ_EXPR>: Likewise. + * function.c (assign_parms): Hard-code transformations + instead of using gen_realpart/gen_imagpart. + * integrate.c (initialize_for_inline): Likewise. + * optabs.c (expand_unop): Use read_complex_part/write_complex_part. + (expand_complex_abs): Likewise. + (expand_binop): Likewise. Rearrange to build a CONCAT at the end, + rather than creating a complex target at the beginning. + * rtl.h (gen_realpart, gen_imagpart, subreg_realpart_p): Remove. + (read_complex_part, write_complex_part): Declare. + +2004-12-02 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/rs6000.c (rs6000_assemble_integer): Put back the + #ifdef RELOCATABLE_NEEDS_FIXUP. + +2004-12-01 Nathanael Nerode <neroden@gcc.gnu.org> + + PR preprocessor/17651 + * c-opts.c (sanitize_cpp_opts): Make flag_no_output imply + flag_no_line_commands. + * c-ppoutput.c (pp_file_change): Remove now-redundant check of + flag_no_output. + + PR preprocessor/17610 + * directives.c (do_include_common): Error out if an empty filename + is given for #include (or #include_next or #import). + PR preprocessor/17610 + * testsuite/gcc.dg/cpp/empty-include.c: New testcase. + +2004-12-02 Alan Modra <amodra@bigpond.net.au> + + PR target/16952 + * config/rs6000/rs6000.c (rs6000_assemble_integer): Replace + #ifdef RELOCATABLE_NEEDS_FIXUP with if. + * config/rs6000/linux.h (RELOCATABLE_NEEDS_FIXUP): Define in terms + of target_flags_explicit. + * config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Ditto for biarch + case. Define as 0 for non-biarch. + +2004-12-01 Richard Henderson <rth@redhat.com> + + * expr.c (optimize_bitfield_assignment_op): Split out from ... + (expand_assignment): ... here. Use handled_component_p to gate + get_inner_reference code. Simplify MEM handling. Special case + CONCAT destinations. + (get_inner_reference): Handle REAL/IMAGPART_EXPR. + (handled_component_p): Likewise. + +2004-12-01 Alan Modra <amodra@bigpond.net.au> + + PR target/12817 + * config/rs6000/rs6000.c (rs6000_emit_prologue): Use r0 for vrsave. + +2004-11-30 Jakub Jelinek <jakub@redhat.com> + + * fold-const.c (extract_muldiv_1) <case ABS_EXPR>: If ctype is + unsigned and type signed, build ABS_EXPR with signed_type (ctype) + and only afterwards convert to ctype. + +2004-11-29 Richard Henderson <rth@redhat.com> + + PR target/17224 + * config/ia64/ia64.c (sdata_symbolic_operand): Deny offsets + outside the referenced object. + +2004-11-28 Andreas Fischer <a_fisch@gmx.de> + Alan Modra <amodra@bigpond.net.au> + + PR target/16343 + * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Disallow + functions, strings and thread-local vars. + +2004-11-27 Alan Modra <amodra@bigpond.net.au> + + PR target/12769 + * config/rs6000/rs6000.c (init_cumulative_args): Set call_cookie + from rs6000_default_long_calls for libcalls. + + PR target/18686 + * config/rs6000/rs6000-c.c (rs6000_pragma_longcall): Use + integer_zerop and integer_onep instead of comparing against + canonical trees. + +2004-11-25 Richard Henderson <rth@redhat.com> + + PR c++/6764 + * reload1.c (set_initial_eh_label_offset): New. + (set_initial_label_offsets): Use it. + +2004-11-26 Alan Modra <amodra@bigpond.net.au> + + PR rtl-optimization/16356 + * config/rs6000/rs6000.md (floatdisf2_internal2): Rewrite with + separate output register and one less jump. Enable for powerpc64. + (floatdisf2): Adjust for above. + +2004-11-25 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config.gcc (avr-*-rtems*): Fix typo. + +2004-11-24 Uros Bizjak <uros@kss-loka.si> + + PR rtl-optimization/18614 + * simplify-rtx.c (simplify_binary_operation): Do not + simplify inner elements of constant arguments of + VEC_CONCAT insn. + +2004-11-23 Eric Botcazou <ebotcazou@libertysurf.fr> + + Backport from mainline: + 2004-10-18 Eric Botcazou <ebotcazou@libertysurf.fr> + Roger Sayle <roger@eyesopen.com> + + PR middle-end/17813 + * dojump.c (discard_pending_stack_adjust): New function. + (clear_pending_stack_adjust): Call it. + * expr.h (discard_pending_stack_adjust): Declare it. + * explow.c (emit_stack_save): Emit pending stack adjustments + before saving the stack pointer. + (emit_stack_restore): Discard pending stack adjustments before + restoring the stack pointer. + +2004-11-23 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config/c4x/t-rtems: New. + * config.gcc: Reflect having added c4x/t-rtems. + +2004-11-23 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config/arm/t-rtems: New. + * config.gcc: Reflect having added arm/t-rtems. + +2004-11-23 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config.gcc: Add avr-*-rtems*. + * config/avr/t-rtems: New. + * config/avr/rtems.h: New. + +2004-11-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR rtl-optimization/14838 + * emit-rtl.c (get_first_nonnote_insn): Don't assume first insn is a + note. + (get_last_nonnote_insn): Don't assume last insn is a note. + +2004-11-21 Roger Sayle <roger@eyesopen.com> + + * fixinc/inclhack.def (alpha_pthread_init): Fix technical problems + with the last check-in caused by CVS variable substitution. + * fixinc/fixincl.x: Likewise. + * fixinc/tests/base/pthread.h: Likewise. + +2004-11-21 Roger Sayle <roger@eyesopen.com> + Bruce Korb <bkorb@gnu.org> + + Synchronize with mainline + * fixinc/inclhack.def (alpha_pthread_init): New fix. + * fixinc/fixincl.x: Regenerate. + * fixinc/tests/base/pthread.h: Update for new test. + +2004-11-17 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com> + + PR target/18263 + * config/arc/lib1funcs.asm (___umulsidi3): Change use of cmp to the + equivalent on the A4. + +2004-11-16 Joseph S. Myers <joseph@codesourcery.com> + + PR c/18498 + * c-decl.c (grokdeclarator): Call check_bitfield_type_and_width + after processing the declarator. + +2004-11-14 Andrew Pinski <pinskia@physics.uc.edu> + + PR objc/18406 + * objc/obj-act.c (encode_type): 96bits doubles are encoded the + same way as 64bit and 128bit doubles are. + +2004-11-14 Hans-Peter Nilsson <hp@bitrange.com> + + PR target/18347 + * config/mmix/mmix.c (mmix_function_outgoing_value): Handle + TImode. Sorry for other non-complex larger-than-64-bit modes. + * config/mmix/mmix.h (MIN_UNITS_PER_WORD): Do not define. + (INIT_CUMULATIVE_ARGS): Correct unused macro name FNDECL. + +2004-11-13 Eric Botcazou <ebotcazou@libertysurf.fr> + + * doc/md.texi (constraints) <% modifier>: Mention that it is + useless when the two alternatives are strictly identical. + +2004-11-12 Richard Henderson <rth@redhat.com> + + PR 17778 + * config/i386/i386.h (TARGET_96_ROUND_53_LONG_DOUBLE): New. + * config/i386/freebsd.h (SUBTARGET_OVERRIDE_OPTIONS): Remove. + (TARGET_96_ROUND_53_LONG_DOUBLE): New. + * config/i386/i386-modes.def (XF): Use it. + +2004-11-12 Ralf Corsepius <ralf.corsepius@rtems.org> + + * config/rs6000/t-rtems (MULTILIB_NEW_EXCEPTIONS_ONLY): + Remove m505/roe multilib variant. + +2004-11-12 Eric Botcazou <ebotcazou@act-europe.fr> + + Backport from mainline: + 2004-02-25 Richard Henderson <rth@redhat.com> + + * config/alpha/alpha.c (alpha_emit_conditional_branch): Don't + use (op0-op1) == 0 if op0 is a pointer. + +2004-11-10 Joseph S. Myers <joseph@codesourcery.com> + + PR c/18322 + * c-common.c (fname_decl): Don't use line number of decl in + diagnostic. + +2004-11-10 Eric Botcazou <ebotcazou@libertysurf.fr> + + * config/sparc/sparc.c (function_arg_union_value): New 'slotno' + argument. Return naked register for unions with zero length. + When the union is passed in the 6th slot, build a PARALLEL with + only one element. + (function_arg): Adjust call to function_arg_union_value. + (function_value): Likewise. + +2004-11-09 H.J. Lu <hongjiu.lu@intel.com> + + PR target/18380 + * config/ia64/unwind-ia64.h (_Unwind_FindTableEntry): Mark it + hidden. + + * unwind-dw2.c (_Unwind_FindTableEntry): Removed. + +2004-11-10 Alan Modra <amodra@bigpond.net.au> + + PR target/16480 + 2004-08-26 Alan Modra <amodra@bigpond.net.au> + * config/rs6000/rs6000.c (rs6000_split_multireg_move): Don't abort + on "(mem (symbol_ref ..))" rtl. Look at LO_SUM base regs as well + as PLUS base regs. + 2004-08-01 Geoffrey Keating <geoffk@apple.com> + * config/rs6000/rs6000.c (rs6000_split_multireg_move): Just abort + if trying to *store* to a non-offsettable address. + 2004-07-30 Geoffrey Keating <geoffk@apple.com> + * config/rs6000/rs6000.c (rs6000_split_multireg_move): Cope with + non-offsettable addresses being moved into multiple GPRs. + +2004-11-07 Richard Sandiford <rsandifo@redhat.com> + + * config/mips/t-iris6 (tp-bit.c): Fix target filename. + +2004-11-07 Mark Mitchell <mark@codesourcery.com> + + * version.c (version_string): Set to 3.4.4. + * doc/include/gcc-common.texi (version): Likewise. + +2004-11-04 Release Manager + + * GCC 3.4.3 released. + +2004-10-31 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/18129 + * varasm.c (copy_constant): Don't copy STRING_CSTs if + flag_writable_strings. + (build_constant_desc): Call copy_constant unconditionally. + +2004-10-30 Roger Sayle <roger@eyesopen.com> + + PR rtl-optimization/17581 + * cselib.c (cselib_process_insn): The last instruction of a libcall + block, with the REG_RETVAL note, should be considered in the libcall. + * gcse.c (do_local_cprop): Allow constants to be propagated outside + of libcall blocks. + (adjust_libcall_notes): Use simplify_replace_rtx instead of + replace_rtx to avoid creating invalid RTL in REG_RETVAL notes. + +2004-10-27 Andrew Pinski <pinskia@physics.uc.edu> + + PR other/18186 + * common.opt (--param): Fix spelling of parameter. + +2004-10-27 Andreas Krebbel <krebbel1@de.ibm.com> + + * config/s390/s390.md ("*subdf3_cc"): Replaced plus by minus. + +2004-10-26 Richard Sandiford <rsandifo@redhat.com> + + PR bootstrap/15747 + * doc/install.texi (mips-sgi-irix5): Document that /bin/sh has been + reported to hang during bootstrap and that CONFIG_SHELL=/bin/ksh + can be used to work around this. + +2004-10-26 Roger Sayle <roger@eyesopen.com> + John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + Backport 3.4 regression fix from mainline + * cse.c: Change encoding of quantity numbers to avoid undefined + pointer arithmetic on qty_table. + (REGNO_QTY_VALID_P): A quantity is now valid if it isn't negative. + (get_cse_reg_info): Initialize reg_qty to a unique negative value. + (new_basic_block): Assign "real" quantity numbers from zero. + (delete_reg_equiv): Do nothing if quantity is invalid. Reset the + REG_QTY to its unique negative value. + (merge_equiv_classes): Calculate need_rehash if quantity is valid. + (cse_main): Don't include max_reg when determining max_qty. + (cse_basic_block): Avoid subtracting a large offset from qty_table, + which causes undefined C99 behaviour. Only allocate needed memory. + +2004-10-25 Jakub Jelinek <jakub@redhat.com> + + * dwarf2out.c (rtl_for_decl_location): Avoid segfault if + DECL_INCOMING_RTL is NULL. + +2004-10-21 Eric Christopher <echristo@redhat.com> + + * config/rs6000/rs6000.c (setup_incoming_varargs): Align DFmode + saves. + +2004-10-22 Bernardo Innocenti <bernie@develer.com> + + Backport from the mainline: + 2004-10-22 Peter Barada <peter@the-baradas.com> + * config/m68k/m68k.h (HARD_REGNO_RENAME_OK): New macro. + * config/m68k/m68k.c (m68k_hard regno_rename_ok): Disallow + renaming of non-live registers in interrupt functions. + * config/m68k/m68k-protos.h (m68k_hard_regno_rename_ok): Add prototype. + +2004-10-21 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + * config/arc/lib1funcs.asm (___umulsidi3): Fix typo. + +2004-10-21 Aldy Hernandez <aldyh@redhat.com> + + PR 18004. + * expmed.c (store_bit_field): Pass original 'value' before + recursing. + +2004-10-21 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com> + + * config/arc/lib1funcs.asm (___umulsidi3): Correct usage of flags. + + PR target/17317 + * config/arc/arc.h (REGNO_OK_FOR_BASE_P,REGNO_OK_FOR_INDEX_P, + REG_OK_FOR_BASE, REG_OK_FOR_INDEX): Consider blink(r31) as a valid + base and index register for loads. + + * config/arc/t-arc: Fix multilib handling. + +2004-10-18 H.J. Lu <hongjiu.lu@intel.com> + + PR bootstrap/17684 + * Makefile.in (clean): Remove libgcc_s$(SHLIB_EXT).1.stage?. + (stage1-start): Remove and copy libunwind.a and + libunwind*$(SHLIB_EXT) instead of libunwind*. + (stage2-start): Likewise. + (stage3-start): Likewise. + (stage4-start): Likewise. + (stageprofile-start): Likewise. + (stagefeedback-start): Likewise. + + * config/alpha/t-osf4 (SHLIB_LINK): Use a temporary file for + the shared library to be created and don't remove the existing + shared library. + * config/arm/t-netbsd (SHLIB_LINK): Likewise. + * config/mips/t-iris5-6 (SHLIB_LINK): Likewise. + * config/pa/t-hpux-shlib (SHLIB_LINK): Likewise. + * config/sh/t-linux (SHLIB_LINK): Likewise. + * config/t-libunwind-elf (SHLIBUNWIND_LINK): Likewise. + * config/t-slibgcc-darwin (SHLIB_LINK): Likewise. + * config/t-slibgcc-elf-ver (SHLIB_LINK): Likewise. + * config/t-slibgcc-sld (SHLIB_LINK): Likewise. + + * mklibgcc.in (libgcc-stage-start): Also move "*${objext}s" + files. + +2004-10-18 Jakub Jelinek <jakub@redhat.com> + + * config/i386/i386.md (addqi_1_slp): Test for incdec_operand + operand 1 instead of 2 + +2004-10-17 David O'Brien <obrien@FreeBSD.org> + + * config/rs6000/sysv4.h (LINK_OS_FREEBSD_SPEC): Sync '-p' handling with + other FreeBSD platforms. + +2004-10-14 Richard Henderson <rth@redhat.com> + + PR debug/14492 + * dwarf2out.c (loc_descriptor_from_tree): Handle FIX_*_EXPR. + +2004-10-14 Richard Henderson <rth@redhat.com> + + PR c/17023 + * c-parse.in (compstmt_primary_start): Check last_tree non-null, + not current_function_decl non-null. + +2004-10-14 Roger Sayle <roger@eyesopen.com> + + PR other/17361 + * c-opts.c (c_common_init_options): Scan command line options for + "-lang-asm" and if found allow any of the C-family front-end options. + Likewise, scan all command line options for g77's -traditional-cpp. + +2004-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * doc/install.texi (*-*-solaris2*): Update with info about kernel + patches to solve spurious testsuite failures. + +2004-10-13 Andrew Pinski <pinskia@physics.uc.edu> + + * dwarf2out.c (rtl_for_decl_location): Do not use MEM_P but use + GET_CODE == MEM. + +2004-10-13 Richard Henderson <rth@redhat.com> + + PR debug/15860 + * dwarf2out.c (rtl_for_decl_location): Apply big-endian correction + for DECL_INCOMING_RTL. + +2004-10-13 Richard Henderson <rth@redhat.com> + + PR c/17384 + * c-common.c (handle_mode_attribute): Disallow mode changes that + alter the CODE of the top-level type. + + * crtstuff.c (__FRAME_END__): Remove mode attribute. Find 32-bit + integer from internal limits macros. + * config/i386/emmintrin.h (__v2df): Fix base type. + * config/i386/xmmintrin.h (__m128, __v4sf): Likewise. + +2004-10-13 Richard Henderson <rth@redhat.com> + + PR debug/13841 + * function.c (instantiate_decl): Recurse for CONCAT. + +2004-10-13 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR target/14454 + * config/sparc/sparc.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Set to + sparc_can_output_mi_thunk. + (sparc_output_mi_thunk): Simplify handling of delta offset. Add + handling of vcall offset. + (sparc_can_output_mi_thunk): New predicate. + * doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Document VCALL_OFFSET. + (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Delete. + (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New target hook. + + * config/sparc/sparc.md (movdi): Remove redundant test. + +2004-10-12 Richard Henderson <rth@redhat.com> + + PR rtl-opt/17503 + * regclass.c (subregs_of_mode): Turn into an htab. Make static. + (som_hash, som_eq): New. + (init_subregs_of_mode, record_subregs_of_mode): New. + (cannot_change_mode_set_regs): Rewrite for htab implementation. + (invalid_mode_change_p): Likewise. + * combine.c (gen_lowpart_for_combine): Use record_subregs_of_mode. + * flow.c (mark_used_regs): Likewise. + (life_analysis): Use init_subregs_of_mode. + * regs.h (subregs_of_mode): Remove. + * rtl.h (init_subregs_of_mode, record_subregs_of_mode): Declare. + +2004-10-10 Roger Sayle <roger@eyesopen.com> + + PR rtl-optimization/17853 + * combine.c (combine_simplify_rtx): Don't attempt any simplifications + of vector mode comparison operators. + * cse.c (fold_rtx): Likewise. + * simplify-rtx.c (simplify_gen_relational): Avoid calling + simplify_relational_operation with vector mode comparison operators. + (simplify_rtx): Likewise. + +2004-10-09 Joseph S. Myers <joseph@codesourcery.com> + + * config/rs6000/spe.h (atosfix16, atosfix32, atosfix64, atoufix16, + atoufix32, atoufix64, strtosfix16, strtosfix32, strtosfix64, + strtoufix16, strtoufix32, strtoufix64): Declare. + +2004-10-08 Andrew Pinski <pinskia@physics.uc.edu> + + PR c/16999 + * c-ppoutput.c (cb_ident): Don't quote string as it is already + quoted. + +2004-10-08 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR target/17245 + * config/sparc/sparc.c (input_operand): Remove redundant code + for handling LO_SUM. + (legitimate_address_p) <REG+REG>: Do not recheck TARGET_V9. + <LO_SUM>: If LO_SUM is offsettable, accept it for TFmode on V9. + Otherwise only accept it for TFmode if quad move insns are available. + +2004-10-07 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/17115 + * tree-inline.c (expand_call_inline): Do not warn for functions + marked with attribute noinline. + +2004-10-07 Eric Botcazou <ebotcazou@libertysurf.fr> + + * doc/install.texi (*-*-solaris2*): Fix marker for URL. + +2004-10-07 Richard Sandiford <rsandifo@redhat.com> + + PR target/17770 + * config/mips/mips.md (mov_lwl): Remove hazard=none attribute. + +2004-10-07 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR rtl-optimization/17027 + Backport from mainline: + * cfglayout.c (fixup_fallthru_exit_predecessor): If the first block + falls through to exit, split it. + * cfgrtl.c (rtl_split_block): If no insn is specified, split on the + first insn in the basic block. + +2004-10-06 H.J. Lu <hongjiu.lu@intel.com> + + * doc/invoke.text (freorder-functions): Add a leading `.' to + "text.hot" and "text.unlikely" sections. + +2004-10-06 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR target/16007 + * doc/install.texi (*-*-solaris2*): Mention potential problem + with Sun assembler + GNU linker and C++ programs. + Document status of binutils 2.15 release. + +2004-10-06 Alan Modra <amodra@bigpond.net.au> + + PR 16406 + * doc/tm.texi (LIBGCC_SPEC): Mention modifications. + (USE_LD_AS_NEEDED, LINK_EH_SPEC): Document. + +2004-10-03 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/linux.h (TARGET_C99_FUNCTIONS): Define. + (OS_MISSING_POWERPC64): Move, and comment. + * config/rs6000/linux64.h (TARGET_C99_FUNCTIONS): Define. + (OS_MISSING_POWERPC64): Move, and comment. + +2004-10-01 Nick Clifton <nickc@redhat.com> + + * config/stormy16/stormy16.c (TARGET_BUILD_BUILTIN_VA_LIST_TYPE): + Fix typo in macro name, it should be: TARGET_BUILD_BUILTIN_VA_LIST. + +2004-09-30 Richard Henderson <rth@redhat.com> + + * config/alpha/qrnnd.asm: Mark for noexecstack. + +2004-09-30 Richard Henderson <rth@redhat.com> + + * unwind-dw2.c (_Unwind_GetGR): Honor DWARF_ZERO_REG. + * doc/tm.texi (DWARF_ZERO_REG): New. + + * config/alpha/alpha.c (alpha_sa_mask, alpha_expand_prologue, + alpha_expand_epilogue): Revert 2003-09-30 change to store zero. + * config/alpha/alpha.h (DWARF_ZERO_REG): New. + +2004-09-29 David Edelsohn <edelsohn@gnu.org> + + PR target/17493 + Backport from mainline + 2004-07-16 Segher Boessenkool <segher@kernel.crashing.org> + * config/rs6000/eabi.asm (__eabi_convert): Fix typo (cmpi vs. cmpwi). + +2004-09-28 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR target/14064 + Backport from mainline + 2004-09-01 James E Wilson <wilson@specifixinc.com> + * config/avr/avr.c (avr_unique_section): Delete prototype and + definition. + (TARGET_ASM_UNIQUE_SECTION): Delete. + +2004-09-26 Roger Sayle <roger@eyesopen.com> + + PR other/15526 + Backport from mainline + 2004-05-20 Falk Hueffner <falk@debian.org> + * libgcc2.c (__mulvsi3): Fix overflow test. + +2004-09-24 Roger Sayle <roger@eyesopen.com> + + PR rtl-optimization/9771 + * regclass.c (CALL_REALLY_USED_REGNO_P): New macro to eliminate + conditional compilation in init_reg_sets_1. + (init_reg_sets_1): Let global_regs[i] take priority over the frame + (but not stack) pointer exceptions to regs_invalidated_by_call. + (globalize_reg): Globalizing a fixed register may need to update + regs_invalidated_by_call. + +2004-09-23 Denis Chertykov <denisc@overta.ru> + + PR target/16884 + * config/avr/avr.md ("movmemhi"): Substitute match_dup to + match_scratch. + (*movmemqi_insn): Likewise. + (*movmemhi): Likewise. + (clrmemhi): Likewise. + (*clrmemqi): Likewise. + (*clrmemhi): Likewise. + +2004-09-23 H.J. Lu <hongjiu.lu@intel.com> + + PR bootstrap/17369 + * Makefile.in (@set_gcc_lib_path@): Added. + + * configure.ac: Include ../config/gcc-lib-path.m4. Use + TL_AC_GNU_MAKE_GCC_LIB_PATH. + * configure: Regenerated. + +2004-09-23 Joseph S. Myers <jsm@polyomino.org.uk> + + PR c/16566 + * c-typeck.c (build_component_ref): Don't special-case + COMPOUND_EXPR. + +2004-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de> + + PR target/15583 + * config/rs6000/rtems.h (TARGET_OS_CPP_BUILTINS): Add + builtin_define ("__USE_INIT_FINI__"). + +2004-09-20 Richard Sandiford <rsandifo@redhat.com> + + PR target/17565 + * config/mips/mips.md (define_asm_attributes): Set can_delay to no. + +2004-09-15 James E Wilson <wilson@specifixinc.com> + + PR target/17455 + * config/ia64/ia64.c (ia64_function_ok_for_sibcall): Return false + if current_function_decl is a sibcall. + +2004-09-15 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Save + location of CR. + * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Ditto. + +2004-09-15 Eric Botcazou <ebotcazou@libertysurf.fr> + + * doc/install.texi (sparc-sun-solaris2*): Properly format warning. + +2004-09-14 Richard Henderson <rth@redhat.com> + + PR rtl-opt/17186 + * function.c (expand_function_end): Revert last change. + + * sibcall.c (call_ends_block_p): Fix thinko finding the + last real insn in a block. + +2004-09-14 Joseph S. Myers <jsm@polyomino.org.uk> + + PR c/15498 + * doc/invoke.texi (Environment Variables): Correct example locale. + +2004-09-14 Daniel Jacobowitz <dan@debian.org> + + * reload.c (find_reloads): Swap operand_loc pointers for + find_dummy_reload if we have swapped two operands. + +2004-09-13 Richard Henderson <rth@redhat.com> + + PR inline-asm/6806 + * cselib.c (cselib_invalidate_rtx): Export. Remove unused args. + (cselib_invalidate_rtx_note_stores): New. + (cselib_record_sets, cselib_process_insn): Update to match. + * cselib.h (cselib_invalidate_rtx): Declare. + * postreload.c (reload_cse_simplify): Invalidate asm clobbers. + +2004-09-11 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com> + + PR target/11476 + * gcc/config/arc/arc.c (arc_va_args): Call build1 instead + of build for unary tree operators. + +2004-09-11 Andrew Pinski <apinski@apple.com> + + PR target/17167 + backport from the mainline: + 2004-02-28 Andrew Pinski <pinskia@physics.uc.edu> + * config/darwin.h (machopic_finish): Output stub even if + the symbol is already defined. + 2004-02-27 Dale Johannesen <dalej@apple.com> + * config/darwin.c (machopic_output_possible_stub_label): + Remove. + config/darwin-protos.h: Ditto. + config/darwin.h: Remove call to it. + +2004-09-11 David Edelsohn <edelsohn@gnu.org> + + PR target/17277 + * config/rs6000/aix.h (MD_FROB_UPDATE_CONTEXT): Use __64BIT__ to + choose 64-bit version. + +2004-09-09 Kaz Kojima <kkojima@gcc.gnu.org> + + PR 15886 + Backport from mainline: + 2004-06-11 J"orn Rennecke <joern.rennecke@superh.com> + + * sh.h (ALLOCATE_INITIAL_VALUE): Use return_address_pointer_rtx. + +2004-09-09 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/rs6000.c (rs6000_stack_info): Correct alignment of + save_size. + +2004-09-08 H.J. Lu <hongjiu.lu@intel.com> + + * configure: Regenerated. + +2004-09-08 Richard Henderson <rth@redhat.com> + + PR rtl-opt/17186 + * function.c (expand_function_end): Have fall-off-the-end + return path jump around return register setup. + +2004-09-08 H.J. Lu <hongjiu.lu@intel.com> + + PR target/14925: + Makefile.in (LIB2ADDEHSTATIC): New. + (LIB2ADDEHSHARED): New. + (LIBUNWIND): New. + (LIBUNWINDDEP): New. + (SHLIBUNWIND_LINK): New. + (SHLIBUNWIND_INSTALL): New. + (libgcc.mk): Pass LIB2ADDEHSTATIC, LIB2ADDEHSHARED, LIBUNWIND, + LIBUNWINDDEP, SHLIBUNWIND_LINK and SHLIBUNWIND_INSTALL. + (clean): Remove libunwind* + (stage1-start): Remove and copy stage1/libunwind*. + (stage2-start): Remove and copy stage2/libunwind*. + (stage3-start): Remove and copy stage3/libunwind*. + (stage4-start): Remove and copy stage4/libunwind*. + (stageprofile-start): Remove and copy stageprofile/libunwind*. + (stagefeedback-start): Remove and copy stagefeedback/libunwind*. + + * config.gcc (ia64*-*-linux*): Always add t-libunwind to + tmake_file. Add t-libunwind-elf and ia64/t-glibc-libunwind to + tmake_file if --with-system-libunwind isn't used. + + * config/ia64/t-glibc-libunwind: New file. + * config/t-libunwind-elf: Likewise. + * unwind-compat.c: Likewise. + * unwind-compat.h: Likewise. + * unwind-dw2-fde-compat.c: Likewise. + + * config/ia64/t-glibc (LIB2ADDEH): Updated. + * config/ia64/t-hpux (T_CFLAGS): Add -DUSE_LIBUNWIND_EXCEPTIONS. + + * config/ia64/unwind-ia64.c: Include "unwind-compat.h". Define + aliases if needed. + * unwind-dw2-fde-glibc.c: Likewise. + * unwind-dw2.c: Likewise. + + * config/t-libunwind (LIB2ADDEH): Updated. + (LIB2ADDEHSTATIC): New. + (T_CFLAGS): Add -DUSE_LIBUNWIND_EXCEPTIONS. + (TARGET_LIBGCC2_CFLAGS): Set to -DUSE_GAS_SYMVER. + + * configure.ac: Change --enable-libunwind-exceptions to + --with-system-libunwind. Don't define USE_LIBUNWIND_EXCEPTIONS. + * configure: Regenerated. + * config.in: Updated. + + * doc/install.texi (ia64-*-linux): Require libunwind 0.98 or + above and mention --with-system-libunwind. + (ia64-*-hpux*): Mention --enable-libunwind-exceptions is + removed in gcc 3.4.3 and later. + + * gcc.c (init_spec): Add -lunwind to -lgcc_s if + USE_LIBUNWIND_EXCEPTIONS is defined. + + * mklibgcc.in: Support libunwind. + +2004-09-07 Mark Mitchell <mark@codesourcery.com> + + * version.c (version_string): Restore pre-release marker. + * doc/include/gcc-common.texi: Set version to 3.4.3. + +2004-09-06 Release Manager + + * GCC 3.4.2 released. + +2004-09-05 Mark Mitchell <mark@codesourcery.com> + + PR bootstrap/17325 + Backport from mainline + 2004-06-23 Wu Yongwei <adah@sh163.net> + * gthr-win32.h (__GTHREAD_MUTEX_INIT_DEFAULT): Adjust. + (__gthr_i486_lock_cmp_xchg): New inline assembly function. + (__GTHR_W32_InterlockedCompareExchange): New macro to choose a + suitable function for interlocked compare-and-exchange. + (__gthread_mutex_trylock): Use + __GTHR_W32_InterlockedCompareExchange. + (__gthread_mutex_init_function, __gthread_mutex_lock, + __gthread_mutex_trylock, __gthread_mutex_unlock): Adjust the + initial counter value to work correctly under Windows 95. + * config/i386/gthr-win32.c: Adjust include order. + Define __GTHREAD_I486_INLINE_LOCK_PRIMITIVES before including + gthr-win32.h. + (__gthr_win32_mutex_init_function, __gthr_win32_mutex_lock, + __gthr_win32_mutex_trylock, __gthr_win32_mutex_unlock): Adjust + to match inline versions in gthr-win32.h. + + 2004-04-27 Wu Yongwei <adah@sh163.net> + * gthr-win32.h (__gthread_mutex_t): Change typedef to new structure. + (__GTHREAD_MUTEX_INIT_DEFAULT): Adjust. + (__gthread_mutex_init_function): Replace CreateMutex with + initialization of custom mutex using CreateSemaphore. + (__gthread_mutex_lock): Use InterlockedIncrement. + (__gthread_mutex_trylock): Use InterlockedCompareExchange. + (__gthread_mutex_unlock): Use InterlockedDecrement and + ReleaseSemaphore to unlock + * config/i386/gthr-win32.c (__gthread_mutex_init_function, + __gthread_mutex_lock, __gthread_mutex_trylock, + __gthread_mutex_unlock): Adjust to match inline versions in + gthr-win32.h. + +2004-09-03 Kaz Kojima <kkojima@gcc.gnu.org> + + PR target/17303 + Backport from mainline: + 2004-08-31 Kaz Kojima <kkojima@gcc.gnu.org> + + * config/sh/sh.c (output_branch): Check the insn length possibly + in the delayed slot. + +2004-09-01 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> + + PR rtl-optimization/16408 + * gcse.c (replace_store_insn): Fix LIBCALL/RETVAL notes. + +2004-09-01 Richard Henderson <rth@redhat.com> + + * config/ns32k/ns32k.h (TRANSFER_FROM_TRAMPOLINE): Remove. + (TRAMPOLINE_TEMPLATE): Merge code from __trampoline inline. + +2004-09-01 Jakub Jelinek <jakub@redhat.com> + + * libgcc-std.ver (GCC_3.4.2): Export also __trampoline_setup. + +2004-09-01 Jakub Jelinek <jakub@redhat.com> + + * fold-const.c (operand_equal_p): Require equal sign also for + FIX_{CEIL,TRUNC,FLOOR,ROUND}_EXPR. + +2004-08-31 Jeff Law <law@redhat.com> + + * gcse.c (remove_reachable_equiv_notes): Scan loops where + the store expression is killed for REG_EQUAL/REG_EQUIV notes + that need to be removed. + +2004-08-30 Mark Mitchell <mark@codesourcery.com> + + Revert: + 2004-08-29 Mark Mitchell <mark@codesourcery.com> + PR rtl-optimization/16590 + * gcse.c (pre_delete): Do not create invalid REG_EQUAL notes. + +2004-08-29 Mark Mitchell <mark@codesourcery.com> + + PR rtl-optimization/16590 + * gcse.c (pre_delete): Do not create invalid REG_EQUAL notes. + +2004-08-26 Richard Henderson <rth@redhat.com> + + * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Allow complex float + modes. + +2004-08-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> + + PR target/17119. + * config/m32r.c (gen_compare): Use reg_or_int16_operand when + checking for a valid constant, regardless of sign. + +2004-08-25 Richard Henderson <rth@redhat.com> + + PR target/16974 + * config/alpha/alpha.md (adddi_fp_hack): Don't rely on splitting + if the constant satisfies add_operand. + +2004-08-25 Richard Henderson <rth@redhat.com> + + PR debug/10695 + * config/alpha/alpha.c (emit_frame_store_1, emit_frame_store): New. + (alpha_expand_prologue): Handle >32-bit frames. Generate proper + unwind info for >16-bit frames. + +2004-08-25 Richard Henderson <rth@redhat.com> + + * config/alpha/alpha.c (alpha_cannot_force_const_mem): New. + (TARGET_CANNOT_FORCE_CONST_MEM): New. + +2004-08-25 Richard Earnshaw <rearnsha@arm.com> + + PR target/15927 + * arm.h (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Don't need a secondary + reload if CLASS is BASE_REGS. + +2004-08-25 Richard Earnshaw <rearnsha@arm.com> + + * PR target/15948 + * arm.md (bicsi3_cbranch): Add alternative to handle tying operands + one and two. + +2004-08-24 Richard Henderson <rth@redhat.com> + + PR target/16298 + * config/i386/i386.c (legitimate_constant_p): Rework to not accept + random codes within CONST. + +2004-08-24 Paolo Bonzini <bonzini@gnu.org> + + PR target/17113 + * config/i386/i386.md (movv16qi_internal): Fix typo. + +2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> + + PR target/17093 + * config/m32r/m32r.md (movsi_sda): Add SI mode specification to + UNSPEC. + +2004-08-24 Jonathan Wakely <redi@gcc.gnu.org> + + * doc/trouble.texi (C++ misunderstandings): Fix example code. + +2004-08-23 Roger Sayle <roger@eyesopen.com> + + PR rtl-optimization/17078 + * c-semantics.c (expand_unreachable_if_stmt): If the end of the + specified statement list is reachable, always return a non-NULL + pointer. If necessary, return error_mark_node. + +2004-08-23 Mark Mitchell <mark@codesourcery.com> + + PR c/14492 + * dwarf2out.c (loc_descriptor_from_tree): Robustify. + + PR c/16180 + * jump.c (duplicate_loop_exit_test): If the location reached by + the unconditional jump at the top of the loop is outside the loop, + then do not treat it as the exit test. + +2004-08-23 Janis Johnson <janis187@us.ibm.com> + + Backports from mainline: + + 2004-02-11 Ziemowit Laski <zlaski@apple.com> + 2004-02-21 Ziemowit Laski <zlaski@apple.com> + 2004-02-27 Ziemowit Laski <zlaski@apple.com> + 2004-03-04 Ziemowit Laski <zlaski@apple.com> + 2004-03-20 Ziemowit Laski <zlaski@apple.com> + 2004-03-24 Ziemowit Laski <zlaski@apple.com> + 2004-05-11 Fariborz Jahanian <fjahanian@apple.com> + 2004-07-23 Janis Johnson <janis187@us.ibm.com> + 2004-08-12 Janis Johnson <janis187@us.ibm.com> + 2004-08-12 Ben Elliston <bje@au.ibm.com> + 2004-08-16 Janis Johnson <janis187@us.ibm.com> + + * c-common.c (vector_size_helper): Remove; call + reconstruct_complex_type() instead. + * hooks.c (hook_constcharptr_tree_null): New hook. + * hooks.h (hook_constcharptr_tree_null): New prototype. + * target-def.h (TARGET_MANGLE_FUNDAMENTAL_TYPE): New target hook. + * target.h (mangle_fundamental_type): New target hook. + * tree.c (reconstruct_complex_type): New function + (formerly vector_size_helper() in c-common.c). + (make_vector): Make externally visible. + * tree.h (reconstruct_complex_type, make_vector): Add prototypes. + * doc/extend.texi (AltiVec builtins): Document additional differences + from the Motorola AltiVec PIM. + * doc/tm.texi (TARGET_MANGLE_FUNDAMENTAL_TYPE): Document. + * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to + SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options. + * config/i386/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): Define it. + * config/rs6000/altivec.h: #error out if '-maltivec' not specified. + (vector, pixel, bool): #define to __vector, __pixel and __bool. + Change vector to __vector (except for the `vector' macro itself). + (__un_args_eq, __bin_args_eq, __tern_args_eq): Move to C-specific + portion of header. + (__altivec_link_error_invalid_argument): Remove prototype; will use + __builtin_altivec_compiletime_error("vec_*") instead. + (vec_*): Fix/complete set of available operation overloads given the + existence of distinct 'vector bool ...' and 'vector pixel' types; + tighten cv-correctness of pointer arguments; in C, always check for + correct argument types before macro expansion. + (vec_splat_s8, vec_splat_s16, vec_splat_s32, vec_splat_u8, + vec_splat_u16, vec_splat_u32): Change C++ definitions to accept a + 'const int' argument; the prototypes already do. + (vec_dst, vec_dstst, vec_dststt, vec_dstt, vec_sld, vec_splat): Add + prototypes, marked with always_inline attribute. + * config/rs6000/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): New macro + defining Darwin/PowerPC-specific '-f[no-]altivec' and + '-W[no-]altivec-long-deprecated' switches. + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Pre-define + '__vector', '__pixel' and '__bool' macros using + '__attribute__((altivec(...)))' types. + * config/rs6000/rs6000.c (bool_char_type_node, bool_short_type_node, + bool_int_type_node, pixel_type_node, bool_V16QI_type_node, + bool_V8HI_type_node, bool_V4SI_type_node, pixel_V8HI_type_node): + New type nodes. + (rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): New, for + handling '-W[no-]altivec-long-deprecated'. + (rs6000_override_options): Handle '-W[no-]altivec-long-deprecated'. + (rs6000_expand_binop_builtin, rs6000_expand_ternop_builtin, + altivec_expand_dst_builtin): Remove casts from integer literals. + (altivec_expand_builtin): Likewise; handle expansion of new + '__builtin_altivec_compiletime_error' function. + (rs6000_init_builtins): Initialize 'vector bool ...' and 'vector pixel' + types, and make them distinct from other vector types; register + '__builtin_altivec_compiletime_error' function. + (print_operand): For 'P', print a full target register name instead of + merely its number. + (rs6000_attribute_table): Add "altivec" attribute. + (rs6000_handle_altivec_attribute): New function. + (rs6000_common_init_builtins): Rename v4si_ftype_char, v8hi_ftype_char, + v16qi_ftype_char, v4sf_ftype_v4si_char, v4si_ftype_v4sf_char, + v4si_ftype_v4si_char, v8hi_ftype_v8hi_char, v16qi_ftype_v16qi_char, + v16qi_ftype_v16qi_v16qi_char, v8hi_ftype_v8hi_v8hi_char, + v4si_ftype_v4si_v4si_char and v4sf_ftype_v4sf_v4sf_char to + end in ..._int; change them to accept an int instead of a char + as the last parameter. + (altivec_expand_dst_builtin): Treat expansion as completed even if + literal argument is invalid (so that other expansions are not tried + in vain). + (TARGET_MANGLE_FUNDAMENTAL_TYPE): Point target hook at + rs6000_mangle_fundamental_type. + (rs6000_mangle_fundamental_type): New function. + * config/rs6000/rs6000.h (TARGET_OPTIONS): Describe + '-m[no-]-warn-altivec-long' (which '-W[no-]altivec-long-deprecated' + maps to). + (rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): Forward + declare. + (ALTIVEC_BUILTIN_COMPILETIME_ERROR): New built-in enumeration. + +2004-08-20 Jakub Jelinek <jakub@redhat.com> + + PR target/16195 + * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Make r30 + fixed if TARGET_TOC && TARGET_MINIMAL_TOC. + * config/rs6000/rs6000.c (first_reg_to_save): Pretend + call_used_regs[30] is 0 if TARGET_TOC && TARGET_MINIMAL_TOC. + (rs6000_emit_prologue, rs6000_emit_epilogue): Likewise. + +2004-08-17 Joseph S. Myers <jsm@polyomino.org.uk> + + * c-decl.c (grokdeclarator): Allow for function definition where + innermost declarator has attributes. + +2004-08-17 Daniel Bornstein <danfuzz@milk.com> + + PR target/17019 + * arm.md (addsi3_cbranch_scratch): Correct case labels. + +2004-08-14 Roger Sayle <roger@eyesopen.com> + David Billinghurst <David.Billinghurst@riotinto.com> + + PR libgfortran/15930 + * fixinc/inclhack.def (irix___generic1, irix___generic2): New. + * fixinc/fixincl.x: Regenerate. + * fixinc/tests/base/internal/math_core.h: New file + +2004-08-14 Roger Sayle <roger@eyesopen.com> + Bruce Korb <bkorb@gnu.org> + + * fixinc/inclhack.def (aix_syswait_2): New fix. + * fixinc/fixincl.x: Regenerate. + * fixinc/tests/base/sys/wait.h: Update for new test. + +2004-08-14 Gerald Pfeifer <gerald@pfeifer.com> + Dimitri Papadopoulos-Orfanos <papadopo@shfj.cea.fr> + Dave Korn <dk@artimi.com> + + * doc/install.texi (Building): Avoid duplicate reference to GNU + make requirement. + (*-*-solaris2*): Do not recommend GNU make any longer. Simplify. + +2004-08-13 J"orn Rennecke <joern.rennecke@superh.com> + + * sh.md (cbranch define_delay) Use cond_delay_slot for + non-anulled condition too. + +2004-08-11 Mark Mitchell <mark@codesourcery.com> + + PR c++/16618 + * ginclude/stddef.h (offsetof): Refine C++ definition. + +2004-08-12 Alan Modra <amodra@bigpond.net.au> + + Merge from mainline. + 2004-07-01 Alan Modra <amodra@bigpond.net.au> + * config/rs6000/rs6000.c (rs6000_mixed_function_arg): Rewrite. + (function_arg): Use rs6000_arg_size rather than CLASS_MAX_NREGS in + calculating gpr size for altivec. Simplify and correct + rs6000_mixed_function_arg calls. Call rs6000_mixed_function_arg + for ABI_V4 gpr case too. Fix off-by-one error in long double + reg test. Generate the correct PARALLEL to handle long double + for ABI_AIX 32-bit. Use this for -m32 -mpowerpc64 fpr case too. + (function_arg_partial_nregs): Align before calculating regs left. + Don't return info on partial fprs when we need info on gprs. + Correct long double fpr off-by-one error. + +2004-08-11 James E Wilson <wilson@specifixinc.com> + + PR rtl-optimization/16490 + * cfgrtl.c (cfg_layout_split_edge): Set global_live_at_start and + global_live_at_end for new basic block if already set for other blocks. + +2004-08-07 Roger Sayle <roger@eyesopen.com> + + PR middle-end/16790 + * fold-const.c (expand_muldiv_1) <NOP_EXPR>: Disallow local + truncations, not just global truncations. + +2004-08-07 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/rs6000.c (function_arg_padding): Revert 2004-07-28. + +2004-08-04 Zack Weinberg <zack@codesourcery.com> + + PR 13956 + * dbxout.c (dbx_output_lbrac, dbx_output_rbrac): New + functions, broken out of dbxout_block. + (dbxout_block): The block at depth 0 should get LBRAC/RBRAC + stabs too, if it contains symbols. Use the begin_label and + the Lscope label (emitted by dbxout_function_end) for the + range of this block. + (dbxout_function_decl): Always call dbxout_function_end. + (dbxout_function_end): Return after emitting the "Lscope" symbol + under the same conditions that this function formerly wasn't called. + Add explanatory comments. + +2004-08-03 Yossi Markovich <yossim@il.ibm.com> + Mostafa Hagog <mustafa@il.ibm.com> + + * config/rs6000/altivec.md (altivec_vnmsubfp): Fix wrong pattern. + +2004-07-31 Andrew Pinski <apinski@apple.com> + + PR other/16842 + * mkheaders.in (libsubdir): s/gcc-lib/gcc/. + +2004-07-28 Aldy Hernandez <aldyh@redhat.com> + + * config/rs6000/rs6000.md ("move_from_CR_gt_bit"): Rename to + move_from_CR_eq_bit. + Rename UNSPEC_MV_CR_GT to UNSPEC_MV_CR_EQ. + + + * config/rs6000/spe.md ("e500_flip_gt_bit"): Rename to + e500_flip_eq_bit. + + * config/rs6000/rs6000-protos.h: Rename output_e500_flip_gt_bit to + output_e500_flip_eq_bit. + + * config/rs6000/rs6000.c (output_e500_flip_gt_bit): Rename to + output_e500_flip_eq_bit. + (rs6000_emit_sCOND): Rename call to output_e500_flip_gt_bit to + output_e500_flip_eq_bit. + Rename gen_move_from_CR_gt_bit to gen_move_from_CR_eq_bit. + (print_operand): case D. Get to EQ bit. + +2004-07-28 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/rs6000.c (function_arg_padding): Pad SFmode upwards. + 2004-07-24 Alexander Kabaev <kan@freebsd.org> * config/ia64/ia64.h (SUBTARGET_EXTRA_SPECS): Default to nothing. diff --git a/contrib/gcc/Makefile.in b/contrib/gcc/Makefile.in index d0ec768..30815af 100644 --- a/contrib/gcc/Makefile.in +++ b/contrib/gcc/Makefile.in @@ -505,8 +505,16 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ # Additional sources to handle exceptions; overridden by targets as needed. LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c +LIB2ADDEHSTATIC = $(LIB2ADDEH) +LIB2ADDEHSHARED = $(LIB2ADDEH) LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h +# Don't build libunwind by default. +LIBUNWIND = +LIBUNWINDDEP = +SHLIBUNWIND_LINK = +SHLIBUNWIND_INSTALL = + # nm flags to list global symbols in libgcc object files. SHLIB_NM_FLAGS = -pg @@ -545,6 +553,10 @@ LIB2FUNCS_EXTRA = # Assembler files should have names ending in `.asm'. LIB2FUNCS_STATIC_EXTRA = +# List of extra C and assembler files to add to shared libgcc2. +# Assembler files should have names ending in `.asm'. +LIB2FUNCS_SHARED_EXTRA = + # Program to convert libraries. LIBCONVERT = @@ -938,6 +950,9 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 # language hooks, generated by configure @language_hooks@ +# Set up library path if needed. +@set_gcc_lib_path@ + # per-language makefile fragments ifneq ($(LANG_MAKEFRAGS),) include $(LANG_MAKEFRAGS) @@ -1133,16 +1148,25 @@ xlimits.h: glimits.h limitx.h limity.h LIB2ADD = $(LIB2FUNCS_EXTRA) LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) +LIB2ADD_SH = $(LIB2FUNCS_SHARED_EXTRA) -libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext) specs +libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) $(LIB2ADD_SH) \ + xgcc$(exeext) specs objext='$(objext)' \ LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \ LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \ LIBGCOV='$(LIBGCOV)' \ LIB2ADD='$(LIB2ADD)' \ LIB2ADD_ST='$(LIB2ADD_ST)' \ + LIB2ADD_SH='$(LIB2ADD_SH)' \ LIB2ADDEH='$(LIB2ADDEH)' \ + LIB2ADDEHSTATIC='$(LIB2ADDEHSTATIC)' \ + LIB2ADDEHSHARED='$(LIB2ADDEHSHARED)' \ LIB2ADDEHDEP='$(LIB2ADDEHDEP)' \ + LIBUNWIND='$(LIBUNWIND)' \ + LIBUNWINDDEP='$(LIBUNWINDDEP)' \ + SHLIBUNWIND_LINK='$(SHLIBUNWIND_LINK)' \ + SHLIBUNWIND_INSTALL='$(SHLIBUNWIND_INSTALL)' \ FPBIT='$(FPBIT)' \ FPBIT_FUNCS='$(FPBIT_FUNCS)' \ LIB2_DIVMOD_FUNCS='$(LIB2_DIVMOD_FUNCS)' \ @@ -1170,8 +1194,8 @@ LIBGCC_DEPS = $(GCC_PASSES) $(LANGUAGES) stmp-int-hdrs $(STMP_FIXPROTO) \ libgcc.mk $(srcdir)/libgcc2.c $(srcdir)/libgcov.c $(TCONFIG_H) \ $(MACHMODE_H) longlong.h gbl-ctors.h config.status stmp-int-hdrs \ tsystem.h $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \ - $(LIB2ADD_ST) $(LIB2ADDEH) $(LIB2ADDEHDEP) $(EXTRA_PARTS) \ - $(srcdir)/config/$(LIB1ASMSRC) \ + $(LIB2ADD_ST) $(LIB2ADD_SH) $(LIB2ADDEH) $(LIB2ADDEHDEP) \ + $(EXTRA_PARTS) $(srcdir)/config/$(LIB1ASMSRC) \ $(srcdir)/gcov-io.h $(srcdir)/gcov-io.c gcov-iov.h libgcov.a: libgcc.a; @true @@ -1578,7 +1602,7 @@ expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) f except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) real.h $(TARGET_H) dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ flags.h function.h $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \ - langhooks.h + langhooks.h $(GGC_H) gt-dojump.h builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H)\ flags.h $(TARGET_H) function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) insn-config.h \ $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \ @@ -1727,7 +1751,8 @@ dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ et-forest.o : et-forest.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) et-forest.h alloc-pool.h combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \ function.h insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \ - $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H) $(TREE_H) $(TARGET_H) + $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H) \ + $(TREE_H) $(TARGET_H) $(PARAMS_H) regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ hard-reg-set.h flags.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h \ real.h toplev.h function.h output.h $(GGC_H) $(TM_P_H) $(EXPR_H) $(TIMEVAR_H) @@ -2060,6 +2085,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \ $(srcdir)/c-common.h $(srcdir)/c-tree.h \ $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \ $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \ + $(srcdir)/dojump.c \ $(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \ $(srcdir)/fold-const.c $(srcdir)/function.c \ $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \ @@ -2079,7 +2105,7 @@ gt-cgraph.h gt-coverage.h gtype-desc.h gtype-desc.c gt-except.h \ gt-function.h gt-integrate.h gt-stmt.h gt-tree.h gt-varasm.h \ gt-emit-rtl.h gt-explow.h gt-stor-layout.h gt-regclass.h \ gt-lists.h gt-alias.h gt-cselib.h gt-fold-const.h gt-gcse.h \ -gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h \ +gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h gt-dojump.h \ gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \ gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \ gt-c-pragma.h gtype-c.h gt-input.h gt-cfglayout.h \ @@ -2779,7 +2805,8 @@ mostlyclean: lang.mostlyclean # that don't exist in the distribution. clean: mostlyclean lang.clean -rm -f libgcc.a libgcc_eh.a libgcov.a - -rm -f libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).1 + -rm -f libgcc_s* + -rm -f libunwind* -rm -f config.h tconfig.h bconfig.h tm_p.h tm.h -rm -f cs-* -rm -rf libgcc @@ -3606,6 +3633,7 @@ stage1-start: -if [ -f collect-ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi -rm -f stage1/libgcc.a stage1/libgcc_eh.a stage1/libgcov.a -rm -f stage1/libgcc_s*$(SHLIB_EXT) + -rm -f stage1/libunwind.a stage1/libunwind*$(SHLIB_EXT) -cp libgcc.a stage1 -$(RANLIB_FOR_TARGET) stage1/libgcc.a -cp libgcov.a stage1 @@ -3614,6 +3642,7 @@ stage1-start: $(RANLIB_FOR_TARGET) stage1/libgcc_eh.a; \ fi -cp libgcc_s*$(SHLIB_EXT) stage1 + -cp libunwind.a libunwind*$(SHLIB_EXT) stage1 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ cp stage1/$${f} . ; \ else true; \ @@ -3641,6 +3670,7 @@ stage2-start: -if [ -f collect-ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi -rm -f stage2/libgcc.a stage2/libgcov.a stage2/libgcc_eh.a -rm -f stage2/libgcc_s*$(SHLIB_EXT) + -rm -f stage2/libunwind.a stage2/libunwind*$(SHLIB_EXT) -cp libgcc.a stage2 -$(RANLIB_FOR_TARGET) stage2/libgcc.a -cp libgcov.a stage2 @@ -3649,6 +3679,7 @@ stage2-start: $(RANLIB_FOR_TARGET) stage2/libgcc_eh.a; \ fi -cp libgcc_s*$(SHLIB_EXT) stage2 + -cp libunwind.a libunwind*$(SHLIB_EXT) stage2 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ cp stage2/$${f} . ; \ else true; \ @@ -3672,6 +3703,7 @@ stage3-start: -if [ -f collect-ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi -rm -f stage3/libgcc.a stage3/libgcov.a stage3/libgcc_eh.a -rm -f stage3/libgcc_s*$(SHLIB_EXT) + -rm -f stage3/libunwind.a stage3/libunwind*$(SHLIB_EXT) -cp libgcc.a stage3 -$(RANLIB_FOR_TARGET) stage3/libgcc.a -cp libgcov.a stage3 @@ -3680,6 +3712,7 @@ stage3-start: $(RANLIB_FOR_TARGET) stage3/libgcc_eh.a; \ fi -cp libgcc_s*$(SHLIB_EXT) stage3 + -cp libunwind.a libunwind*$(SHLIB_EXT) stage3 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ cp stage3/$${f} . ; \ else true; \ @@ -3703,6 +3736,7 @@ stage4-start: -if [ -f collect-ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi -rm -f stage4/libgcc.a stage4/libgcov.a stage4/libgcc_eh.a -rm -f stage4/libgcc_s*$(SHLIB_EXT) + -rm -f stage4/libunwind.a stage4/libunwind*$(SHLIB_EXT) -cp libgcc.a stage4 -$(RANLIB_FOR_TARGET) stage4/libgcc.a -cp libgcov.a stage4 @@ -3711,6 +3745,7 @@ stage4-start: $(RANLIB_FOR_TARGET) stage4/libgcc_eh.a; \ fi -cp libgcc_s*$(SHLIB_EXT) stage4 + -cp libunwind.a libunwind*$(SHLIB_EXT) stage4 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ cp stage4/$${f} . ; \ else true; \ @@ -3732,6 +3767,7 @@ stageprofile-start: -if [ -f collect-ld$(exeext) ] ; then (cd stageprofile && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi -rm -f stageprofile/libgcc.a stageprofile/libgcov.a stageprofile/libgcc_eh.a -rm -f stageprofile/libgcc_s*$(SHLIB_EXT) + -rm -f stageprofile/libunwind.a stageprofile/libunwind*$(SHLIB_EXT) -cp libgcc.a stageprofile -$(RANLIB_FOR_TARGET) stageprofile/libgcc.a -cp libgcov.a stageprofile @@ -3740,6 +3776,7 @@ stageprofile-start: $(RANLIB_FOR_TARGET) stageprofile/libgcc_eh.a; \ fi -cp libgcc_s*$(SHLIB_EXT) stageprofile + -cp libunwind.a libunwind*$(SHLIB_EXT) stageprofile -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ cp stageprofile/$${f} . ; \ else true; \ @@ -3761,6 +3798,7 @@ stagefeedback-start: -if [ -f collect-ld$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi -rm -f stagefeedback/libgcc.a stagefeedback/libgcov.a stagefeedback/libgcc_eh.a -rm -f stagefeedback/libgcc_s*$(SHLIB_EXT) + -rm -f stagefeedback/libunwind.a stagefeedback/libunwind*$(SHLIB_EXT) -rm -f *.da -for dir in fixinc po testsuite $(SUBDIRS); \ do \ @@ -3774,6 +3812,7 @@ stagefeedback-start: $(RANLIB_FOR_TARGET) stagefeedback/libgcc_eh.a; \ fi -cp libgcc_s*$(SHLIB_EXT) stagefeedback + -cp libunwind.a libunwind*$(SHLIB_EXT) stagefeedback -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ cp stagefeedback/$${f} . ; \ else true; \ diff --git a/contrib/gcc/attribs.c b/contrib/gcc/attribs.c index a40fea7..3286bf3 100644 --- a/contrib/gcc/attribs.c +++ b/contrib/gcc/attribs.c @@ -266,6 +266,8 @@ decl_attributes (tree *node, tree attributes, int flags) /* Force a recalculation of mode and size. */ DECL_MODE (*node) = VOIDmode; DECL_SIZE (*node) = 0; + if (!DECL_USER_ALIGN (*node)) + DECL_ALIGN (*node) = 0; layout_decl (*node, 0); } diff --git a/contrib/gcc/builtins.c b/contrib/gcc/builtins.c index dadb6cd..a3e069e 100644 --- a/contrib/gcc/builtins.c +++ b/contrib/gcc/builtins.c @@ -1708,6 +1708,7 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget) narg = save_expr (arg); if (narg != arg) { + arg = narg; arglist = build_tree_list (NULL_TREE, arg); exp = build_function_call_expr (fndecl, arglist); } @@ -1840,6 +1841,7 @@ expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget) narg = save_expr (arg1); if (narg != arg1) { + arg1 = narg; temp = build_tree_list (NULL_TREE, narg); stable = false; } @@ -1849,6 +1851,7 @@ expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget) narg = save_expr (arg0); if (narg != arg0) { + arg0 = narg; arglist = tree_cons (NULL_TREE, narg, temp); stable = false; } @@ -6581,7 +6584,7 @@ fold_builtin (tree exp) return build_function_call_expr (expfn, arglist); } - /* Optimize sqrt(pow(x,y)) = pow(x,y*0.5). */ + /* Optimize sqrt(pow(x,y)) = pow(|x|,y*0.5). */ if (flag_unsafe_math_optimizations && (fcode == BUILT_IN_POW || fcode == BUILT_IN_POWF @@ -6590,8 +6593,11 @@ fold_builtin (tree exp) tree powfn = TREE_OPERAND (TREE_OPERAND (arg, 0), 0); tree arg0 = TREE_VALUE (TREE_OPERAND (arg, 1)); tree arg1 = TREE_VALUE (TREE_CHAIN (TREE_OPERAND (arg, 1))); - tree narg1 = fold (build (MULT_EXPR, type, arg1, - build_real (type, dconsthalf))); + tree narg1; + if (!tree_expr_nonnegative_p (arg0)) + arg0 = build1 (ABS_EXPR, type, arg0); + narg1 = fold (build (MULT_EXPR, type, arg1, + build_real (type, dconsthalf))); arglist = tree_cons (NULL_TREE, arg0, build_tree_list (NULL_TREE, narg1)); return build_function_call_expr (powfn, arglist); diff --git a/contrib/gcc/c-common.c b/contrib/gcc/c-common.c index c5f4dad..d79f200 100644 --- a/contrib/gcc/c-common.c +++ b/contrib/gcc/c-common.c @@ -767,7 +767,6 @@ static tree handle_nothrow_attribute (tree *, tree, tree, int, bool *); static tree handle_cleanup_attribute (tree *, tree, tree, int, bool *); static tree handle_warn_unused_result_attribute (tree *, tree, tree, int, bool *); -static tree vector_size_helper (tree, tree); static void check_function_nonnull (tree, tree); static void check_nonnull_arg (void *, tree, unsigned HOST_WIDE_INT); @@ -1138,7 +1137,7 @@ fname_decl (unsigned int rid, tree id) input_line = saved_lineno; } if (!ix && !current_function_decl) - pedwarn ("%J'%D' is not defined outside of function scope", decl, decl); + pedwarn ("'%D' is not defined outside of function scope", decl); return decl; } @@ -4643,7 +4642,10 @@ handle_mode_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED, else for (j = 0; j < NUM_MACHINE_MODES; j++) if (!strcmp (p, GET_MODE_NAME (j))) - mode = (enum machine_mode) j; + { + mode = (enum machine_mode) j; + break; + } if (mode == VOIDmode) error ("unknown machine mode `%s'", p); @@ -4676,8 +4678,44 @@ handle_mode_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED, mode); *node = ptr_type; } + else if (TREE_CODE (type) == ENUMERAL_TYPE) + { + /* For enumeral types, copy the precision from the integer + type returned above. If not an INTEGER_TYPE, we can't use + this mode for this type. */ + if (TREE_CODE (typefm) != INTEGER_TYPE) + { + error ("cannot use mode %qs for enumeral types", p); + return NULL_TREE; + } + + if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + type = build_type_copy (type); + + /* We cannot use layout_type here, because that will attempt + to re-layout all variants, corrupting our original. */ + TYPE_PRECISION (type) = TYPE_PRECISION (typefm); + TYPE_MIN_VALUE (type) = TYPE_MIN_VALUE (typefm); + TYPE_MAX_VALUE (type) = TYPE_MAX_VALUE (typefm); + TYPE_SIZE (type) = TYPE_SIZE (typefm); + TYPE_SIZE_UNIT (type) = TYPE_SIZE_UNIT (typefm); + TYPE_MODE (type) = TYPE_MODE (typefm); + if (!TYPE_USER_ALIGN (type)) + TYPE_ALIGN (type) = TYPE_ALIGN (typefm); + + *node = type; + } + else if (VECTOR_MODE_P (mode) + ? TREE_CODE (type) != TREE_CODE (TREE_TYPE (typefm)) + : TREE_CODE (type) != TREE_CODE (typefm)) + + { + error ("mode `%s' applied to inappropriate type", p); + return NULL_TREE; + } else - *node = typefm; + *node = typefm; + /* No need to layout the type here. The caller should do this. */ } } @@ -5246,57 +5284,11 @@ handle_vector_size_attribute (tree *node, tree name, tree args, } /* Build back pointers if needed. */ - *node = vector_size_helper (*node, new_type); + *node = reconstruct_complex_type (*node, new_type); return NULL_TREE; } -/* HACK. GROSS. This is absolutely disgusting. I wish there was a - better way. - - If we requested a pointer to a vector, build up the pointers that - we stripped off while looking for the inner type. Similarly for - return values from functions. - - The argument "type" is the top of the chain, and "bottom" is the - new type which we will point to. */ - -static tree -vector_size_helper (tree type, tree bottom) -{ - tree inner, outer; - - if (POINTER_TYPE_P (type)) - { - inner = vector_size_helper (TREE_TYPE (type), bottom); - outer = build_pointer_type (inner); - } - else if (TREE_CODE (type) == ARRAY_TYPE) - { - inner = vector_size_helper (TREE_TYPE (type), bottom); - outer = build_array_type (inner, TYPE_DOMAIN (type)); - } - else if (TREE_CODE (type) == FUNCTION_TYPE) - { - inner = vector_size_helper (TREE_TYPE (type), bottom); - outer = build_function_type (inner, TYPE_ARG_TYPES (type)); - } - else if (TREE_CODE (type) == METHOD_TYPE) - { - inner = vector_size_helper (TREE_TYPE (type), bottom); - outer = build_method_type_directly (TYPE_METHOD_BASETYPE (type), - inner, - TYPE_ARG_TYPES (type)); - } - else - return bottom; - - TREE_READONLY (outer) = TREE_READONLY (type); - TREE_THIS_VOLATILE (outer) = TREE_THIS_VOLATILE (type); - - return outer; -} - /* Handle the "nonnull" attribute. */ static tree handle_nonnull_attribute (tree *node, tree name ATTRIBUTE_UNUSED, diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c index 6e87a76..619b221 100644 --- a/contrib/gcc/c-decl.c +++ b/contrib/gcc/c-decl.c @@ -3620,10 +3620,6 @@ grokdeclarator (tree declarator, tree declspecs, } } - /* Check the type and width of a bit-field. */ - if (bitfield) - check_bitfield_type_and_width (&type, width, orig_name); - /* Figure out the type qualifiers for the declaration. There are two ways a declaration can become qualified. One is something like `const int i' where the `const' is explicit. Another is @@ -3983,7 +3979,17 @@ grokdeclarator (tree declarator, tree declspecs, } else if (TREE_CODE (declarator) == CALL_EXPR) { + /* Say it's a definition only for the declarator closest to + the identifier, apart possibly from some attributes. */ + bool really_funcdef = false; tree arg_types; + if (funcdef_flag) + { + tree t = TREE_OPERAND (declarator, 0); + while (TREE_CODE (t) == TREE_LIST) + t = TREE_VALUE (t); + really_funcdef = (TREE_CODE (t) == IDENTIFIER_NODE); + } /* Declaring a function type. Make sure we have a valid type for the function to return. */ @@ -4009,11 +4015,7 @@ grokdeclarator (tree declarator, tree declspecs, inner layer of declarator. */ arg_types = grokparms (TREE_OPERAND (declarator, 1), - funcdef_flag - /* Say it's a definition - only for the CALL_EXPR - closest to the identifier. */ - && TREE_CODE (TREE_OPERAND (declarator, 0)) == IDENTIFIER_NODE); + really_funcdef); /* Type qualifiers before the return type of the function qualify the return type, not the function type. */ if (type_quals) @@ -4127,6 +4129,10 @@ grokdeclarator (tree declarator, tree declspecs, /* Now TYPE has the actual type. */ + /* Check the type and width of a bit-field. */ + if (bitfield) + check_bitfield_type_and_width (&type, width, orig_name); + /* Did array size calculations overflow? */ if (TREE_CODE (type) == ARRAY_TYPE @@ -5126,7 +5132,7 @@ finish_struct (tree t, tree fieldlist, tree attributes) make it one, warn and turn off the flag. */ if (TREE_CODE (t) == UNION_TYPE && TYPE_TRANSPARENT_UNION (t) - && TYPE_MODE (t) != DECL_MODE (TYPE_FIELDS (t))) + && (!TYPE_FIELDS (t) || TYPE_MODE (t) != DECL_MODE (TYPE_FIELDS (t)))) { TYPE_TRANSPARENT_UNION (t) = 0; warning ("union cannot be made transparent"); @@ -5278,9 +5284,19 @@ finish_enum (tree enumtype, tree values, tree attributes) TYPE_MIN_VALUE (enumtype) = minnode; TYPE_MAX_VALUE (enumtype) = maxnode; - TYPE_PRECISION (enumtype) = precision; TREE_UNSIGNED (enumtype) = unsign; TYPE_SIZE (enumtype) = 0; + + /* If the precision of the type was specific with an attribute and it + was too small, give an error. Otherwise, use it. */ + if (TYPE_PRECISION (enumtype)) + { + if (precision > TYPE_PRECISION (enumtype)) + error ("specified mode too small for enumeral values"); + } + else + TYPE_PRECISION (enumtype) = precision; + layout_type (enumtype); if (values != error_mark_node) diff --git a/contrib/gcc/c-format.c b/contrib/gcc/c-format.c index a532259..620277f 100644 --- a/contrib/gcc/c-format.c +++ b/contrib/gcc/c-format.c @@ -2518,9 +2518,27 @@ init_dynamic_asm_fprintf_info (void) length modifier to work, one must have issued: "typedef HOST_WIDE_INT __gcc_host_wide_int__;" in one's source code prior to using that modifier. */ - if (!(hwi = maybe_get_identifier ("__gcc_host_wide_int__")) - || !(hwi = DECL_ORIGINAL_TYPE (identifier_global_value (hwi)))) + hwi = maybe_get_identifier ("__gcc_host_wide_int__"); + if (!hwi) + { + error ("'__gcc_host_wide_int__' is not defined as a type"); + return; + } + hwi = identifier_global_value (hwi); + if (!hwi || TREE_CODE (hwi) != TYPE_DECL) + { + error ("'__gcc_host_wide_int__' is not defined as a type"); + return; + } + hwi = DECL_ORIGINAL_TYPE (hwi); + if (!hwi) abort (); + if (hwi != long_integer_type_node && hwi != long_long_integer_type_node) + { + error ("'__gcc_host_wide_int__' is not defined as 'long'" + " or 'long long'"); + return; + } /* Create a new (writable) copy of asm_fprintf_length_specs. */ new_asm_fprintf_length_specs = xmemdup (asm_fprintf_length_specs, @@ -2563,19 +2581,71 @@ init_dynamic_diag_info (void) However we don't force a hard ICE because we may see only one or the other type. */ if ((loc = maybe_get_identifier ("location_t"))) - loc = TREE_TYPE (identifier_global_value (loc)); + { + loc = identifier_global_value (loc); + if (loc) + { + if (TREE_CODE (loc) != TYPE_DECL) + { + error ("'location_t' is not defined as a type"); + loc = 0; + } + else + loc = TREE_TYPE (loc); + } + } /* We need to grab the underlying `union tree_node' so peek into an extra type level. */ if ((t = maybe_get_identifier ("tree"))) - t = TREE_TYPE (TREE_TYPE (identifier_global_value (t))); + { + t = identifier_global_value (t); + if (t) + { + if (TREE_CODE (t) != TYPE_DECL) + { + error ("'tree' is not defined as a type"); + t = 0; + } + else if (TREE_CODE (TREE_TYPE (t)) != POINTER_TYPE) + { + error ("'tree' is not defined as a pointer type"); + t = 0; + } + else + t = TREE_TYPE (TREE_TYPE (t)); + } + } /* Find the underlying type for HOST_WIDE_INT. For the %w length modifier to work, one must have issued: "typedef HOST_WIDE_INT __gcc_host_wide_int__;" in one's source code prior to using that modifier. */ if ((hwi = maybe_get_identifier ("__gcc_host_wide_int__"))) - hwi = DECL_ORIGINAL_TYPE (identifier_global_value (hwi)); + { + hwi = identifier_global_value (hwi); + if (hwi) + { + if (TREE_CODE (hwi) != TYPE_DECL) + { + error ("'__gcc_host_wide_int__' is not defined as a type"); + hwi = 0; + } + else + { + hwi = DECL_ORIGINAL_TYPE (hwi); + if (!hwi) + abort (); + if (hwi != long_integer_type_node + && hwi != long_long_integer_type_node) + { + error ("'__gcc_host_wide_int__' is not defined" + " as 'long' or 'long long'"); + hwi = 0; + } + } + } + } /* Assign the new data for use. */ diff --git a/contrib/gcc/c-opts.c b/contrib/gcc/c-opts.c index 93637a2..2a61744 100644 --- a/contrib/gcc/c-opts.c +++ b/contrib/gcc/c-opts.c @@ -186,10 +186,10 @@ defer_opt (enum opt_code code, const char *arg) /* Common initialization before parsing options. */ unsigned int -c_common_init_options (unsigned int argc, const char **argv ATTRIBUTE_UNUSED) +c_common_init_options (unsigned int argc, const char **argv) { static const unsigned int lang_flags[] = {CL_C, CL_ObjC, CL_CXX, CL_ObjCXX}; - unsigned int result; + unsigned int i, result; /* This is conditionalized only because that is the way the front ends used to do it. Maybe this should be unconditional? */ @@ -222,17 +222,25 @@ c_common_init_options (unsigned int argc, const char **argv ATTRIBUTE_UNUSED) result = lang_flags[c_language]; - /* If potentially preprocessing Fortran we have to accept its front - end options since the driver passes most of them through. */ -#ifdef CL_F77 - if (c_language == clk_c && argc > 2 - && !strcmp (argv[2], "-traditional-cpp" )) + if (c_language == clk_c) { - permit_fortran_options = true; - result |= CL_F77; - } + for (i = 1; i < argc; i++) + { + /* If preprocessing assembly language, accept any of the C-family + front end options since the driver may pass them through. */ + if (! strcmp (argv[i], "-lang-asm")) + result |= CL_C | CL_ObjC | CL_CXX | CL_ObjCXX; +#ifdef CL_F77 + /* If potentially preprocessing Fortran we have to accept its + front end options since the driver may them through. */ + else if (! strcmp (argv[i], "-traditional-cpp")) + { + permit_fortran_options = true; + result |= CL_F77; + } #endif - + } + } return result; } @@ -1160,8 +1168,12 @@ c_common_post_options (const char **pfilename) *pfilename = this_input_filename = cpp_read_main_file (parse_in, in_fnames[0]); + /* Don't do any compilation or preprocessing if there is no input file. */ if (this_input_filename == NULL) - return true; + { + errorcount++; + return false; + } if (flag_working_directory && flag_preprocess_only && ! flag_no_line_commands) @@ -1350,11 +1362,13 @@ sanitize_cpp_opts (void) /* Disable -dD, -dN and -dI if normal output is suppressed. Allow -dM since at least glibc relies on -M -dM to work. */ + /* Also, flag_no_output implies flag_no_line_commands, always. */ if (flag_no_output) { if (flag_dump_macros != 'M') flag_dump_macros = 0; flag_dump_includes = 0; + flag_no_line_commands = 1; } cpp_opts->unsigned_char = !flag_signed_char; diff --git a/contrib/gcc/c-parse.in b/contrib/gcc/c-parse.in index f035266..66d27ac 100644 --- a/contrib/gcc/c-parse.in +++ b/contrib/gcc/c-parse.in @@ -2149,7 +2149,7 @@ compstmt_contents_nonempty: compstmt_primary_start: '(' '{' - { if (current_function_decl == 0) + { if (last_tree == NULL) { error ("braced-group within expression allowed only inside a function"); YYERROR; diff --git a/contrib/gcc/c-ppoutput.c b/contrib/gcc/c-ppoutput.c index 5588da3..8162ccb 100644 --- a/contrib/gcc/c-ppoutput.c +++ b/contrib/gcc/c-ppoutput.c @@ -359,7 +359,7 @@ pp_file_change (const struct line_map *map) { const char *flags = ""; - if (flag_no_line_commands || flag_no_output) + if (flag_no_line_commands) return; if (map != NULL) diff --git a/contrib/gcc/c-semantics.c b/contrib/gcc/c-semantics.c index 38c4021..692adfc 100644 --- a/contrib/gcc/c-semantics.c +++ b/contrib/gcc/c-semantics.c @@ -937,6 +937,9 @@ expand_unreachable_if_stmt (tree t) return true; } + /* Account for declarations as conditions. */ + expand_cond (IF_COND (t)); + if (THEN_CLAUSE (t) && ELSE_CLAUSE (t)) { n = expand_unreachable_stmt (THEN_CLAUSE (t), 0); @@ -969,7 +972,9 @@ expand_unreachable_if_stmt (tree t) /* Expand an unreachable statement list. This function skips all statements preceding the first potentially reachable label and then returns the label (or, in same cases, the statement after - one containing the label). */ + one containing the label). This function returns NULL_TREE if + the end of the given statement list is unreachable, and a + non-NULL value, possibly error_mark_node, otherwise. */ static tree expand_unreachable_stmt (tree t, int warn) { @@ -1019,7 +1024,7 @@ expand_unreachable_stmt (tree t, int warn) case IF_STMT: if (expand_unreachable_if_stmt (t)) - return TREE_CHAIN (t); + return TREE_CHAIN (t) ? TREE_CHAIN (t) : error_mark_node; break; case WHILE_STMT: @@ -1027,7 +1032,7 @@ expand_unreachable_stmt (tree t, int warn) no need to rotate the loop, instead the WHILE_STMT can be expanded like a DO_STMT. */ genrtl_do_stmt_1 (WHILE_COND (t), WHILE_BODY (t)); - return TREE_CHAIN (t); + return TREE_CHAIN (t) ? TREE_CHAIN (t) : error_mark_node; case COMPOUND_STMT: { @@ -1036,7 +1041,7 @@ expand_unreachable_stmt (tree t, int warn) if (n != NULL_TREE) { expand_stmt (n); - return TREE_CHAIN (t); + return TREE_CHAIN (t) ? TREE_CHAIN (t) : error_mark_node; } warn = false; break; diff --git a/contrib/gcc/c-typeck.c b/contrib/gcc/c-typeck.c index c8d71e1..c9479f0 100644 --- a/contrib/gcc/c-typeck.c +++ b/contrib/gcc/c-typeck.c @@ -647,7 +647,7 @@ same_translation_unit_p (tree t1, tree t2) while (t2 && TREE_CODE (t2) != TRANSLATION_UNIT_DECL) switch (TREE_CODE_CLASS (TREE_CODE (t2))) { - case 'd': t2 = DECL_CONTEXT (t1); break; + case 'd': t2 = DECL_CONTEXT (t2); break; case 't': t2 = TYPE_CONTEXT (t2); break; case 'b': t2 = BLOCK_SUPERCONTEXT (t2); break; default: abort (); @@ -1320,26 +1320,6 @@ build_component_ref (tree datum, tree component) tree field = NULL; tree ref; - /* If DATUM is a COMPOUND_EXPR, move our reference inside it. - If pedantic ensure that the arguments are not lvalues; otherwise, - if the component is an array, it would wrongly decay to a pointer in - C89 mode. - We cannot do this with a COND_EXPR, because in a conditional expression - the default promotions are applied to both sides, and this would yield - the wrong type of the result; for example, if the components have - type "char". */ - switch (TREE_CODE (datum)) - { - case COMPOUND_EXPR: - { - tree value = build_component_ref (TREE_OPERAND (datum, 1), component); - return build (COMPOUND_EXPR, TREE_TYPE (value), - TREE_OPERAND (datum, 0), pedantic_non_lvalue (value)); - } - default: - break; - } - /* See if there is a field or component with name COMPONENT. */ if (code == RECORD_TYPE || code == UNION_TYPE) @@ -4117,18 +4097,32 @@ digest_init (tree type, tree init, int require_constant) /* Build a VECTOR_CST from a *constant* vector constructor. If the vector constructor is not constant (e.g. {1,2,3,foo()}) then punt below and handle as a constructor. */ - if (code == VECTOR_TYPE - && comptypes (TREE_TYPE (inside_init), type, COMPARE_STRICT) - && TREE_CONSTANT (inside_init)) - { - if (TREE_CODE (inside_init) == VECTOR_CST - && comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)), - TYPE_MAIN_VARIANT (type), - COMPARE_STRICT)) - return inside_init; - else - return build_vector (type, CONSTRUCTOR_ELTS (inside_init)); - } + if (code == VECTOR_TYPE + && comptypes (TREE_TYPE (inside_init), type, COMPARE_STRICT) + && TREE_CONSTANT (inside_init)) + { + if (TREE_CODE (inside_init) == VECTOR_CST + && comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)), + TYPE_MAIN_VARIANT (type), + COMPARE_STRICT)) + return inside_init; + + if (TREE_CODE (inside_init) == CONSTRUCTOR) + { + tree link; + + /* Iterate through elements and check if all constructor + elements are *_CSTs. */ + for (link = CONSTRUCTOR_ELTS (inside_init); + link; + link = TREE_CHAIN (link)) + if (TREE_CODE_CLASS (TREE_CODE (TREE_VALUE (link))) != 'c') + break; + + if (link == NULL) + return build_vector (type, CONSTRUCTOR_ELTS (inside_init)); + } + } /* Any type can be initialized from an expression of the same type, optionally with braces. */ @@ -6571,6 +6565,14 @@ c_finish_case (void) { struct c_switch *cs = switch_stack; + /* If we've not seen any case labels (or a default), we may still + need to chain any statements that were seen as the SWITCH_BODY. */ + if (SWITCH_BODY (cs->switch_stmt) == NULL) + { + SWITCH_BODY (cs->switch_stmt) = TREE_CHAIN (cs->switch_stmt); + TREE_CHAIN (cs->switch_stmt) = NULL_TREE; + } + /* Rechain the next statements to the SWITCH_STMT. */ last_tree = cs->switch_stmt; diff --git a/contrib/gcc/c.opt b/contrib/gcc/c.opt index 2a2ff85..7160dab 100644 --- a/contrib/gcc/c.opt +++ b/contrib/gcc/c.opt @@ -405,7 +405,7 @@ Give strings the type \"array of char\" ansi C ObjC C++ ObjC++ -A synonym for -std=c89. In a future version of GCC it will become synonymous with -std=c99 instead +A synonym for -std=c89 (for C) or -std=c++98 (for C++). d C ObjC C++ ObjC++ Joined @@ -788,7 +788,7 @@ Deprecated in favor of -std=gnu99 std=iso9899:1990 C ObjC -Deprecated in favor of -std=c89 +Conform to the ISO 1990 C standard std=iso9899:199409 C ObjC @@ -796,11 +796,11 @@ Conform to the ISO 1990 C standard as amended in 1994 std=iso9899:1999 C ObjC -Deprecated in favor of -std=c99 +Conform to the ISO 1999 C standard std=iso9899:199x C ObjC -Deprecated in favor of -std=c99 +Deprecated in favor of -std=iso9899:1999 traditional-cpp C ObjC C++ ObjC++ diff --git a/contrib/gcc/calls.c b/contrib/gcc/calls.c index 5dc96c6..86e5184 100644 --- a/contrib/gcc/calls.c +++ b/contrib/gcc/calls.c @@ -1719,8 +1719,8 @@ load_register_parameters (struct arg_data *args, int num_actuals, use_group_regs (call_fusage, reg); else if (nregs == -1) use_reg (call_fusage, reg); - else - use_regs (call_fusage, REGNO (reg), nregs == 0 ? 1 : nregs); + else if (nregs > 0) + use_regs (call_fusage, REGNO (reg), nregs); } } } @@ -2730,10 +2730,14 @@ expand_call (tree exp, rtx target, int ignore) Also, do all pending adjustments now if there is any chance this might be a call to alloca or if we are expanding a sibling call sequence or if we are calling a function that is to return - with stack pointer depressed. */ + with stack pointer depressed. + Also do the adjustments before a throwing call, otherwise + exception handling can fail; PR 19225. */ if (pending_stack_adjust >= 32 || (pending_stack_adjust > 0 && (flags & (ECF_MAY_BE_ALLOCA | ECF_SP_DEPRESSED))) + || (pending_stack_adjust > 0 + && flag_exceptions && !(flags & ECF_NOTHROW)) || pass == 0) do_pending_stack_adjust (); diff --git a/contrib/gcc/cfglayout.c b/contrib/gcc/cfglayout.c index 4794ee1..fa1b82c 100644 --- a/contrib/gcc/cfglayout.c +++ b/contrib/gcc/cfglayout.c @@ -865,6 +865,18 @@ fixup_fallthru_exit_predecessor (void) { basic_block c = ENTRY_BLOCK_PTR->next_bb; + /* If the very first block is the one with the fall-through exit + edge, we have to split that block. */ + if (c == bb) + { + bb = split_block (bb, NULL)->dest; + cfg_layout_initialize_rbi (bb); + bb->rbi->next = c->rbi->next; + c->rbi->next = bb; + bb->rbi->footer = c->rbi->footer; + c->rbi->footer = NULL; + } + while (c->rbi->next != bb) c = c->rbi->next; diff --git a/contrib/gcc/cfgrtl.c b/contrib/gcc/cfgrtl.c index bad9e77..42899f4 100644 --- a/contrib/gcc/cfgrtl.c +++ b/contrib/gcc/cfgrtl.c @@ -483,9 +483,21 @@ rtl_split_block (basic_block bb, void *insnp) edge e; rtx insn = insnp; - /* There is no point splitting the block after its end. */ - if (BB_END (bb) == insn) - return 0; + if (!insn) + { + insn = first_insn_after_basic_block_note (bb); + + if (insn) + insn = PREV_INSN (insn); + else + insn = get_last_insn (); + } + + /* We probably should check type of the insn so that we do not create + inconsistent cfg. It is checked in verify_flow_info anyway, so do not + bother. */ + if (insn == BB_END (bb)) + emit_note_after (NOTE_INSN_DELETED, insn); /* Create the new basic block. */ new_bb = create_basic_block (NEXT_INSN (insn), BB_END (bb), bb); @@ -2711,6 +2723,18 @@ cfg_layout_split_edge (edge e) new_bb->count = e->count; new_bb->frequency = EDGE_FREQUENCY (e); + /* ??? This info is likely going to be out of date very soon, but we must + create it to avoid getting an ICE later. */ + if (e->dest->global_live_at_start) + { + new_bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (&flow_obstack); + new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&flow_obstack); + COPY_REG_SET (new_bb->global_live_at_start, + e->dest->global_live_at_start); + COPY_REG_SET (new_bb->global_live_at_end, + e->dest->global_live_at_start); + } + new_e = make_edge (new_bb, e->dest, EDGE_FALLTHRU); new_e->probability = REG_BR_PROB_BASE; new_e->count = e->count; diff --git a/contrib/gcc/collect2.c b/contrib/gcc/collect2.c index 4fbe3a4..33206f5 100644 --- a/contrib/gcc/collect2.c +++ b/contrib/gcc/collect2.c @@ -189,6 +189,7 @@ static int strip_flag; /* true if -s */ #ifdef COLLECT_EXPORT_LIST static int export_flag; /* true if -bE */ static int aix64_flag; /* true if -b64 */ +static int aixrtl_flag; /* true if -brtl */ #endif int debug; /* true if -debug */ @@ -246,7 +247,6 @@ static struct path_prefix cmdline_lib_dirs; /* directories specified with -L */ static struct path_prefix libpath_lib_dirs; /* directories in LIBPATH */ static struct path_prefix *libpaths[3] = {&cmdline_lib_dirs, &libpath_lib_dirs, NULL}; -static const char *const libexts[3] = {"a", "so", NULL}; /* possible library extensions */ #endif static void handler (int); @@ -1080,6 +1080,8 @@ main (int argc, char **argv) export_flag = 1; else if (arg[2] == '6' && arg[3] == '4') aix64_flag = 1; + else if (arg[2] == 'r' && arg[3] == 't' && arg[4] == 'l') + aixrtl_flag = 1; break; #endif @@ -2823,6 +2825,8 @@ resolve_lib_name (const char *name) { char *lib_buf; int i, j, l = 0; + /* Library extensions for AIX dynamic linking. */ + const char * const libexts[2] = {"a", "so"}; for (i = 0; libpaths[i]; i++) if (libpaths[i]->max_len > l) @@ -2841,14 +2845,15 @@ resolve_lib_name (const char *name) const char *p = ""; if (list->prefix[strlen(list->prefix)-1] != '/') p = "/"; - for (j = 0; libexts[j]; j++) + for (j = 0; j < 2; j++) { sprintf (lib_buf, "%s%slib%s.%s", - list->prefix, p, name, libexts[j]); -if (debug) fprintf (stderr, "searching for: %s\n", lib_buf); + list->prefix, p, name, + libexts[(j + aixrtl_flag) % 2]); + if (debug) fprintf (stderr, "searching for: %s\n", lib_buf); if (file_exists (lib_buf)) { -if (debug) fprintf (stderr, "found: %s\n", lib_buf); + if (debug) fprintf (stderr, "found: %s\n", lib_buf); return (lib_buf); } } diff --git a/contrib/gcc/combine.c b/contrib/gcc/combine.c index 4d06322..0a3f381 100644 --- a/contrib/gcc/combine.c +++ b/contrib/gcc/combine.c @@ -90,6 +90,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "real.h" #include "toplev.h" #include "target.h" +#include "params.h" #ifndef SHIFT_COUNT_TRUNCATED #define SHIFT_COUNT_TRUNCATED 0 @@ -3417,10 +3418,10 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy) /* If this is a register being set, ignore it. */ new = XEXP (x, i); if (in_dest - && (code == SUBREG || code == STRICT_LOW_PART - || code == ZERO_EXTRACT) && i == 0 - && GET_CODE (new) == REG) + && (((code == SUBREG || code == ZERO_EXTRACT) + && GET_CODE (new) == REG) + || code == STRICT_LOW_PART)) ; else if (COMBINE_RTX_EQUAL_P (XEXP (x, i), from)) @@ -3715,27 +3716,28 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int last, temp = simplify_unary_operation (code, mode, XEXP (x, 0), op0_mode); break; case '<': - { - enum machine_mode cmp_mode = GET_MODE (XEXP (x, 0)); - if (cmp_mode == VOIDmode) - { - cmp_mode = GET_MODE (XEXP (x, 1)); - if (cmp_mode == VOIDmode) - cmp_mode = op0_mode; - } - temp = simplify_relational_operation (code, cmp_mode, - XEXP (x, 0), XEXP (x, 1)); - } -#ifdef FLOAT_STORE_FLAG_VALUE - if (temp != 0 && GET_MODE_CLASS (mode) == MODE_FLOAT) + if (! VECTOR_MODE_P (mode)) { - if (temp == const0_rtx) - temp = CONST0_RTX (mode); - else - temp = CONST_DOUBLE_FROM_REAL_VALUE (FLOAT_STORE_FLAG_VALUE (mode), - mode); - } + enum machine_mode cmp_mode = GET_MODE (XEXP (x, 0)); + if (cmp_mode == VOIDmode) + { + cmp_mode = GET_MODE (XEXP (x, 1)); + if (cmp_mode == VOIDmode) + cmp_mode = op0_mode; + } + temp = simplify_relational_operation (code, cmp_mode, + XEXP (x, 0), XEXP (x, 1)); +#ifdef FLOAT_STORE_FLAG_VALUE + if (temp != 0 && GET_MODE_CLASS (mode) == MODE_FLOAT) + { + if (temp == const0_rtx) + temp = CONST0_RTX (mode); + else + temp = CONST_DOUBLE_FROM_REAL_VALUE + (FLOAT_STORE_FLAG_VALUE (mode), mode); + } #endif + } break; case 'c': case '2': @@ -10019,13 +10021,8 @@ gen_lowpart_for_combine (enum machine_mode mode, rtx x) result = gen_lowpart_common (mode, x); #ifdef CANNOT_CHANGE_MODE_CLASS - if (result != 0 - && GET_CODE (result) == SUBREG - && GET_CODE (SUBREG_REG (result)) == REG - && REGNO (SUBREG_REG (result)) >= FIRST_PSEUDO_REGISTER) - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (result)) - * MAX_MACHINE_MODE - + GET_MODE (result)); + if (result != 0 && GET_CODE (result) == SUBREG) + record_subregs_of_mode (result); #endif if (result) @@ -10692,34 +10689,61 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) break; case SUBREG: - /* Check for the case where we are comparing A - C1 with C2, - both constants are smaller than 1/2 the maximum positive - value in MODE, and the comparison is equality or unsigned. - In that case, if A is either zero-extended to MODE or has - sufficient sign bits so that the high-order bit in MODE - is a copy of the sign in the inner mode, we can prove that it is - safe to do the operation in the wider mode. This simplifies - many range checks. */ + /* Check for the case where we are comparing A - C1 with C2, that is + + (subreg:MODE (plus (A) (-C1))) op (C2) + + with C1 a constant, and try to lift the SUBREG, i.e. to do the + comparison in the wider mode. One of the following two conditions + must be true in order for this to be valid: + + 1. The mode extension results in the same bit pattern being added + on both sides and the comparison is equality or unsigned. As + C2 has been truncated to fit in MODE, the pattern can only be + all 0s or all 1s. + + 2. The mode extension results in the sign bit being copied on + each side. + + The difficulty here is that we have predicates for A but not for + (A - C1) so we need to check that C1 is within proper bounds so + as to perturbate A as little as possible. */ if (mode_width <= HOST_BITS_PER_WIDE_INT && subreg_lowpart_p (op0) + && GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) > mode_width && GET_CODE (SUBREG_REG (op0)) == PLUS - && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT - && INTVAL (XEXP (SUBREG_REG (op0), 1)) < 0 - && (-INTVAL (XEXP (SUBREG_REG (op0), 1)) - < (HOST_WIDE_INT) (GET_MODE_MASK (mode) / 2)) - && (unsigned HOST_WIDE_INT) const_op < GET_MODE_MASK (mode) / 2 - && (0 == (nonzero_bits (XEXP (SUBREG_REG (op0), 0), - GET_MODE (SUBREG_REG (op0))) - & ~GET_MODE_MASK (mode)) - || (num_sign_bit_copies (XEXP (SUBREG_REG (op0), 0), - GET_MODE (SUBREG_REG (op0))) - > (unsigned int) - (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) - - GET_MODE_BITSIZE (mode))))) - { - op0 = SUBREG_REG (op0); - continue; + && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT) + { + enum machine_mode inner_mode = GET_MODE (SUBREG_REG (op0)); + rtx a = XEXP (SUBREG_REG (op0), 0); + HOST_WIDE_INT c1 = -INTVAL (XEXP (SUBREG_REG (op0), 1)); + + if ((c1 > 0 + && (unsigned HOST_WIDE_INT) c1 + < (unsigned HOST_WIDE_INT) 1 << (mode_width - 1) + && (equality_comparison_p || unsigned_comparison_p) + /* (A - C1) zero-extends if it is positive and sign-extends + if it is negative, C2 both zero- and sign-extends. */ + && ((0 == (nonzero_bits (a, inner_mode) + & ~GET_MODE_MASK (mode)) + && const_op >= 0) + /* (A - C1) sign-extends if it is positive and 1-extends + if it is negative, C2 both sign- and 1-extends. */ + || (num_sign_bit_copies (a, inner_mode) + > (unsigned int) (GET_MODE_BITSIZE (inner_mode) + - mode_width) + && const_op < 0))) + || ((unsigned HOST_WIDE_INT) c1 + < (unsigned HOST_WIDE_INT) 1 << (mode_width - 2) + /* (A - C1) always sign-extends, like C2. */ + && num_sign_bit_copies (a, inner_mode) + > (unsigned int) (GET_MODE_BITSIZE (inner_mode) + - mode_width - 1))) + { + op0 = SUBREG_REG (op0); + continue; + } } /* If the inner mode is narrower and we are extracting the low part, @@ -11357,6 +11381,47 @@ reversed_comparison (rtx exp, enum machine_mode mode, rtx op0, rtx op1) return gen_binary (reversed_code, mode, op0, op1); } +/* Utility function for record_value_for_reg. Count number of + rtxs in X. */ +static int +count_rtxs (rtx x) +{ + enum rtx_code code = GET_CODE (x); + const char *fmt; + int i, ret = 1; + + if (GET_RTX_CLASS (code) == '2' + || GET_RTX_CLASS (code) == 'c') + { + rtx x0 = XEXP (x, 0); + rtx x1 = XEXP (x, 1); + + if (x0 == x1) + return 1 + 2 * count_rtxs (x0); + + if ((GET_RTX_CLASS (GET_CODE (x1)) == '2' + || GET_RTX_CLASS (GET_CODE (x1)) == 'c') + && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1))) + return 2 + 2 * count_rtxs (x0) + + count_rtxs (x == XEXP (x1, 0) + ? XEXP (x1, 1) : XEXP (x1, 0)); + + if ((GET_RTX_CLASS (GET_CODE (x0)) == '2' + || GET_RTX_CLASS (GET_CODE (x0)) == 'c') + && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1))) + return 2 + 2 * count_rtxs (x1) + + count_rtxs (x == XEXP (x0, 0) + ? XEXP (x0, 1) : XEXP (x0, 0)); + } + + fmt = GET_RTX_FORMAT (code); + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + if (fmt[i] == 'e') + ret += count_rtxs (XEXP (x, i)); + + return ret; +} + /* Utility function for following routine. Called when X is part of a value being stored into reg_last_set_value. Sets reg_last_set_table_tick for each register mentioned. Similar to mention_regs in cse.c */ @@ -11463,6 +11528,13 @@ record_value_for_reg (rtx reg, rtx insn, rtx value) && GET_CODE (XEXP (tem, 0)) == CLOBBER && GET_CODE (XEXP (tem, 1)) == CLOBBER) tem = XEXP (tem, 0); + else if (count_occurrences (value, reg, 1) >= 2) + { + /* If there are two or more occurrences of REG in VALUE, + prevent the value from growing too much. */ + if (count_rtxs (tem) > MAX_LAST_VALUE_RTL) + tem = gen_rtx_CLOBBER (GET_MODE (tem), const0_rtx); + } value = replace_rtx (copy_rtx (value), reg, tem); } diff --git a/contrib/gcc/common.opt b/contrib/gcc/common.opt index 261c8d2..20d1b75 100644 --- a/contrib/gcc/common.opt +++ b/contrib/gcc/common.opt @@ -28,7 +28,7 @@ Display this information -param Common Separate ---param <param>=<value> Set paramter <param> to value. See below for a complete list of parameters +--param <param>=<value> Set parameter <param> to value. See below for a complete list of parameters -target-help Common diff --git a/contrib/gcc/config.gcc b/contrib/gcc/config.gcc index 0946647..9c5c193 100644 --- a/contrib/gcc/config.gcc +++ b/contrib/gcc/config.gcc @@ -244,6 +244,7 @@ esac # machines. tm_p_file= cpu_type=`echo ${target} | sed 's/-.*$//'` +cpu_is_64bit= case ${target} in alpha*-*-*) cpu_type=alpha @@ -300,6 +301,11 @@ powerpc*-*-*) cpu_type=rs6000 extra_headers="ppc-asm.h altivec.h spe.h" need_64bit_hwint=yes + case x$with_cpu in + xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345]|xrs64a) + cpu_is_64bit=yes + ;; + esac ;; rs6000*-*-*) need_64bit_hwint=yes @@ -680,7 +686,7 @@ arm*-*-ecos-elf) ;; arm*-*-rtems*) tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h" - tmake_file="arm/t-arm-elf t-rtems" + tmake_file="arm/t-arm-elf t-rtems arm/t-rtems" ;; arm*-*-elf | ep9312-*-elf) tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h" @@ -700,12 +706,16 @@ arm*-*-kaos*) tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h kaos.h arm/kaos-arm.h" tmake_file=arm/t-arm-elf ;; +avr-*-rtems*) + tm_file="avr/avr.h dbxelf.h avr/rtems.h rtems.h" + tmake_file="avr/t-avr t-rtems avr/t-rtems" + ;; avr-*-*) tm_file="avr/avr.h dbxelf.h" use_fixproto=yes ;; c4x-*-rtems* | tic4x-*-rtems*) - tmake_file="c4x/t-c4x t-rtems" + tmake_file="c4x/t-c4x t-rtems c4x/t-rtems" tm_file="c4x/c4x.h c4x/rtems.h rtems.h" c_target_objs="c4x-c.o" cxx_target_objs="c4x-c.o" @@ -1257,12 +1267,12 @@ ia64*-*-freebsd*) ;; ia64*-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h" - tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc" + tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 t-libunwind ia64/t-glibc" + if test x$with_system_libunwind != xyes ; then + tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind" + fi target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" - if test x"$use_libunwind_exceptions" = xyes; then - tmake_file="$tmake_file t-libunwind" - fi ;; ia64*-*-hpux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h" @@ -1678,20 +1688,16 @@ pdp11-*-bsd) pdp11-*-*) use_fixproto=yes ;; -avr-*-*) - use_fixproto=yes - ;; # port not yet contributed #powerpc-*-openbsd*) # tmake_file="${tmake_file} rs6000/t-fprules " # extra_headers= # ;; powerpc64-*-linux*) - tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h" - case x$with_cpu in - x|xpowerpc64|xdefault64) tm_file="${tm_file} rs6000/default64.h";; - esac - tm_file="${tm_file} rs6000/linux64.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h" + test x$with_cpu != x || cpu_is_64bit=yes + test x$cpu_is_64bit != xyes || tm_file="${tm_file} rs6000/default64.h" + tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h" tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-linux rs6000/t-ppccomm rs6000/t-linux64" ;; powerpc64-*-gnu*) @@ -1765,8 +1771,20 @@ powerpc-*-linux*spe*) tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm" ;; powerpc-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h" tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm" + case ${enable_targets}:${cpu_is_64bit} in + *powerpc64* | all:* | *:yes) + if test x$cpu_is_64bit = xyes; then + tm_file="${tm_file} rs6000/default64.h" + fi + tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h" + tmake_file="$tmake_file rs6000/t-linux64" + ;; + *) + tm_file="${tm_file} rs6000/linux.h" + ;; + esac ;; powerpc-*-gnu-gnualtivec*) tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h" @@ -2007,7 +2025,7 @@ sparc64-*-openbsd*) with_cpu=ultrasparc ;; sparc-*-elf*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h" tmake_file="sparc/t-elf sparc/t-crtfm" extra_parts="crti.o crtn.o crtbegin.o crtend.o" use_fixproto=yes @@ -2017,7 +2035,7 @@ sparc-*-linux*) # SPARC's running GNU/Linux, libc6 tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm" ;; sparc-*-rtems*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/rtemself.h rtems.h" tmake_file="sparc/t-elf sparc/t-crtfm t-rtems" extra_parts="crti.o crtn.o crtbegin.o crtend.o" ;; @@ -2106,13 +2124,13 @@ sparclite-*-coff*) tmake_file=sparc/t-sparclite ;; sparclite-*-elf*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/liteelf.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/liteelf.h" tmake_file="sparc/t-sparclite sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" use_fixproto=yes ;; sparc86x-*-elf*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/sp86x-elf.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/sp86x-elf.h" tmake_file="sparc/t-sp86x sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" use_fixproto=yes @@ -2122,7 +2140,7 @@ sparc64-*-aout*) use_fixproto=yes ;; sparc64-*-elf*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/sp64-elf.h" tmake_file="${tmake_file} sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" use_fixproto=yes @@ -2398,24 +2416,24 @@ if test x$with_cpu = x ; then esac fi - # Similarly for --with-schedule. - if test x$with_schedule = x; then - case ${target} in - hppa1* | parisc1*) - # Override default PA8000 scheduling model. - with_schedule=7100LC - ;; - esac - fi +# Similarly for --with-schedule. +if test x$with_schedule = x; then + case ${target} in + hppa1* | parisc1*) + # Override default PA8000 scheduling model. + with_schedule=7100LC + ;; + esac +fi - # Validate and mark as valid any --with options supported - # by this target. In order to use a particular --with option - # you must list it in supported_defaults; validating the value - # is optional. This case statement should set nothing besides - # supported_defaults. +# Validate and mark as valid any --with options supported +# by this target. In order to use a particular --with option +# you must list it in supported_defaults; validating the value +# is optional. This case statement should set nothing besides +# supported_defaults. - supported_defaults= - case "${target}" in +supported_defaults= +case "${target}" in alpha*-*-*) supported_defaults="cpu tune" for which in cpu tune; do @@ -2569,8 +2587,7 @@ fi eval $with_which= ;; "" | common \ - | power | power2 | power3 | power4 \ - | powerpc | powerpc64 \ + | power | power[2345] | powerpc | powerpc64 \ | rios | rios1 | rios2 | rsc | rsc1 | rs64a \ | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \ | 601 | 602 | 603 | 603e | ec603e | 604 \ @@ -2655,11 +2672,11 @@ fi ;; esac ;; - esac +esac - # Set some miscellaneous flags for particular targets. - target_cpu_default2= - case ${target} in +# Set some miscellaneous flags for particular targets. +target_cpu_default2= +case ${target} in alpha*-*-*) if test x$gas = xyes then @@ -2771,44 +2788,45 @@ fi ;; esac ;; - esac +esac - t= - all_defaults="abi cpu arch tune schedule float mode" - for option in $all_defaults - do - eval "val=\$with_$option" - if test -n "$val"; then - case " $supported_defaults " in - *" $option "*) - ;; - *) - echo "This target does not support --with-$option." 2>&1 - exit 1 - ;; - esac +t= +all_defaults="abi cpu arch tune schedule float mode" +for option in $all_defaults +do + eval "val=\$with_$option" + if test -n "$val"; then + case " $supported_defaults " in + *" $option "*) + ;; + *) + echo "This target does not support --with-$option." 2>&1 + exit 1 + ;; + esac - if test "x$t" = x - then - t="{ \"$option\", \"$val\" }" - else - t="${t}, { \"$option\", \"$val\" }" - fi + if test "x$t" = x + then + t="{ \"$option\", \"$val\" }" + else + t="${t}, { \"$option\", \"$val\" }" fi - done - if test "x$t" = x - then - configure_default_options="{ { NULL, NULL} }" - else - configure_default_options="{ ${t} }" fi +done + +if test "x$t" = x +then + configure_default_options="{ { NULL, NULL} }" +else + configure_default_options="{ ${t} }" +fi - if test "$target_cpu_default2" != "" +if test "$target_cpu_default2" != "" +then + if test "$target_cpu_default" != "" then - if test "$target_cpu_default" != "" - then - target_cpu_default="(${target_cpu_default}|${target_cpu_default2})" - else - target_cpu_default=$target_cpu_default2 - fi + target_cpu_default="(${target_cpu_default}|${target_cpu_default2})" + else + target_cpu_default=$target_cpu_default2 fi +fi diff --git a/contrib/gcc/config.in b/contrib/gcc/config.in index f791507..547dda0 100644 --- a/contrib/gcc/config.in +++ b/contrib/gcc/config.in @@ -262,6 +262,9 @@ skip when using the GAS .p2align command. */ #undef HAVE_GAS_MAX_SKIP_P2ALIGN +/* Define if your assembler supports .nsubspa comdat option. */ +#undef HAVE_GAS_NSUBSPA_COMDAT + /* Define 0/1 if your assembler supports marking sections with SHF_MERGE flag. */ #undef HAVE_GAS_SHF_MERGE @@ -319,6 +322,9 @@ a read-write section. */ #undef HAVE_LD_RO_RW_SECTION_MIXING +/* Define if your linker supports -Bstatic/-Bdynamic option. */ +#undef HAVE_LD_STATIC_DYNAMIC + /* Define to 1 if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H @@ -534,9 +540,6 @@ /* Define if your assembler mis-optimizes .eh_frame data. */ #undef USE_AS_TRADITIONAL_FORMAT -/* Define if gcc should use -lunwind. */ -#undef USE_LIBUNWIND_EXCEPTIONS - /* Define to be the last portion of registry key on windows hosts. */ #undef WIN32_REGISTRY_KEY @@ -549,9 +552,11 @@ /* Define to `int' if <sys/types.h> doesn't define. */ #undef gid_t -/* Define as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus #undef inline +#endif /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t diff --git a/contrib/gcc/config/alpha/alpha.c b/contrib/gcc/config/alpha/alpha.c index 0086968..fbaeabe 100644 --- a/contrib/gcc/config/alpha/alpha.c +++ b/contrib/gcc/config/alpha/alpha.c @@ -1947,6 +1947,17 @@ alpha_legitimize_address (rtx x, rtx scratch, } } +/* Primarily this is required for TLS symbols, but given that our move + patterns *ought* to be able to handle any symbol at any time, we + should never be spilling symbolic operands to the constant pool, ever. */ + +static bool +alpha_cannot_force_const_mem (rtx x) +{ + enum rtx_code code = GET_CODE (x); + return code == SYMBOL_REF || code == LABEL_REF || code == CONST; +} + /* We do not allow indirect calls to be optimized into sibling calls, nor can we allow a call to a function with a different GP to be optimized into a sibcall. */ @@ -3186,7 +3197,13 @@ alpha_emit_conditional_branch (enum rtx_code code) /* If the constants doesn't fit into an immediate, but can be generated by lda/ldah, we adjust the argument and compare against zero, so we can use beq/bne directly. */ - else if (GET_CODE (op1) == CONST_INT && (code == EQ || code == NE)) + /* ??? Don't do this when comparing against symbols, otherwise + we'll reduce (&x == 0x1234) to (&x-0x1234 == 0), which will + be declared false out of hand (at least for non-weak). */ + else if (GET_CODE (op1) == CONST_INT + && (code == EQ || code == NE) + && !(symbolic_operand (op0, VOIDmode) + || (GET_CODE (op0) == REG && REG_POINTER (op0)))) { HOST_WIDE_INT v = INTVAL (op1), n = -v; @@ -6786,11 +6803,6 @@ alpha_sa_mask (unsigned long *imaskP, unsigned long *fmaskP) break; imask |= 1UL << regno; } - - /* Glibc likes to use $31 as an unwind stopper for crt0. To - avoid hackery in unwind-dw2.c, we need to actively store a - zero in the prologue of _Unwind_RaiseException et al. */ - imask |= 1UL << 31; } /* If any register spilled, then spill the return address also. */ @@ -7046,6 +7058,48 @@ set_frame_related_p (void) #define FRP(exp) (start_sequence (), exp, set_frame_related_p ()) +/* Generates a store with the proper unwind info attached. VALUE is + stored at BASE_REG+BASE_OFS. If FRAME_BIAS is non-zero, then BASE_REG + contains SP+FRAME_BIAS, and that is the unwind info that should be + generated. If FRAME_REG != VALUE, then VALUE is being stored on + behalf of FRAME_REG, and FRAME_REG should be present in the unwind. */ + +static void +emit_frame_store_1 (rtx value, rtx base_reg, HOST_WIDE_INT frame_bias, + HOST_WIDE_INT base_ofs, rtx frame_reg) +{ + rtx addr, mem, insn; + + addr = plus_constant (base_reg, base_ofs); + mem = gen_rtx_MEM (DImode, addr); + set_mem_alias_set (mem, alpha_sr_alias_set); + + insn = emit_move_insn (mem, value); + RTX_FRAME_RELATED_P (insn) = 1; + + if (frame_bias || value != frame_reg) + { + if (frame_bias) + { + addr = plus_constant (stack_pointer_rtx, frame_bias + base_ofs); + mem = gen_rtx_MEM (DImode, addr); + } + + REG_NOTES (insn) + = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, + gen_rtx_SET (VOIDmode, mem, frame_reg), + REG_NOTES (insn)); + } +} + +static void +emit_frame_store (unsigned int regno, rtx base_reg, + HOST_WIDE_INT frame_bias, HOST_WIDE_INT base_ofs) +{ + rtx reg = gen_rtx_REG (DImode, regno); + emit_frame_store_1 (reg, base_reg, frame_bias, base_ofs, reg); +} + /* Write function prologue. */ /* On vms we have two kinds of functions: @@ -7075,7 +7129,7 @@ alpha_expand_prologue (void) HOST_WIDE_INT frame_size; /* Offset from base reg to register save area. */ HOST_WIDE_INT reg_offset; - rtx sa_reg, mem; + rtx sa_reg; int i; sa_size = alpha_sa_size (); @@ -7225,37 +7279,40 @@ alpha_expand_prologue (void) if (!TARGET_ABI_UNICOSMK) { + HOST_WIDE_INT sa_bias = 0; + /* Cope with very large offsets to the register save area. */ sa_reg = stack_pointer_rtx; if (reg_offset + sa_size > 0x8000) { int low = ((reg_offset & 0xffff) ^ 0x8000) - 0x8000; - HOST_WIDE_INT bias; + rtx sa_bias_rtx; if (low + sa_size <= 0x8000) - bias = reg_offset - low, reg_offset = low; + sa_bias = reg_offset - low, reg_offset = low; else - bias = reg_offset, reg_offset = 0; + sa_bias = reg_offset, reg_offset = 0; sa_reg = gen_rtx_REG (DImode, 24); - FRP (emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, - GEN_INT (bias)))); + sa_bias_rtx = GEN_INT (sa_bias); + + if (add_operand (sa_bias_rtx, DImode)) + emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, sa_bias_rtx)); + else + { + emit_move_insn (sa_reg, sa_bias_rtx); + emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, sa_reg)); + } } /* Save regs in stack order. Beginning with VMS PV. */ if (TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_STACK) - { - mem = gen_rtx_MEM (DImode, stack_pointer_rtx); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, gen_rtx_REG (DImode, REG_PV))); - } + emit_frame_store (REG_PV, stack_pointer_rtx, 0, 0); /* Save register RA next. */ if (imask & (1UL << REG_RA)) { - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, gen_rtx_REG (DImode, REG_RA))); + emit_frame_store (REG_RA, sa_reg, sa_bias, reg_offset); imask &= ~(1UL << REG_RA); reg_offset += 8; } @@ -7264,36 +7321,14 @@ alpha_expand_prologue (void) for (i = 0; i < 31; i++) if (imask & (1UL << i)) { - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, gen_rtx_REG (DImode, i))); + emit_frame_store (i, sa_reg, sa_bias, reg_offset); reg_offset += 8; } - /* Store a zero if requested for unwinding. */ - if (imask & (1UL << 31)) - { - rtx insn, t; - - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - insn = emit_move_insn (mem, const0_rtx); - - RTX_FRAME_RELATED_P (insn) = 1; - t = gen_rtx_REG (Pmode, 31); - t = gen_rtx_SET (VOIDmode, mem, t); - t = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, t, REG_NOTES (insn)); - REG_NOTES (insn) = t; - - reg_offset += 8; - } - for (i = 0; i < 31; i++) if (fmask & (1UL << i)) { - mem = gen_rtx_MEM (DFmode, plus_constant (sa_reg, reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, gen_rtx_REG (DFmode, i+32))); + emit_frame_store (i+32, sa_reg, sa_bias, reg_offset); reg_offset += 8; } } @@ -7307,19 +7342,13 @@ alpha_expand_prologue (void) for (i = 9; i < 15; i++) if (imask & (1UL << i)) { - mem = gen_rtx_MEM (DImode, plus_constant(hard_frame_pointer_rtx, - reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, gen_rtx_REG (DImode, i))); + emit_frame_store (i, hard_frame_pointer_rtx, 0, reg_offset); reg_offset -= 8; } for (i = 2; i < 10; i++) if (fmask & (1UL << i)) { - mem = gen_rtx_MEM (DFmode, plus_constant (hard_frame_pointer_rtx, - reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, gen_rtx_REG (DFmode, i+32))); + emit_frame_store (i+32, hard_frame_pointer_rtx, 0, reg_offset); reg_offset -= 8; } } @@ -7713,9 +7742,6 @@ alpha_expand_epilogue (void) reg_offset += 8; } - if (imask & (1UL << 31)) - reg_offset += 8; - for (i = 0; i < 31; ++i) if (fmask & (1UL << i)) { @@ -10215,6 +10241,8 @@ alpha_init_libfuncs (void) #define TARGET_FUNCTION_OK_FOR_SIBCALL alpha_function_ok_for_sibcall #undef TARGET_CANNOT_COPY_INSN_P #define TARGET_CANNOT_COPY_INSN_P alpha_cannot_copy_insn_p +#undef TARGET_CANNOT_FORCE_CONST_MEM +#define TARGET_CANNOT_FORCE_CONST_MEM alpha_cannot_force_const_mem #if TARGET_ABI_OSF #undef TARGET_ASM_OUTPUT_MI_THUNK @@ -10257,4 +10285,3 @@ struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-alpha.h" - diff --git a/contrib/gcc/config/alpha/alpha.h b/contrib/gcc/config/alpha/alpha.h index d59797c..ae3a349 100644 --- a/contrib/gcc/config/alpha/alpha.h +++ b/contrib/gcc/config/alpha/alpha.h @@ -641,6 +641,7 @@ extern const char *alpha_tls_size_string; /* For -mtls-size= */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((REGNO) >= 32 && (REGNO) <= 62 \ ? (MODE) == SFmode || (MODE) == DFmode || (MODE) == DImode \ + || (MODE) == SCmode || (MODE) == DCmode \ : 1) /* Value is 1 if MODE is a supported vector mode. */ @@ -1189,6 +1190,7 @@ do { \ #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 26) #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26) #define DWARF_ALT_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (64) +#define DWARF_ZERO_REG 31 /* Describe how we implement __builtin_eh_return. */ #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 16 : INVALID_REGNUM) diff --git a/contrib/gcc/config/alpha/alpha.md b/contrib/gcc/config/alpha/alpha.md index 998e300..c008e1b 100644 --- a/contrib/gcc/config/alpha/alpha.md +++ b/contrib/gcc/config/alpha/alpha.md @@ -77,6 +77,7 @@ (UNSPECV_PLDGP2 11) ; prologue ldgp (UNSPECV_SET_TP 12) (UNSPECV_RPCC 13) + (UNSPECV_SETJMPR_ER 14) ; builtin_setjmp_receiver fragment ]) ;; Where necessary, the suffixes _le and _be are used to distinguish between @@ -438,9 +439,9 @@ ;; and if we split before reload, we will require additional instructions. (define_insn "*adddi_fp_hack" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI (match_operand:DI 1 "reg_no_subreg_operand" "r") - (match_operand:DI 2 "const_int_operand" "n")))] + [(set (match_operand:DI 0 "register_operand" "=r,r,r") + (plus:DI (match_operand:DI 1 "reg_no_subreg_operand" "r,r,r") + (match_operand:DI 2 "const_int_operand" "K,L,n")))] "NONSTRICT_REG_OK_FP_BASE_P (operands[1]) && INTVAL (operands[2]) >= 0 /* This is the largest constant an lda+ldah pair can add, minus @@ -454,7 +455,10 @@ + max_reg_num () * UNITS_PER_WORD + current_function_pretend_args_size) - current_function_pretend_args_size))" - "#") + "@ + lda %0,%2(%1) + ldah %0,%h2(%1) + #") ;; Don't do this if we are adjusting SP since we don't want to do it ;; in two steps. Don't split FP sources for the reason listed above. @@ -6897,70 +6901,44 @@ "jmp $31,(%0),0" [(set_attr "type" "ibr")]) -(define_insn "*builtin_setjmp_receiver_er_sl_1" - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && TARGET_AS_CAN_SUBTRACT_LABELS" - "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:") - -(define_insn "*builtin_setjmp_receiver_er_1" - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "br $27,$LSJ%=\n$LSJ%=:" - [(set_attr "type" "ibr")]) - -(define_split - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF - && prev_nonnote_insn (insn) == operands[0]" - [(const_int 0)] - " -{ - emit_note (NOTE_INSN_DELETED); - DONE; -}") - -(define_insn "*builtin_setjmp_receiver_1" +(define_expand "builtin_setjmp_receiver" [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] "TARGET_ABI_OSF" - "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)" - [(set_attr "length" "12") - (set_attr "type" "multi")]) + "") -(define_expand "builtin_setjmp_receiver_er" - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR) +(define_insn_and_split "*builtin_setjmp_receiver_1" + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR)] + "TARGET_ABI_OSF" +{ + if (TARGET_EXPLICIT_RELOCS) + return "#"; + else + return "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)"; +} + "&& TARGET_EXPLICIT_RELOCS && reload_completed" + [(unspec_volatile [(match_dup 0)] UNSPECV_SETJMPR_ER) (set (match_dup 1) (unspec_volatile:DI [(match_dup 2) (match_dup 3)] UNSPECV_LDGP1)) (set (match_dup 1) (unspec:DI [(match_dup 1) (match_dup 3)] UNSPEC_LDGP2))] - "" { operands[1] = pic_offset_table_rtx; operands[2] = gen_rtx_REG (Pmode, 27); operands[3] = GEN_INT (alpha_next_sequence_number++); -}) +} + [(set_attr "length" "12") + (set_attr "type" "multi")]) -(define_expand "builtin_setjmp_receiver" - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] - "TARGET_ABI_OSF" -{ - if (TARGET_EXPLICIT_RELOCS) - { - emit_insn (gen_builtin_setjmp_receiver_er (operands[0])); - DONE; - } -}) +(define_insn "*builtin_setjmp_receiver_er_sl_1" + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)] + "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS && TARGET_AS_CAN_SUBTRACT_LABELS" + "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:") -(define_expand "exception_receiver_er" - [(set (match_dup 0) - (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1)) - (set (match_dup 0) - (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))] - "" -{ - operands[0] = pic_offset_table_rtx; - operands[1] = gen_rtx_REG (Pmode, 26); - operands[2] = GEN_INT (alpha_next_sequence_number++); -}) +(define_insn "*builtin_setjmp_receiver_er_1" + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)] + "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS" + "br $27,$LSJ%=\n$LSJ%=:" + [(set_attr "type" "ibr")]) (define_expand "exception_receiver" [(unspec_volatile [(match_dup 0)] UNSPECV_EHR)] @@ -6968,28 +6946,38 @@ { if (TARGET_LD_BUGGY_LDGP) operands[0] = alpha_gp_save_rtx (); - else if (TARGET_EXPLICIT_RELOCS) - { - emit_insn (gen_exception_receiver_er ()); - DONE; - } else operands[0] = const0_rtx; }) -(define_insn "*exception_receiver_1" - [(unspec_volatile [(const_int 0)] UNSPECV_EHR)] - "! TARGET_LD_BUGGY_LDGP" - "ldgp $29,0($26)" - [(set_attr "length" "8") - (set_attr "type" "multi")]) - (define_insn "*exception_receiver_2" [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_EHR)] - "TARGET_LD_BUGGY_LDGP" + "TARGET_ABI_OSF && TARGET_LD_BUGGY_LDGP" "ldq $29,%0" [(set_attr "type" "ild")]) +(define_insn_and_split "*exception_receiver_1" + [(unspec_volatile [(const_int 0)] UNSPECV_EHR)] + "TARGET_ABI_OSF" +{ + if (TARGET_EXPLICIT_RELOCS) + return "ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*"; + else + return "ldgp $29,0($26)"; +} + "&& TARGET_EXPLICIT_RELOCS && reload_completed" + [(set (match_dup 0) + (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1)) + (set (match_dup 0) + (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))] +{ + operands[0] = pic_offset_table_rtx; + operands[1] = gen_rtx_REG (Pmode, 26); + operands[2] = GEN_INT (alpha_next_sequence_number++); +} + [(set_attr "length" "8") + (set_attr "type" "multi")]) + (define_expand "nonlocal_goto_receiver" [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE) (set (reg:DI 27) (mem:DI (reg:DI 29))) diff --git a/contrib/gcc/config/alpha/qrnnd.asm b/contrib/gcc/config/alpha/qrnnd.asm index d6373ec..da9c4bc 100644 --- a/contrib/gcc/config/alpha/qrnnd.asm +++ b/contrib/gcc/config/alpha/qrnnd.asm @@ -26,6 +26,10 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. +#ifdef __ELF__ +.section .note.GNU-stack,"" +#endif + .set noreorder .set noat diff --git a/contrib/gcc/config/alpha/t-osf4 b/contrib/gcc/config/alpha/t-osf4 index fe747a3..58ce6c2 100644 --- a/contrib/gcc/config/alpha/t-osf4 +++ b/contrib/gcc/config/alpha/t-osf4 @@ -16,8 +16,12 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ -Wl,-hidden_symbol,pthread\* -Wl,-hidden_symbol,__pthread\* \ -Wl,-hidden_symbol,sched_get_\* -Wl,-hidden_symbol,sched_yield \ -Wl,-msym -Wl,-set_version,gcc.1 -Wl,-soname,$(SHLIB_SONAME) \ - -o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \ + -o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \ rm -f $(SHLIB_SONAME) && \ + if [ -f $(SHLIB_NAME) ]; then \ + mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \ + else true; fi && \ + mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \ $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME) # $(slibdir) double quoted to protect it from expansion while building # libgcc.mk. We want this delayed until actual install time. diff --git a/contrib/gcc/config/arm/arm-protos.h b/contrib/gcc/config/arm/arm-protos.h index 471254e..2da99b8 100644 --- a/contrib/gcc/config/arm/arm-protos.h +++ b/contrib/gcc/config/arm/arm-protos.h @@ -1,5 +1,6 @@ /* Prototypes for exported functions defined in arm.c and pe.c - Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 + Free Software Foundation, Inc. Contributed by Richard Earnshaw (rearnsha@arm.com) Minor hacks by Nick Clifton (nickc@cygnus.com) @@ -138,6 +139,7 @@ extern int arm_debugger_arg_offset (int, rtx); extern int arm_is_longcall_p (rtx, int, int); extern int arm_emit_vector_const (FILE *, rtx); extern const char * arm_output_load_gr (rtx *); +extern int arm_eliminable_register (rtx); #if defined TREE_CODE extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int); diff --git a/contrib/gcc/config/arm/arm.c b/contrib/gcc/config/arm/arm.c index 91e4486..9518894 100644 --- a/contrib/gcc/config/arm/arm.c +++ b/contrib/gcc/config/arm/arm.c @@ -1,6 +1,6 @@ /* Output routines for GCC for ARM. Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) and Martin Simmons (@harleqn.co.uk). More major hacks by Richard Earnshaw (rearnsha@arm.com). @@ -4056,6 +4056,16 @@ cirrus_shift_const (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) && INTVAL (op) < 64); } +/* Return true if X is a register that will be eliminated later on. */ +int +arm_eliminable_register (rtx x) +{ + return REG_P (x) && (REGNO (x) == FRAME_POINTER_REGNUM + || REGNO (x) == ARG_POINTER_REGNUM + || (REGNO (x) >= FIRST_VIRTUAL_REGISTER + && REGNO (x) <= LAST_VIRTUAL_REGISTER)); +} + /* Returns TRUE if INSN is an "LDR REG, ADDR" instruction. Use by the Cirrus Maverick code which has to workaround a hardware bug triggered by such instructions. */ @@ -4569,33 +4579,42 @@ adjacent_mem_locations (rtx a, rtx b) || (GET_CODE (XEXP (b, 0)) == PLUS && GET_CODE (XEXP (XEXP (b, 0), 1)) == CONST_INT))) { - int val0 = 0, val1 = 0; - int reg0, reg1; - + HOST_WIDE_INT val0 = 0, val1 = 0; + rtx reg0, reg1; + int val_diff; + if (GET_CODE (XEXP (a, 0)) == PLUS) { - reg0 = REGNO (XEXP (XEXP (a, 0), 0)); + reg0 = XEXP (XEXP (a, 0), 0); val0 = INTVAL (XEXP (XEXP (a, 0), 1)); } else - reg0 = REGNO (XEXP (a, 0)); + reg0 = XEXP (a, 0); if (GET_CODE (XEXP (b, 0)) == PLUS) { - reg1 = REGNO (XEXP (XEXP (b, 0), 0)); + reg1 = XEXP (XEXP (b, 0), 0); val1 = INTVAL (XEXP (XEXP (b, 0), 1)); } else - reg1 = REGNO (XEXP (b, 0)); + reg1 = XEXP (b, 0); /* Don't accept any offset that will require multiple instructions to handle, since this would cause the arith_adjacentmem pattern to output an overlong sequence. */ if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1)) return 0; - - return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4); + + /* Don't allow an eliminable register: register elimination can make + the offset too large. */ + if (arm_eliminable_register (reg0)) + return 0; + + val_diff = val1 - val0; + return ((REGNO (reg0) == REGNO (reg1)) + && (val_diff == 4 || val_diff == -4)); } + return 0; } @@ -7301,7 +7320,6 @@ output_call_mem (rtx *operands) return ""; } - /* Output a move from arm registers to an fpa registers. OPERANDS[0] is an fpa register. OPERANDS[1] is the first registers of an arm register pair. */ diff --git a/contrib/gcc/config/arm/arm.h b/contrib/gcc/config/arm/arm.h index 3a13d91..94d8b94 100644 --- a/contrib/gcc/config/arm/arm.h +++ b/contrib/gcc/config/arm/arm.h @@ -1396,7 +1396,7 @@ enum reg_class : NO_REGS) #define THUMB_SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ - ((CLASS) != LO_REGS \ + ((CLASS) != LO_REGS && (CLASS) != BASE_REGS \ ? ((true_regnum (X) == -1 ? LO_REGS \ : (true_regnum (X) + HARD_REGNO_NREGS (0, MODE) > 8) ? LO_REGS \ : NO_REGS)) \ diff --git a/contrib/gcc/config/arm/arm.md b/contrib/gcc/config/arm/arm.md index 9f10d10..57926ba 100644 --- a/contrib/gcc/config/arm/arm.md +++ b/contrib/gcc/config/arm/arm.md @@ -5960,22 +5960,24 @@ [(set (pc) (if_then_else (match_operator 5 "equality_operator" - [(and:SI (not:SI (match_operand:SI 3 "s_register_operand" "l,l,l,l")) - (match_operand:SI 2 "s_register_operand" "0,1,1,1")) + [(and:SI (not:SI (match_operand:SI 3 "s_register_operand" "l,l,l,l,l")) + (match_operand:SI 2 "s_register_operand" "0,1,1,1,1")) (const_int 0)]) (label_ref (match_operand 4 "" "")) (pc))) - (set (match_operand:SI 0 "thumb_cbrch_target_operand" "=l,*?h,*?m,*?m") + (set (match_operand:SI 0 "thumb_cbrch_target_operand" "=!l,l,*?h,*?m,*?m") (and:SI (not:SI (match_dup 3)) (match_dup 2))) - (clobber (match_scratch:SI 1 "=X,l,&l,&l"))] + (clobber (match_scratch:SI 1 "=X,l,l,&l,&l"))] "TARGET_THUMB" "* { if (which_alternative == 0) output_asm_insn (\"bic\\t%0, %3\", operands); - else if (which_alternative == 1) + else if (which_alternative <= 2) { output_asm_insn (\"bic\\t%1, %3\", operands); + /* It's ok if OP0 is a lo-reg, even though the mov will set the + conditions again, since we're only testing for equality. */ output_asm_insn (\"mov\\t%0, %1\", operands); } else @@ -6234,10 +6236,10 @@ case 1: output_asm_insn (\"cmn\t%1, %2\", operands); break; - case 3: + case 2: output_asm_insn (\"add\t%0, %1, %2\", operands); break; - case 4: + case 3: output_asm_insn (\"add\t%0, %0, %2\", operands); break; } @@ -7128,8 +7130,8 @@ (const_string "no"))) (set (attr "length") (if_then_else - (and (ge (minus (match_dup 0) (pc)) (const_int -2048)) - (le (minus (match_dup 0) (pc)) (const_int 2044))) + (and (ge (minus (match_dup 0) (pc)) (const_int -2044)) + (le (minus (match_dup 0) (pc)) (const_int 2048))) (const_int 2) (const_int 4)))] ) diff --git a/contrib/gcc/config/arm/t-netbsd b/contrib/gcc/config/arm/t-netbsd index 77e6227..533fab9 100644 --- a/contrib/gcc/config/arm/t-netbsd +++ b/contrib/gcc/config/arm/t-netbsd @@ -11,8 +11,12 @@ SHLIB_OBJS = @shlib_objs@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ -Wl,-soname,$(SHLIB_SONAME) \ - -o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \ + -o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \ rm -f $(SHLIB_SONAME) && \ + if [ -f $(SHLIB_NAME) ]; then \ + mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \ + else true; fi && \ + mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \ $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME) # $(slibdir) double quoted to protect it from expansion while building # libgcc.mk. We want this delayed until actual install time. diff --git a/contrib/gcc/config/arm/t-rtems b/contrib/gcc/config/arm/t-rtems new file mode 100644 index 0000000..52d14ba --- /dev/null +++ b/contrib/gcc/config/arm/t-rtems @@ -0,0 +1,10 @@ +# Custom rtems multilibs + +MULTILIB_OPTIONS = marm/mthumb +MULTILIB_DIRNAMES = arm thumb +MULTILIB_EXCEPTIONS = +MULTILIB_MATCHES = marm=mno-thumb + +MULTILIB_OPTIONS += msoft-float/mhard-float +MULTILIB_DIRNAMES += soft fpu +MULTILIB_EXCEPTIONS += *mthumb/*mhard-float* diff --git a/contrib/gcc/config/darwin-protos.h b/contrib/gcc/config/darwin-protos.h index 41bad64..3305112 100644 --- a/contrib/gcc/config/darwin-protos.h +++ b/contrib/gcc/config/darwin-protos.h @@ -65,8 +65,6 @@ extern const char *darwin_strip_name_encoding (const char *); extern void machopic_finish (FILE *); -extern void machopic_output_possible_stub_label (FILE *, const char*); - extern void darwin_exception_section (void); extern void darwin_eh_frame_section (void); extern void machopic_select_section (tree, int, unsigned HOST_WIDE_INT); diff --git a/contrib/gcc/config/darwin.c b/contrib/gcc/config/darwin.c index 8005ecd..c946e59 100644 --- a/contrib/gcc/config/darwin.c +++ b/contrib/gcc/config/darwin.c @@ -900,10 +900,6 @@ machopic_finish (FILE *asm_out_file) if (! TREE_USED (temp)) continue; - /* If the symbol is actually defined, we don't need a stub. */ - if (sym_name[0] == '!' && sym_name[1] == 'T') - continue; - sym_name = darwin_strip_name_encoding (sym_name); sym = alloca (strlen (sym_name) + 2); @@ -1096,37 +1092,6 @@ update_non_lazy_ptrs (const char *name) } } -/* Function NAME is being defined, and its label has just been output. - If there's already a reference to a stub for this function, we can - just emit the stub label now and we don't bother emitting the stub later. */ - -void -machopic_output_possible_stub_label (FILE *file, const char *name) -{ - tree temp; - - /* Ensure we're looking at a section-encoded name. */ - if (name[0] != '!' || (name[1] != 't' && name[1] != 'T')) - return; - - for (temp = machopic_stubs; - temp != NULL_TREE; - temp = TREE_CHAIN (temp)) - { - const char *sym_name; - - sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); - if (sym_name[0] == '!' && (sym_name[1] == 'T' || sym_name[1] == 't') - && ! strcmp (name+2, sym_name+2)) - { - ASM_OUTPUT_LABEL (file, IDENTIFIER_POINTER (TREE_PURPOSE (temp))); - /* Avoid generating a stub for this. */ - TREE_USED (temp) = 0; - break; - } - } -} - /* Scan the list of stubs and update any recorded names whose stripped name matches the argument. */ diff --git a/contrib/gcc/config/darwin.h b/contrib/gcc/config/darwin.h index 045091a..c6ff93f 100644 --- a/contrib/gcc/config/darwin.h +++ b/contrib/gcc/config/darwin.h @@ -99,7 +99,13 @@ Boston, MA 02111-1307, USA. */ Note that an option name with a prefix that matches another option name, that also takes an argument, needs to be modified so the prefix is different, otherwise a '*' after the shorter option will - match with the longer one. */ + match with the longer one. + + The SUBTARGET_OPTION_TRANSLATE_TABLE macro, which _must_ be defined + in gcc/config/{i386,rs6000}/darwin.h, should contain any additional + command-line option translations specific to the particular target + architecture. */ + #define TARGET_OPTION_TRANSLATE_TABLE \ { "-all_load", "-Zall_load" }, \ { "-allowable_client", "-Zallowable_client" }, \ @@ -126,7 +132,8 @@ Boston, MA 02111-1307, USA. */ { "-multi_module", "-Zmulti_module" }, \ { "-static", "-static -Wa,-static" }, \ { "-single_module", "-Zsingle_module" }, \ - { "-unexported_symbols_list", "-Zunexported_symbols_list" } + { "-unexported_symbols_list", "-Zunexported_symbols_list" }, \ + SUBTARGET_OPTION_TRANSLATE_TABLE /* These compiler options take n arguments. */ @@ -390,9 +397,6 @@ do { text_section (); \ || DECL_INITIAL (DECL)) \ (* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \ ASM_OUTPUT_LABEL (FILE, xname); \ - /* Avoid generating stubs for functions we've just defined by \ - outputting any required stub name label now. */ \ - machopic_output_possible_stub_label (FILE, xname); \ } while (0) #define ASM_DECLARE_CONSTANT_NAME(FILE, NAME, EXP, SIZE) \ diff --git a/contrib/gcc/config/freebsd-spec.h b/contrib/gcc/config/freebsd-spec.h index e4459ba..a98b0e5 100644 --- a/contrib/gcc/config/freebsd-spec.h +++ b/contrib/gcc/config/freebsd-spec.h @@ -107,12 +107,12 @@ Boston, MA 02111-1307, USA. */ 500016, select the appropriate libc, depending on whether we're doing profiling or need threads support. At __FreeBSD_version 500016 and later, when threads support is requested include both - -lc and -lc_r instead of only -lc_r. To make matters interesting, - we can't actually use __FreeBSD_version provided by <osreldate.h> - directly since it breaks cross-compiling. As a final twist, make - it a hard error if -pthread is provided on the command line and gcc - was configured with --disable-threads (this will help avoid bug - reports from users complaining about threading when they + -lc and the threading lib instead of only -lc_r. To make matters + interesting, we can't actually use __FreeBSD_version provided by + <osreldate.h> directly since it breaks cross-compiling. As a final + twist, make it a hard error if -pthread is provided on the command + line and gcc was configured with --disable-threads (this will help + avoid bug reports from users complaining about threading when they misconfigured the gcc bootstrap but are later consulting FreeBSD manual pages that refer to the mythical -pthread option). */ @@ -129,13 +129,7 @@ is built with the --enable-threads configure-time option.} \ %{pg: -lc_p} \ }" #else -#if FBSD_MAJOR >= 5 -#define FBSD_LIB_SPEC " \ - %{!shared: \ - %{!pg: %{pthread:-lc_r} -lc} \ - %{pg: %{pthread:-lc_r_p} -lc_p} \ - }" -#else +#if FBSD_MAJOR < 5 #define FBSD_LIB_SPEC " \ %{!shared: \ %{!pg: \ @@ -145,6 +139,12 @@ is built with the --enable-threads configure-time option.} \ %{!pthread:-lc_p} \ %{pthread:-lc_r_p}} \ }" +#else +#define FBSD_LIB_SPEC " \ + %{!shared: \ + %{!pg: %{pthread:-lpthread} -lc} \ + %{pg: %{pthread:-lpthread_p} -lc_p} \ + }" #endif #endif diff --git a/contrib/gcc/config/i386/cygwin1.c b/contrib/gcc/config/i386/cygwin1.c index 2cab96c..88c44fc 100644 --- a/contrib/gcc/config/i386/cygwin1.c +++ b/contrib/gcc/config/i386/cygwin1.c @@ -30,13 +30,13 @@ mingw_scan (int argc ATTRIBUTE_UNUSED, const char *const *argv, char **spec_machine) { - putenv ("GCC_CYGWIN_MINGW=0"); + putenv (xstrdup ("GCC_CYGWIN_MINGW=0")); while (*++argv) if (strcmp (*argv, "-mno-win32") == 0) - putenv ("GCC_CYGWIN_WIN32=0"); + putenv (xstrdup ("GCC_CYGWIN_WIN32=0")); else if (strcmp (*argv, "-mwin32") == 0) - putenv ("GCC_CYGWIN_WIN32=1"); + putenv (xstrdup ("GCC_CYGWIN_WIN32=1")); else if (strcmp (*argv, "-mno-cygwin") == 0) { char *p = strstr (*spec_machine, "-cygwin"); @@ -48,7 +48,7 @@ mingw_scan (int argc ATTRIBUTE_UNUSED, strcpy (s + len, "-mingw32"); *spec_machine = s; } - putenv ("GCC_CYGWIN_MINGW=1"); + putenv (xstrdup ("GCC_CYGWIN_MINGW=1")); } return; } diff --git a/contrib/gcc/config/i386/darwin.h b/contrib/gcc/config/i386/darwin.h index fd501bf..8246b9e 100644 --- a/contrib/gcc/config/i386/darwin.h +++ b/contrib/gcc/config/i386/darwin.h @@ -41,6 +41,10 @@ Boston, MA 02111-1307, USA. */ #undef CC1_SPEC #define CC1_SPEC "%{!static:-fPIC}" +/* Use the following macro for any Darwin/x86-specific command-line option + translation. */ +#define SUBTARGET_OPTION_TRANSLATE_TABLE + #define ASM_SPEC "-arch i386 \ %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \ %{!Zforce_cpusubtype_ALL:%{mmmx:-force_cpusubtype_ALL}\ diff --git a/contrib/gcc/config/i386/emmintrin.h b/contrib/gcc/config/i386/emmintrin.h index abe450a..2869063 100644 --- a/contrib/gcc/config/i386/emmintrin.h +++ b/contrib/gcc/config/i386/emmintrin.h @@ -34,7 +34,7 @@ #include <xmmintrin.h> /* SSE2 */ -typedef int __v2df __attribute__ ((mode (V2DF))); +typedef double __v2df __attribute__ ((mode (V2DF))); typedef int __v2di __attribute__ ((mode (V2DI))); typedef int __v4si __attribute__ ((mode (V4SI))); typedef int __v8hi __attribute__ ((mode (V8HI))); diff --git a/contrib/gcc/config/i386/freebsd.h b/contrib/gcc/config/i386/freebsd.h index 9e538e9..4fc7a9a 100644 --- a/contrib/gcc/config/i386/freebsd.h +++ b/contrib/gcc/config/i386/freebsd.h @@ -138,12 +138,5 @@ Boston, MA 02111-1307, USA. */ /* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the compiler get the contents of <float.h> and std::numeric_limits correct. */ -#define SUBTARGET_OVERRIDE_OPTIONS \ - do { \ - if (!TARGET_64BIT) { \ - REAL_MODE_FORMAT (XFmode) \ - = &ieee_extended_intel_96_round_53_format; \ - REAL_MODE_FORMAT (TFmode) \ - = &ieee_extended_intel_96_round_53_format; \ - } \ - } while (0) +#undef TARGET_96_ROUND_53_LONG_DOUBLE +#define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) diff --git a/contrib/gcc/config/i386/gthr-win32.c b/contrib/gcc/config/i386/gthr-win32.c index 4e2b282..c53369b 100644 --- a/contrib/gcc/config/i386/gthr-win32.c +++ b/contrib/gcc/config/i386/gthr-win32.c @@ -31,11 +31,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA the executable file might be covered by the GNU General Public License. */ +#include <windows.h> #ifndef __GTHREAD_HIDE_WIN32API # define __GTHREAD_HIDE_WIN32API 1 #endif +#undef __GTHREAD_I486_INLINE_LOCK_PRIMITIVES +#define __GTHREAD_I486_INLINE_LOCK_PRIMITIVES #include <gthr-win32.h> -#include <windows.h> /* Windows32 threads specific definitions. The windows32 threading model does not map well into pthread-inspired gcc's threading model, and so @@ -61,10 +63,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA This may cause incorrect error return due to truncation values on hw where sizeof (DWORD) > sizeof (int). - 3. We might consider using Critical Sections instead of Windows32 - mutexes for better performance, but emulating __gthread_mutex_trylock - interface becomes more complicated (Win9x does not support - TryEnterCriticalSectioni, while NT does). + 3. We are currently using a special mutex instead of the Critical + Sections, since Win9x does not support TryEnterCriticalSection + (while NT does). The basic framework should work well enough. In the long term, GCC needs to use Structured Exception Handling on Windows32. */ @@ -145,23 +146,29 @@ __gthr_win32_setspecific (__gthread_key_t key, const void *ptr) void __gthr_win32_mutex_init_function (__gthread_mutex_t *mutex) { - /* Create unnamed mutex with default security attr and no initial owner. */ - *mutex = CreateMutex (NULL, 0, NULL); + mutex->counter = -1; + mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); } int __gthr_win32_mutex_lock (__gthread_mutex_t *mutex) { - if (WaitForSingleObject (*mutex, INFINITE) == WAIT_OBJECT_0) + if (InterlockedIncrement (&mutex->counter) == 0 || + WaitForSingleObject (mutex->sema, INFINITE) == WAIT_OBJECT_0) return 0; else - return 1; + { + /* WaitForSingleObject returns WAIT_FAILED, and we can only do + some best-effort cleanup here. */ + InterlockedDecrement (&mutex->counter); + return 1; + } } int __gthr_win32_mutex_trylock (__gthread_mutex_t *mutex) { - if (WaitForSingleObject (*mutex, 0) == WAIT_OBJECT_0) + if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0) return 0; else return 1; @@ -170,5 +177,8 @@ __gthr_win32_mutex_trylock (__gthread_mutex_t *mutex) int __gthr_win32_mutex_unlock (__gthread_mutex_t *mutex) { - return (ReleaseMutex (*mutex) != 0) ? 0 : 1; + if (InterlockedDecrement (&mutex->counter) >= 0) + return ReleaseSemaphore (mutex->sema, 1, NULL) ? 0 : 1; + else + return 0; } diff --git a/contrib/gcc/config/i386/i386-modes.def b/contrib/gcc/config/i386/i386-modes.def index 89c83c4..36c6d42 100644 --- a/contrib/gcc/config/i386/i386-modes.def +++ b/contrib/gcc/config/i386/i386-modes.def @@ -29,6 +29,8 @@ Boston, MA 02111-1307, USA. */ FLOAT_MODE (XF, 12, ieee_extended_intel_96_format); ADJUST_FLOAT_FORMAT (XF, (TARGET_128BIT_LONG_DOUBLE ? &ieee_extended_intel_128_format + : TARGET_96_ROUND_53_LONG_DOUBLE + ? &ieee_extended_intel_96_round_53_format : &ieee_extended_intel_96_format)); ADJUST_BYTESIZE (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 12); ADJUST_ALIGNMENT (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 4); diff --git a/contrib/gcc/config/i386/i386-protos.h b/contrib/gcc/config/i386/i386-protos.h index cc1bb81..ea0e8f6 100644 --- a/contrib/gcc/config/i386/i386-protos.h +++ b/contrib/gcc/config/i386/i386-protos.h @@ -93,6 +93,7 @@ extern int memory_displacement_operand (rtx, enum machine_mode); extern int cmpsi_operand (rtx, enum machine_mode); extern int long_memory_operand (rtx, enum machine_mode); extern int aligned_operand (rtx, enum machine_mode); +extern int compare_operator (rtx, enum machine_mode); extern enum machine_mode ix86_cc_mode (enum rtx_code, rtx, rtx); extern int ix86_expand_movstr (rtx, rtx, rtx, rtx); diff --git a/contrib/gcc/config/i386/i386.c b/contrib/gcc/config/i386/i386.c index c2f59c9..9504583 100644 --- a/contrib/gcc/config/i386/i386.c +++ b/contrib/gcc/config/i386/i386.c @@ -522,7 +522,14 @@ const int x86_sse_typeless_stores = m_ATHLON_K8; const int x86_sse_load0_by_pxor = m_PPRO | m_PENT4; const int x86_use_ffreep = m_ATHLON_K8; const int x86_rep_movl_optimal = m_386 | m_PENT | m_PPRO | m_K6; -const int x86_inter_unit_moves = ~(m_ATHLON_K8); + +/* ??? HACK! The following is a lie. SSE can hold e.g. SImode, and + indeed *must* be able to hold SImode so that SSE2 shifts are able + to work right. But this can result in some mighty surprising + register allocation when building kernels. Turning this off should + make us less likely to all-of-the-sudden select an SSE register. */ +const int x86_inter_unit_moves = 0; /* ~(m_ATHLON_K8) */ + const int x86_ext_80387_constants = m_K6 | m_ATHLON | m_PENT4 | m_PPRO; /* In case the average insn count for single function invocation is @@ -2536,6 +2543,34 @@ function_arg_advance (CUMULATIVE_ARGS *cum, /* current arg information */ return; } +/* A subroutine of function_arg. We want to pass a parameter whose nominal + type is MODE in REGNO. We try to minimize ABI variation, so MODE may not + actually be valid for REGNO with the current ISA. In this case, ALT_MODE + is used instead. It must be the same size as MODE, and must be known to + be valid for REGNO. Finally, ORIG_MODE is the original mode of the + parameter, as seen by the type system. This may be different from MODE + when we're mucking with things minimizing ABI variations. + + Returns a REG or a PARALLEL as appropriate. */ + +static rtx +gen_reg_or_parallel (enum machine_mode mode, enum machine_mode alt_mode, + enum machine_mode orig_mode, unsigned int regno) +{ + rtx tmp; + + if (HARD_REGNO_MODE_OK (regno, mode)) + tmp = gen_rtx_REG (mode, regno); + else + { + tmp = gen_rtx_REG (alt_mode, regno); + tmp = gen_rtx_EXPR_LIST (VOIDmode, tmp, const0_rtx); + tmp = gen_rtx_PARALLEL (orig_mode, gen_rtvec (1, tmp)); + } + + return tmp; +} + /* Define where to put the arguments to a function. Value is zero to push the argument on the stack, or a hard register in which to store the argument. @@ -2550,12 +2585,11 @@ function_arg_advance (CUMULATIVE_ARGS *cum, /* current arg information */ (otherwise it is an extra parameter matching an ellipsis). */ rtx -function_arg (CUMULATIVE_ARGS *cum, /* current arg information */ - enum machine_mode mode, /* current arg mode */ - tree type, /* type of the argument or 0 if lib support */ - int named) /* != 0 for normal args, == 0 for ... args */ +function_arg (CUMULATIVE_ARGS *cum, enum machine_mode orig_mode, + tree type, int named) { - rtx ret = NULL_RTX; + enum machine_mode mode = orig_mode; + rtx ret = NULL_RTX; int bytes = (mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode); int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; @@ -2628,7 +2662,8 @@ function_arg (CUMULATIVE_ARGS *cum, /* current arg information */ "changes the ABI"); } if (cum->sse_nregs) - ret = gen_rtx_REG (mode, cum->sse_regno + FIRST_SSE_REG); + ret = gen_reg_or_parallel (mode, TImode, orig_mode, + cum->sse_regno + FIRST_SSE_REG); } break; case V8QImode: @@ -2644,7 +2679,8 @@ function_arg (CUMULATIVE_ARGS *cum, /* current arg information */ "changes the ABI"); } if (cum->mmx_nregs) - ret = gen_rtx_REG (mode, cum->mmx_regno + FIRST_MMX_REG); + ret = gen_reg_or_parallel (mode, DImode, orig_mode, + cum->mmx_regno + FIRST_MMX_REG); } break; } @@ -4319,6 +4355,12 @@ aligned_operand (rtx op, enum machine_mode mode) /* Didn't find one -- this must be an aligned address. */ return 1; } + +int +compare_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) +{ + return GET_CODE (op) == COMPARE; +} /* Initialize the table of extra 80387 mathematical constants. */ @@ -5775,45 +5817,40 @@ ix86_find_base_term (rtx x) bool legitimate_constant_p (rtx x) { - rtx inner; - switch (GET_CODE (x)) { - case SYMBOL_REF: - /* TLS symbols are not constant. */ - if (tls_symbolic_operand (x, Pmode)) - return false; - break; - case CONST: - inner = XEXP (x, 0); - - /* Offsets of TLS symbols are never valid. - Discourage CSE from creating them. */ - if (GET_CODE (inner) == PLUS - && tls_symbolic_operand (XEXP (inner, 0), Pmode)) - return false; + x = XEXP (x, 0); - if (GET_CODE (inner) == PLUS - || GET_CODE (inner) == MINUS) + if (GET_CODE (x) == PLUS) { - if (GET_CODE (XEXP (inner, 1)) != CONST_INT) + if (GET_CODE (XEXP (x, 1)) != CONST_INT) return false; - inner = XEXP (inner, 0); + x = XEXP (x, 0); } /* Only some unspecs are valid as "constants". */ - if (GET_CODE (inner) == UNSPEC) - switch (XINT (inner, 1)) + if (GET_CODE (x) == UNSPEC) + switch (XINT (x, 1)) { case UNSPEC_TPOFF: case UNSPEC_NTPOFF: - return local_exec_symbolic_operand (XVECEXP (inner, 0, 0), Pmode); + return local_exec_symbolic_operand (XVECEXP (x, 0, 0), Pmode); case UNSPEC_DTPOFF: - return local_dynamic_symbolic_operand (XVECEXP (inner, 0, 0), Pmode); + return local_dynamic_symbolic_operand (XVECEXP (x, 0, 0), Pmode); default: return false; } + + /* We must have drilled down to a symbol. */ + if (!symbolic_operand (x, Pmode)) + return false; + /* FALLTHRU */ + + case SYMBOL_REF: + /* TLS symbols are never valid. */ + if (tls_symbolic_operand (x, Pmode)) + return false; break; default: @@ -10609,10 +10646,11 @@ ix86_split_to_parts (rtx operand, rtx *parts, enum machine_mode mode) else if (GET_CODE (operand) == CONST_DOUBLE) { REAL_VALUE_TYPE r; - long l[3]; + long l[4]; REAL_VALUE_FROM_CONST_DOUBLE (r, operand); real_to_target (l, &r, mode); + /* Do not use shift by 32 to avoid warning on 32bit systems. */ if (HOST_BITS_PER_WIDE_INT >= 64) parts[0] @@ -10622,6 +10660,7 @@ ix86_split_to_parts (rtx operand, rtx *parts, enum machine_mode mode) DImode); else parts[0] = immed_double_const (l[0], l[1], DImode); + if (upper_mode == SImode) parts[1] = gen_int_mode (l[2], SImode); else if (HOST_BITS_PER_WIDE_INT >= 64) @@ -14896,10 +14935,29 @@ ix86_hard_regno_mode_ok (int regno, enum machine_mode mode) if (FP_REGNO_P (regno)) return VALID_FP_MODE_P (mode); if (SSE_REGNO_P (regno)) - return (TARGET_SSE ? VALID_SSE_REG_MODE (mode) : 0); + { + /* HACK! We didn't change all of the constraints for SSE1 for the + scalar modes on the branch. Fortunately, they're not required + for ABI compatibility. */ + if (!TARGET_SSE2 && !VECTOR_MODE_P (mode)) + return VALID_SSE_REG_MODE (mode); + + /* We implement the move patterns for all vector modes into and + out of SSE registers, even when no operation instructions + are available. */ + return (VALID_SSE_REG_MODE (mode) + || VALID_SSE2_REG_MODE (mode) + || VALID_MMX_REG_MODE (mode) + || VALID_MMX_REG_MODE_3DNOW (mode)); + } if (MMX_REGNO_P (regno)) - return (TARGET_MMX - ? VALID_MMX_REG_MODE (mode) || VALID_MMX_REG_MODE_3DNOW (mode) : 0); + { + /* We implement the move patterns for 3DNOW modes even in MMX mode, + so if the register is available at all, then we can move data of + the given mode into or out of it. */ + return (VALID_MMX_REG_MODE (mode) + || VALID_MMX_REG_MODE_3DNOW (mode)); + } /* We handle both integer and floats in the general purpose registers. In future we should be able to handle vector modes as well. */ if (!VALID_INT_MODE_P (mode) && !VALID_FP_MODE_P (mode)) @@ -15235,7 +15293,9 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) return false; case FLOAT_EXTEND: - if (!TARGET_SSE_MATH || !VALID_SSE_REG_MODE (mode)) + if (!TARGET_SSE_MATH + || mode == XFmode + || (mode == DFmode && !TARGET_SSE2)) *total = 0; return false; diff --git a/contrib/gcc/config/i386/i386.h b/contrib/gcc/config/i386/i386.h index f5be340..8a912d5 100644 --- a/contrib/gcc/config/i386/i386.h +++ b/contrib/gcc/config/i386/i386.h @@ -447,6 +447,10 @@ extern int x86_prefetch_sse; redefines this to 1. */ #define TARGET_MACHO 0 +/* Subtargets may reset this to 1 in order to enable 96-bit long double + with the rounding mode forced to 53 bits. */ +#define TARGET_96_ROUND_53_LONG_DOUBLE 0 + /* This macro is similar to `TARGET_SWITCHES' but defines names of command options that have values. Its definition is an initializer with a subgrouping for each command option. @@ -1059,14 +1063,11 @@ do { \ #define VALID_SSE2_REG_MODE(MODE) \ ((MODE) == V16QImode || (MODE) == V8HImode || (MODE) == V2DFmode \ - || (MODE) == V2DImode) + || (MODE) == V2DImode || (MODE) == DFmode) #define VALID_SSE_REG_MODE(MODE) \ ((MODE) == TImode || (MODE) == V4SFmode || (MODE) == V4SImode \ - || (MODE) == SFmode || (MODE) == TFmode \ - /* Always accept SSE2 modes so that xmmintrin.h compiles. */ \ - || VALID_SSE2_REG_MODE (MODE) \ - || (TARGET_SSE2 && ((MODE) == DFmode || VALID_MMX_REG_MODE (MODE)))) + || (MODE) == SFmode || (MODE) == TFmode) #define VALID_MMX_REG_MODE_3DNOW(MODE) \ ((MODE) == V2SFmode || (MODE) == SFmode) @@ -2990,7 +2991,8 @@ do { \ {"zero_extended_scalar_load_operand", {MEM}}, \ {"vector_move_operand", {CONST_VECTOR, SUBREG, REG, MEM}}, \ {"no_seg_address_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \ - LABEL_REF, SUBREG, REG, MEM, PLUS, MULT}}, + LABEL_REF, SUBREG, REG, MEM, PLUS, MULT}}, \ + {"compare_operator", {COMPARE}}, /* A list of predicates that do special things with modes, and so should not elicit warnings for VOIDmode match_operand. */ diff --git a/contrib/gcc/config/i386/i386.md b/contrib/gcc/config/i386/i386.md index a190d23..93d9dcd 100644 --- a/contrib/gcc/config/i386/i386.md +++ b/contrib/gcc/config/i386/i386.md @@ -1261,10 +1261,9 @@ "" "xchg{l}\t%1, %0" [(set_attr "type" "imov") + (set_attr "mode" "SI") (set_attr "pent_pair" "np") (set_attr "athlon_decode" "vector") - (set_attr "mode" "SI") - (set_attr "modrm" "0") (set_attr "ppro_uops" "few")]) (define_expand "movhi" @@ -1377,12 +1376,12 @@ (match_operand:HI 1 "register_operand" "+r")) (set (match_dup 1) (match_dup 0))] - "TARGET_PARTIAL_REG_STALL" - "xchg{w}\t%1, %0" + "!TARGET_PARTIAL_REG_STALL || optimize_size" + "xchg{l}\t%k1, %k0" [(set_attr "type" "imov") + (set_attr "mode" "SI") (set_attr "pent_pair" "np") - (set_attr "mode" "HI") - (set_attr "modrm" "0") + (set_attr "athlon_decode" "vector") (set_attr "ppro_uops" "few")]) (define_insn "*swaphi_2" @@ -1390,12 +1389,12 @@ (match_operand:HI 1 "register_operand" "+r")) (set (match_dup 1) (match_dup 0))] - "! TARGET_PARTIAL_REG_STALL" - "xchg{l}\t%k1, %k0" + "TARGET_PARTIAL_REG_STALL" + "xchg{w}\t%1, %0" [(set_attr "type" "imov") + (set_attr "mode" "HI") (set_attr "pent_pair" "np") - (set_attr "mode" "SI") - (set_attr "modrm" "0") + (set_attr "athlon_decode" "vector") (set_attr "ppro_uops" "few")]) (define_expand "movstricthi" @@ -1543,17 +1542,30 @@ DONE; }) -(define_insn "*swapqi" +(define_insn "*swapqi_1" [(set (match_operand:QI 0 "register_operand" "+r") (match_operand:QI 1 "register_operand" "+r")) (set (match_dup 1) (match_dup 0))] - "" - "xchg{b}\t%1, %0" + "!TARGET_PARTIAL_REG_STALL || optimize_size" + "xchg{l}\t%k1, %k0" [(set_attr "type" "imov") + (set_attr "mode" "SI") (set_attr "pent_pair" "np") + (set_attr "athlon_decode" "vector") + (set_attr "ppro_uops" "few")]) + +(define_insn "*swapqi_2" + [(set (match_operand:QI 0 "register_operand" "+q") + (match_operand:QI 1 "register_operand" "+q")) + (set (match_dup 1) + (match_dup 0))] + "TARGET_PARTIAL_REG_STALL" + "xchg{b}\t%1, %0" + [(set_attr "type" "imov") (set_attr "mode" "QI") - (set_attr "modrm" "0") + (set_attr "pent_pair" "np") + (set_attr "athlon_decode" "vector") (set_attr "ppro_uops" "few")]) (define_expand "movstrictqi" @@ -2108,13 +2120,11 @@ "TARGET_64BIT" "xchg{q}\t%1, %0" [(set_attr "type" "imov") + (set_attr "mode" "DI") (set_attr "pent_pair" "np") (set_attr "athlon_decode" "vector") - (set_attr "mode" "DI") - (set_attr "modrm" "0") (set_attr "ppro_uops" "few")]) - (define_expand "movsf" [(set (match_operand:SF 0 "nonimmediate_operand" "") (match_operand:SF 1 "general_operand" ""))] @@ -6314,9 +6324,13 @@ } } [(set (attr "type") - (if_then_else (match_operand:QI 2 "incdec_operand" "") + (if_then_else (match_operand:QI 1 "incdec_operand" "") (const_string "incdec") (const_string "alu1"))) + (set (attr "memory") + (if_then_else (match_operand 1 "memory_operand" "") + (const_string "load") + (const_string "none"))) (set_attr "mode" "QI")]) (define_insn "*addqi_2" @@ -7872,18 +7886,21 @@ "" "") -(define_insn "*testqi_1" +(define_insn "*testqi_1_maybe_si" [(set (reg 17) - (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%!*a,q,qm,r") - (match_operand:QI 1 "general_operand" "n,n,qn,n")) - (const_int 0)))] - "ix86_match_ccmode (insn, CCNOmode) - && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + (compare + (and:QI + (match_operand:QI 0 "nonimmediate_operand" "%!*a,q,qm,r") + (match_operand:QI 1 "general_operand" "n,n,qn,n")) + (const_int 0)))] + "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) + && ix86_match_ccmode (insn, + GET_CODE (operands[1]) == CONST_INT + && INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode)" { if (which_alternative == 3) { - if (GET_CODE (operands[1]) == CONST_INT - && (INTVAL (operands[1]) & 0xffffff00)) + if (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) < 0) operands[1] = GEN_INT (INTVAL (operands[1]) & 0xff); return "test{l}\t{%1, %k0|%k0, %1}"; } @@ -7894,6 +7911,21 @@ (set_attr "mode" "QI,QI,QI,SI") (set_attr "pent_pair" "uv,np,uv,np")]) +(define_insn "*testqi_1" + [(set (reg 17) + (compare + (and:QI + (match_operand:QI 0 "nonimmediate_operand" "%!*a,q,qm") + (match_operand:QI 1 "general_operand" "n,n,qn")) + (const_int 0)))] + "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) + && ix86_match_ccmode (insn, CCNOmode)" + "test{b}\t{%1, %0|%0, %1}" + [(set_attr "type" "test") + (set_attr "modrm" "0,1,1") + (set_attr "mode" "QI") + (set_attr "pent_pair" "uv,np,uv")]) + (define_expand "testqi_ext_ccno_0" [(set (reg:CCNO 17) (compare:CCNO @@ -8012,51 +8044,53 @@ "#") (define_split - [(set (reg 17) - (compare (zero_extract - (match_operand 0 "nonimmediate_operand" "") - (match_operand 1 "const_int_operand" "") - (match_operand 2 "const_int_operand" "")) - (const_int 0)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(zero_extract + (match_operand 2 "nonimmediate_operand" "") + (match_operand 3 "const_int_operand" "") + (match_operand 4 "const_int_operand" "")) + (const_int 0)]))] "ix86_match_ccmode (insn, CCNOmode)" - [(set (reg:CCNO 17) (compare:CCNO (match_dup 3) (const_int 0)))] + [(set (match_dup 0) (match_op_dup 1 [(match_dup 2) (const_int 0)]))] { - HOST_WIDE_INT len = INTVAL (operands[1]); - HOST_WIDE_INT pos = INTVAL (operands[2]); + rtx val = operands[2]; + HOST_WIDE_INT len = INTVAL (operands[3]); + HOST_WIDE_INT pos = INTVAL (operands[4]); HOST_WIDE_INT mask; enum machine_mode mode, submode; - mode = GET_MODE (operands[0]); - if (GET_CODE (operands[0]) == MEM) + mode = GET_MODE (val); + if (GET_CODE (val) == MEM) { /* ??? Combine likes to put non-volatile mem extractions in QImode no matter the size of the test. So find a mode that works. */ - if (! MEM_VOLATILE_P (operands[0])) + if (! MEM_VOLATILE_P (val)) { mode = smallest_mode_for_size (pos + len, MODE_INT); - operands[0] = adjust_address (operands[0], mode, 0); + val = adjust_address (val, mode, 0); } } - else if (GET_CODE (operands[0]) == SUBREG - && (submode = GET_MODE (SUBREG_REG (operands[0])), + else if (GET_CODE (val) == SUBREG + && (submode = GET_MODE (SUBREG_REG (val)), GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (submode)) && pos + len <= GET_MODE_BITSIZE (submode)) { /* Narrow a paradoxical subreg to prevent partial register stalls. */ mode = submode; - operands[0] = SUBREG_REG (operands[0]); + val = SUBREG_REG (val); } else if (mode == HImode && pos + len <= 8) { /* Small HImode tests can be converted to QImode. */ mode = QImode; - operands[0] = gen_lowpart (QImode, operands[0]); + val = gen_lowpart (QImode, val); } mask = ((HOST_WIDE_INT)1 << (pos + len)) - 1; mask &= ~(((HOST_WIDE_INT)1 << pos) - 1); - operands[3] = gen_rtx_AND (mode, operands[0], gen_int_mode (mask, mode)); + operands[2] = gen_rtx_AND (mode, val, gen_int_mode (mask, mode)); }) ;; Convert HImode/SImode test instructions with immediate to QImode ones. @@ -8065,46 +8099,44 @@ ;; Do the conversion only post-reload to avoid limiting of the register class ;; to QI regs. (define_split - [(set (reg 17) - (compare - (and (match_operand 0 "register_operand" "") - (match_operand 1 "const_int_operand" "")) - (const_int 0)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(and (match_operand 2 "register_operand" "") + (match_operand 3 "const_int_operand" "")) + (const_int 0)]))] "reload_completed - && QI_REG_P (operands[0]) + && QI_REG_P (operands[2]) + && GET_MODE (operands[2]) != QImode && ((ix86_match_ccmode (insn, CCZmode) - && !(INTVAL (operands[1]) & ~(255 << 8))) + && !(INTVAL (operands[3]) & ~(255 << 8))) || (ix86_match_ccmode (insn, CCNOmode) - && !(INTVAL (operands[1]) & ~(127 << 8)))) - && GET_MODE (operands[0]) != QImode" - [(set (reg:CCNO 17) - (compare:CCNO - (and:SI (zero_extract:SI (match_dup 0) (const_int 8) (const_int 8)) - (match_dup 1)) - (const_int 0)))] - "operands[0] = gen_lowpart (SImode, operands[0]); - operands[1] = gen_int_mode (INTVAL (operands[1]) >> 8, SImode);") + && !(INTVAL (operands[3]) & ~(127 << 8))))" + [(set (match_dup 0) + (match_op_dup 1 + [(and:SI (zero_extract:SI (match_dup 2) (const_int 8) (const_int 8)) + (match_dup 3)) + (const_int 0)]))] + "operands[2] = gen_lowpart (SImode, operands[2]); + operands[3] = gen_int_mode (INTVAL (operands[3]) >> 8, SImode);") (define_split - [(set (reg 17) - (compare - (and (match_operand 0 "nonimmediate_operand" "") - (match_operand 1 "const_int_operand" "")) - (const_int 0)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(and (match_operand 2 "nonimmediate_operand" "") + (match_operand 3 "const_int_operand" "")) + (const_int 0)]))] "reload_completed - && (!REG_P (operands[0]) || ANY_QI_REG_P (operands[0])) + && GET_MODE (operands[2]) != QImode + && (!REG_P (operands[2]) || ANY_QI_REG_P (operands[2])) && ((ix86_match_ccmode (insn, CCZmode) - && !(INTVAL (operands[1]) & ~255)) + && !(INTVAL (operands[3]) & ~255)) || (ix86_match_ccmode (insn, CCNOmode) - && !(INTVAL (operands[1]) & ~127))) - && GET_MODE (operands[0]) != QImode" - [(set (reg:CCNO 17) - (compare:CCNO - (and:QI (match_dup 0) - (match_dup 1)) - (const_int 0)))] - "operands[0] = gen_lowpart (QImode, operands[0]); - operands[1] = gen_lowpart (QImode, operands[1]);") + && !(INTVAL (operands[3]) & ~127)))" + [(set (match_dup 0) + (match_op_dup 1 [(and:QI (match_dup 2) (match_dup 3)) + (const_int 0)]))] + "operands[2] = gen_lowpart (QImode, operands[2]); + operands[3] = gen_lowpart (QImode, operands[3]);") ;; %%% This used to optimize known byte-wide and operations to memory, @@ -8381,21 +8413,22 @@ [(set_attr "type" "alu1") (set_attr "mode" "QI")]) -(define_insn "*andqi_2" +(define_insn "*andqi_2_maybe_si" [(set (reg 17) (compare (and:QI - (match_operand:QI 1 "nonimmediate_operand" "%0,0,0") - (match_operand:QI 2 "general_operand" "qim,qi,i")) + (match_operand:QI 1 "nonimmediate_operand" "%0,0,0") + (match_operand:QI 2 "general_operand" "qim,qi,i")) (const_int 0))) (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm,*r") (and:QI (match_dup 1) (match_dup 2)))] - "ix86_match_ccmode (insn, CCNOmode) - && ix86_binary_operator_ok (AND, QImode, operands)" + "ix86_binary_operator_ok (AND, QImode, operands) + && ix86_match_ccmode (insn, + GET_CODE (operands[2]) == CONST_INT + && INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode)" { if (which_alternative == 2) { - if (GET_CODE (operands[2]) == CONST_INT - && (INTVAL (operands[2]) & 0xffffff00)) + if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0) operands[2] = GEN_INT (INTVAL (operands[2]) & 0xff); return "and{l}\t{%2, %k0|%k0, %2}"; } @@ -8404,6 +8437,20 @@ [(set_attr "type" "alu") (set_attr "mode" "QI,QI,SI")]) +(define_insn "*andqi_2" + [(set (reg 17) + (compare (and:QI + (match_operand:QI 1 "nonimmediate_operand" "%0,0") + (match_operand:QI 2 "general_operand" "qim,qi")) + (const_int 0))) + (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm") + (and:QI (match_dup 1) (match_dup 2)))] + "ix86_match_ccmode (insn, CCNOmode) + && ix86_binary_operator_ok (AND, QImode, operands)" + "and{b}\t{%2, %0|%0, %2}" + [(set_attr "type" "alu") + (set_attr "mode" "QI")]) + (define_insn "*andqi_2_slp" [(set (reg 17) (compare (and:QI @@ -9567,8 +9614,8 @@ [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "") (neg:SF (match_operand:SF 1 "nonimmediate_operand" ""))) (clobber (reg:CC 17))])] - "TARGET_80387" - "if (TARGET_SSE) + "TARGET_80387 || TARGET_SSE_MATH" + "if (TARGET_SSE_MATH) { /* In case operand is in memory, we will not use SSE. */ if (memory_operand (operands[0], VOIDmode) @@ -9641,12 +9688,12 @@ (use (match_operand:V4SF 2 "nonimmediate_operand" "")) (clobber (reg:CC 17))] "reload_completed && SSE_REG_P (operands[0])" - [(set (subreg:TI (match_dup 0) 0) - (xor:TI (match_dup 1) - (match_dup 2)))] + [(set (match_dup 0) + (xor:V4SF (match_dup 1) + (match_dup 2)))] { - operands[1] = simplify_gen_subreg (TImode, operands[1], SFmode, 0); - operands[2] = simplify_gen_subreg (TImode, operands[2], V4SFmode, 0); + operands[0] = simplify_gen_subreg (V4SFmode, operands[0], SFmode, 0); + operands[1] = simplify_gen_subreg (V4SFmode, operands[1], SFmode, 0); if (operands_match_p (operands[0], operands[2])) { rtx tmp; @@ -9664,7 +9711,7 @@ [(set (match_operand:SF 0 "nonimmediate_operand" "=f#r,rm#f") (neg:SF (match_operand:SF 1 "nonimmediate_operand" "0,0"))) (clobber (reg:CC 17))] - "TARGET_80387 && !TARGET_SSE + "TARGET_80387 && ix86_unary_operator_ok (NEG, SFmode, operands)" "#") @@ -9707,8 +9754,8 @@ [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "") (neg:DF (match_operand:DF 1 "nonimmediate_operand" ""))) (clobber (reg:CC 17))])] - "TARGET_80387" - "if (TARGET_SSE2) + "TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)" + "if (TARGET_SSE2 && TARGET_SSE_MATH) { /* In case operand is in memory, we will not use SSE. */ if (memory_operand (operands[0], VOIDmode) @@ -9809,13 +9856,12 @@ (use (match_operand:V2DF 2 "nonimmediate_operand" "")) (clobber (reg:CC 17))] "reload_completed && SSE_REG_P (operands[0])" - [(set (subreg:TI (match_dup 0) 0) - (xor:TI (match_dup 1) - (match_dup 2)))] + [(set (match_dup 0) + (xor:V2DF (match_dup 1) + (match_dup 2)))] { operands[0] = simplify_gen_subreg (V2DFmode, operands[0], DFmode, 0); - operands[1] = simplify_gen_subreg (TImode, operands[1], DFmode, 0); - operands[2] = simplify_gen_subreg (TImode, operands[2], V2DFmode, 0); + operands[1] = simplify_gen_subreg (V2DFmode, operands[1], DFmode, 0); /* Avoid possible reformatting on the operands. */ if (TARGET_SSE_PARTIAL_REGS && !optimize_size) emit_insn (gen_sse2_unpcklpd (operands[0], operands[0], operands[0])); @@ -9974,8 +10020,8 @@ [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "") (neg:SF (match_operand:SF 1 "nonimmediate_operand" ""))) (clobber (reg:CC 17))])] - "TARGET_80387" - "if (TARGET_SSE) + "TARGET_80387 || TARGET_SSE_MATH" + "if (TARGET_SSE_MATH) { /* In case operand is in memory, we will not use SSE. */ if (memory_operand (operands[0], VOIDmode) @@ -10049,12 +10095,12 @@ (use (match_operand:V4SF 2 "nonimmediate_operand" "")) (clobber (reg:CC 17))] "reload_completed && SSE_REG_P (operands[0])" - [(set (subreg:TI (match_dup 0) 0) - (and:TI (match_dup 1) - (match_dup 2)))] + [(set (match_dup 0) + (and:V4SF (match_dup 1) + (match_dup 2)))] { - operands[1] = simplify_gen_subreg (TImode, operands[1], SFmode, 0); - operands[2] = simplify_gen_subreg (TImode, operands[2], V4SFmode, 0); + operands[0] = simplify_gen_subreg (V4SFmode, operands[0], SFmode, 0); + operands[1] = simplify_gen_subreg (V4SFmode, operands[1], SFmode, 0); if (operands_match_p (operands[0], operands[2])) { rtx tmp; @@ -10071,7 +10117,7 @@ [(set (match_operand:SF 0 "nonimmediate_operand" "=f#r,rm#f") (abs:SF (match_operand:SF 1 "nonimmediate_operand" "0,0"))) (clobber (reg:CC 17))] - "TARGET_80387 && ix86_unary_operator_ok (ABS, SFmode, operands) && !TARGET_SSE" + "TARGET_80387 && ix86_unary_operator_ok (ABS, SFmode, operands)" "#") (define_split @@ -10113,8 +10159,8 @@ [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "") (neg:DF (match_operand:DF 1 "nonimmediate_operand" ""))) (clobber (reg:CC 17))])] - "TARGET_80387" - "if (TARGET_SSE2) + "TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)" + "if (TARGET_SSE2 && TARGET_SSE_MATH) { /* In case operand is in memory, we will not use SSE. */ if (memory_operand (operands[0], VOIDmode) @@ -10203,13 +10249,12 @@ (use (match_operand:V2DF 2 "nonimmediate_operand" "")) (clobber (reg:CC 17))] "reload_completed && SSE_REG_P (operands[0])" - [(set (subreg:TI (match_dup 0) 0) - (and:TI (match_dup 1) - (match_dup 2)))] + [(set (match_dup 0) + (and:V2DF (match_dup 1) + (match_dup 2)))] { operands[0] = simplify_gen_subreg (V2DFmode, operands[0], DFmode, 0); - operands[1] = simplify_gen_subreg (TImode, operands[1], DFmode, 0); - operands[2] = simplify_gen_subreg (TImode, operands[2], V2DFmode, 0); + operands[1] = simplify_gen_subreg (V2DFmode, operands[1], DFmode, 0); /* Avoid possible reformatting on the operands. */ if (TARGET_SSE_PARTIAL_REGS && !optimize_size) emit_insn (gen_sse2_unpcklpd (operands[0], operands[0], operands[0])); @@ -10383,17 +10428,19 @@ (set_attr "mode" "DI")]) (define_split - [(set (reg 17) - (compare (not:DI (match_operand:DI 1 "nonimmediate_operand" "")) - (const_int 0))) - (set (match_operand:DI 0 "nonimmediate_operand" "") - (not:DI (match_dup 1)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 2 "compare_operator" + [(not:DI (match_operand:DI 3 "nonimmediate_operand" "")) + (const_int 0)])) + (set (match_operand:DI 1 "nonimmediate_operand" "") + (not:DI (match_dup 3)))] "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)" - [(parallel [(set (reg:CCNO 17) - (compare:CCNO (xor:DI (match_dup 1) (const_int -1)) - (const_int 0))) - (set (match_dup 0) - (xor:DI (match_dup 1) (const_int -1)))])] + [(parallel [(set (match_dup 0) + (match_op_dup 2 + [(xor:DI (match_dup 3) (const_int -1)) + (const_int 0)])) + (set (match_dup 1) + (xor:DI (match_dup 3) (const_int -1)))])] "") (define_expand "one_cmplsi2" @@ -10432,17 +10479,18 @@ (set_attr "mode" "SI")]) (define_split - [(set (reg 17) - (compare (not:SI (match_operand:SI 1 "nonimmediate_operand" "")) - (const_int 0))) - (set (match_operand:SI 0 "nonimmediate_operand" "") - (not:SI (match_dup 1)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 2 "compare_operator" + [(not:SI (match_operand:SI 3 "nonimmediate_operand" "")) + (const_int 0)])) + (set (match_operand:SI 1 "nonimmediate_operand" "") + (not:SI (match_dup 3)))] "ix86_match_ccmode (insn, CCNOmode)" - [(parallel [(set (reg:CCNO 17) - (compare:CCNO (xor:SI (match_dup 1) (const_int -1)) - (const_int 0))) - (set (match_dup 0) - (xor:SI (match_dup 1) (const_int -1)))])] + [(parallel [(set (match_dup 0) + (match_op_dup 2 [(xor:SI (match_dup 3) (const_int -1)) + (const_int 0)])) + (set (match_dup 1) + (xor:SI (match_dup 3) (const_int -1)))])] "") ;; ??? Currently never generated - xor is used instead. @@ -10459,17 +10507,18 @@ (set_attr "mode" "SI")]) (define_split - [(set (reg 17) - (compare (not:SI (match_operand:SI 1 "register_operand" "")) - (const_int 0))) - (set (match_operand:DI 0 "register_operand" "") - (zero_extend:DI (not:SI (match_dup 1))))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 2 "compare_operator" + [(not:SI (match_operand:SI 3 "register_operand" "")) + (const_int 0)])) + (set (match_operand:DI 1 "register_operand" "") + (zero_extend:DI (not:SI (match_dup 3))))] "ix86_match_ccmode (insn, CCNOmode)" - [(parallel [(set (reg:CCNO 17) - (compare:CCNO (xor:SI (match_dup 1) (const_int -1)) - (const_int 0))) - (set (match_dup 0) - (zero_extend:DI (xor:SI (match_dup 1) (const_int -1))))])] + [(parallel [(set (match_dup 0) + (match_op_dup 2 [(xor:SI (match_dup 3) (const_int -1)) + (const_int 0)])) + (set (match_dup 1) + (zero_extend:DI (xor:SI (match_dup 3) (const_int -1))))])] "") (define_expand "one_cmplhi2" @@ -10499,17 +10548,18 @@ (set_attr "mode" "HI")]) (define_split - [(set (reg 17) - (compare (not:HI (match_operand:HI 1 "nonimmediate_operand" "")) - (const_int 0))) - (set (match_operand:HI 0 "nonimmediate_operand" "") - (not:HI (match_dup 1)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 2 "compare_operator" + [(not:HI (match_operand:HI 3 "nonimmediate_operand" "")) + (const_int 0)])) + (set (match_operand:HI 1 "nonimmediate_operand" "") + (not:HI (match_dup 3)))] "ix86_match_ccmode (insn, CCNOmode)" - [(parallel [(set (reg:CCNO 17) - (compare:CCNO (xor:HI (match_dup 1) (const_int -1)) - (const_int 0))) - (set (match_dup 0) - (xor:HI (match_dup 1) (const_int -1)))])] + [(parallel [(set (match_dup 0) + (match_op_dup 2 [(xor:HI (match_dup 3) (const_int -1)) + (const_int 0)])) + (set (match_dup 1) + (xor:HI (match_dup 3) (const_int -1)))])] "") ;; %%% Potential partial reg stall on alternative 1. What to do? @@ -10542,17 +10592,18 @@ (set_attr "mode" "QI")]) (define_split - [(set (reg 17) - (compare (not:QI (match_operand:QI 1 "nonimmediate_operand" "")) - (const_int 0))) - (set (match_operand:QI 0 "nonimmediate_operand" "") - (not:QI (match_dup 1)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 2 "compare_operator" + [(not:QI (match_operand:QI 3 "nonimmediate_operand" "")) + (const_int 0)])) + (set (match_operand:QI 1 "nonimmediate_operand" "") + (not:QI (match_dup 3)))] "ix86_match_ccmode (insn, CCNOmode)" - [(parallel [(set (reg:CCNO 17) - (compare:CCNO (xor:QI (match_dup 1) (const_int -1)) - (const_int 0))) - (set (match_dup 0) - (xor:QI (match_dup 1) (const_int -1)))])] + [(parallel [(set (match_dup 0) + (match_op_dup 2 [(xor:QI (match_dup 3) (const_int -1)) + (const_int 0)])) + (set (match_dup 1) + (xor:QI (match_dup 3) (const_int -1)))])] "") ;; Arithmetic shift instructions @@ -17003,7 +17054,8 @@ (clobber (match_operand 6 "" "")) (clobber (reg:CC 17))] "!SSE_REG_P (operands[0]) && reload_completed - && VALID_SSE_REG_MODE (GET_MODE (operands[0]))" + && (GET_MODE (operands[0]) == SFmode + || (TARGET_SSE2 && GET_MODE (operands[0]) == DFmode))" [(const_int 0)] { ix86_compare_op0 = operands[5]; @@ -17020,22 +17072,60 @@ ;; nand op0, op3 - load op3 to op0 if comparison was false ;; or op2, op0 - get the nonzero one into the result. (define_split - [(set (match_operand 0 "register_operand" "") - (if_then_else (match_operator 1 "sse_comparison_operator" - [(match_operand 4 "register_operand" "") - (match_operand 5 "nonimmediate_operand" "")]) - (match_operand 2 "register_operand" "") - (match_operand 3 "register_operand" ""))) + [(set (match_operand:SF 0 "register_operand" "") + (if_then_else:SF (match_operator 1 "sse_comparison_operator" + [(match_operand:SF 4 "register_operand" "") + (match_operand:SF 5 "nonimmediate_operand" "")]) + (match_operand:SF 2 "register_operand" "") + (match_operand:SF 3 "register_operand" ""))) (clobber (match_operand 6 "" "")) (clobber (reg:CC 17))] "SSE_REG_P (operands[0]) && reload_completed" [(set (match_dup 4) (match_op_dup 1 [(match_dup 4) (match_dup 5)])) - (set (subreg:TI (match_dup 2) 0) (and:TI (subreg:TI (match_dup 2) 0) - (subreg:TI (match_dup 4) 0))) - (set (subreg:TI (match_dup 4) 0) (and:TI (not:TI (subreg:TI (match_dup 4) 0)) - (subreg:TI (match_dup 3) 0))) - (set (subreg:TI (match_dup 0) 0) (ior:TI (subreg:TI (match_dup 6) 0) - (subreg:TI (match_dup 7) 0)))] + (set (match_dup 2) (and:V4SF (match_dup 2) + (match_dup 8))) + (set (match_dup 8) (and:V4SF (not:V4SF (match_dup 8)) + (match_dup 3))) + (set (match_dup 0) (ior:V4SF (match_dup 6) + (match_dup 7)))] +{ + /* If op2 == op3, op3 would be clobbered before it is used. */ + if (operands_match_p (operands[2], operands[3])) + { + emit_move_insn (operands[0], operands[2]); + DONE; + } + + PUT_MODE (operands[1], GET_MODE (operands[0])); + if (operands_match_p (operands[0], operands[4])) + operands[6] = operands[4], operands[7] = operands[2]; + else + operands[6] = operands[2], operands[7] = operands[4]; + operands[0] = simplify_gen_subreg (V4SFmode, operands[0], SFmode, 0); + operands[2] = simplify_gen_subreg (V4SFmode, operands[2], SFmode, 0); + operands[3] = simplify_gen_subreg (V4SFmode, operands[3], SFmode, 0); + operands[8] = simplify_gen_subreg (V4SFmode, operands[4], SFmode, 0); + operands[6] = simplify_gen_subreg (V4SFmode, operands[6], SFmode, 0); + operands[7] = simplify_gen_subreg (V4SFmode, operands[7], SFmode, 0); +}) + +(define_split + [(set (match_operand:DF 0 "register_operand" "") + (if_then_else:DF (match_operator 1 "sse_comparison_operator" + [(match_operand:DF 4 "register_operand" "") + (match_operand:DF 5 "nonimmediate_operand" "")]) + (match_operand:DF 2 "register_operand" "") + (match_operand:DF 3 "register_operand" ""))) + (clobber (match_operand 6 "" "")) + (clobber (reg:CC 17))] + "SSE_REG_P (operands[0]) && reload_completed" + [(set (match_dup 4) (match_op_dup 1 [(match_dup 4) (match_dup 5)])) + (set (match_dup 2) (and:V2DF (match_dup 2) + (match_dup 8))) + (set (match_dup 8) (and:V2DF (not:V2DF (match_dup 8)) + (match_dup 3))) + (set (match_dup 0) (ior:V2DF (match_dup 6) + (match_dup 7)))] { if (GET_MODE (operands[2]) == DFmode && TARGET_SSE_PARTIAL_REGS && !optimize_size) @@ -17058,6 +17148,12 @@ operands[6] = operands[4], operands[7] = operands[2]; else operands[6] = operands[2], operands[7] = operands[4]; + operands[0] = simplify_gen_subreg (V2DFmode, operands[0], DFmode, 0); + operands[2] = simplify_gen_subreg (V2DFmode, operands[2], DFmode, 0); + operands[3] = simplify_gen_subreg (V2DFmode, operands[3], DFmode, 0); + operands[8] = simplify_gen_subreg (V2DFmode, operands[4], DFmode, 0); + operands[6] = simplify_gen_subreg (V2DFmode, operands[6], DFmode, 0); + operands[7] = simplify_gen_subreg (V2DFmode, operands[7], DFmode, 0); }) ;; Special case of conditional move we can handle effectively. @@ -17144,18 +17240,55 @@ "#") (define_split - [(set (match_operand 0 "register_operand" "") - (if_then_else (match_operator 1 "comparison_operator" - [(match_operand 4 "nonimmediate_operand" "") - (match_operand 5 "nonimmediate_operand" "")]) - (match_operand 2 "nonmemory_operand" "") - (match_operand 3 "nonmemory_operand" "")))] + [(set (match_operand:SF 0 "register_operand" "") + (if_then_else:SF (match_operator 1 "comparison_operator" + [(match_operand:SF 4 "nonimmediate_operand" "") + (match_operand:SF 5 "nonimmediate_operand" "")]) + (match_operand:SF 2 "nonmemory_operand" "") + (match_operand:SF 3 "nonmemory_operand" "")))] "SSE_REG_P (operands[0]) && reload_completed && (const0_operand (operands[2], GET_MODE (operands[0])) || const0_operand (operands[3], GET_MODE (operands[0])))" [(set (match_dup 0) (match_op_dup 1 [(match_dup 0) (match_dup 5)])) - (set (subreg:TI (match_dup 0) 0) (and:TI (match_dup 6) - (match_dup 7)))] + (set (match_dup 8) (and:V4SF (match_dup 6) (match_dup 7)))] +{ + PUT_MODE (operands[1], GET_MODE (operands[0])); + if (!sse_comparison_operator (operands[1], VOIDmode) + || !rtx_equal_p (operands[0], operands[4])) + { + rtx tmp = operands[5]; + operands[5] = operands[4]; + operands[4] = tmp; + PUT_CODE (operands[1], swap_condition (GET_CODE (operands[1]))); + } + if (!rtx_equal_p (operands[0], operands[4])) + abort (); + operands[8] = simplify_gen_subreg (V4SFmode, operands[0], SFmode, 0); + if (const0_operand (operands[2], GET_MODE (operands[2]))) + { + operands[7] = operands[3]; + operands[6] = gen_rtx_NOT (V4SFmode, operands[5]); + } + else + { + operands[7] = operands[2]; + operands[6] = operands[8]; + } + operands[7] = simplify_gen_subreg (V4SFmode, operands[7], SFmode, 0); +}) + +(define_split + [(set (match_operand:DF 0 "register_operand" "") + (if_then_else:DF (match_operator 1 "comparison_operator" + [(match_operand:DF 4 "nonimmediate_operand" "") + (match_operand:DF 5 "nonimmediate_operand" "")]) + (match_operand:DF 2 "nonmemory_operand" "") + (match_operand:DF 3 "nonmemory_operand" "")))] + "SSE_REG_P (operands[0]) && reload_completed + && (const0_operand (operands[2], GET_MODE (operands[0])) + || const0_operand (operands[3], GET_MODE (operands[0])))" + [(set (match_dup 0) (match_op_dup 1 [(match_dup 0) (match_dup 5)])) + (set (match_dup 8) (and:V2DF (match_dup 6) (match_dup 7)))] { if (TARGET_SSE_PARTIAL_REGS && !optimize_size && GET_MODE (operands[2]) == DFmode) @@ -17182,19 +17315,18 @@ } if (!rtx_equal_p (operands[0], operands[4])) abort (); - if (const0_operand (operands[2], GET_MODE (operands[0]))) + operands[8] = simplify_gen_subreg (V2DFmode, operands[0], DFmode, 0); + if (const0_operand (operands[2], GET_MODE (operands[2]))) { operands[7] = operands[3]; - operands[6] = gen_rtx_NOT (TImode, gen_rtx_SUBREG (TImode, operands[0], - 0)); + operands[6] = gen_rtx_NOT (V2DFmode, operands[8]); } else { operands[7] = operands[2]; - operands[6] = gen_rtx_SUBREG (TImode, operands[0], 0); + operands[6] = operands[8]; } - operands[7] = simplify_gen_subreg (TImode, operands[7], - GET_MODE (operands[7]), 0); + operands[7] = simplify_gen_subreg (V2DFmode, operands[7], DFmode, 0); }) (define_expand "allocate_stack_worker" @@ -17319,52 +17451,56 @@ ; instruction size is unchanged, except in the %eax case for ; which it is increased by one byte, hence the ! optimize_size. (define_split - [(set (reg 17) - (compare (and (match_operand 1 "aligned_operand" "") - (match_operand 2 "const_int_operand" "")) - (const_int 0))) - (set (match_operand 0 "register_operand" "") - (and (match_dup 1) (match_dup 2)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 2 "compare_operator" + [(and (match_operand 3 "aligned_operand" "") + (match_operand 4 "const_int_operand" "")) + (const_int 0)])) + (set (match_operand 1 "register_operand" "") + (and (match_dup 3) (match_dup 4)))] "! TARGET_PARTIAL_REG_STALL && reload_completed /* Ensure that the operand will remain sign-extended immediate. */ - && ix86_match_ccmode (insn, INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode) + && ix86_match_ccmode (insn, INTVAL (operands[4]) >= 0 ? CCNOmode : CCZmode) && ! optimize_size - && ((GET_MODE (operands[0]) == HImode && ! TARGET_FAST_PREFIX) - || (GET_MODE (operands[0]) == QImode && TARGET_PROMOTE_QImode))" - [(parallel [(set (reg:CCNO 17) - (compare:CCNO (and:SI (match_dup 1) (match_dup 2)) - (const_int 0))) - (set (match_dup 0) - (and:SI (match_dup 1) (match_dup 2)))])] - "operands[2] - = gen_int_mode (INTVAL (operands[2]) - & GET_MODE_MASK (GET_MODE (operands[0])), - SImode); - operands[0] = gen_lowpart (SImode, operands[0]); - operands[1] = gen_lowpart (SImode, operands[1]);") + && ((GET_MODE (operands[1]) == HImode && ! TARGET_FAST_PREFIX) + || (GET_MODE (operands[1]) == QImode && TARGET_PROMOTE_QImode))" + [(parallel [(set (match_dup 0) + (match_op_dup 2 [(and:SI (match_dup 3) (match_dup 4)) + (const_int 0)])) + (set (match_dup 1) + (and:SI (match_dup 3) (match_dup 4)))])] +{ + operands[4] + = gen_int_mode (INTVAL (operands[4]) + & GET_MODE_MASK (GET_MODE (operands[1])), SImode); + operands[1] = gen_lowpart (SImode, operands[1]); + operands[3] = gen_lowpart (SImode, operands[3]); +}) ; Don't promote the QImode tests, as i386 doesn't have encoding of ; the TEST instruction with 32-bit sign-extended immediate and thus ; the instruction size would at least double, which is not what we ; want even with ! optimize_size. (define_split - [(set (reg 17) - (compare (and (match_operand:HI 0 "aligned_operand" "") - (match_operand:HI 1 "const_int_operand" "")) - (const_int 0)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(and (match_operand:HI 2 "aligned_operand" "") + (match_operand:HI 3 "const_int_operand" "")) + (const_int 0)]))] "! TARGET_PARTIAL_REG_STALL && reload_completed /* Ensure that the operand will remain sign-extended immediate. */ - && ix86_match_ccmode (insn, INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode) + && ix86_match_ccmode (insn, INTVAL (operands[3]) >= 0 ? CCNOmode : CCZmode) && ! TARGET_FAST_PREFIX && ! optimize_size" - [(set (reg:CCNO 17) - (compare:CCNO (and:SI (match_dup 0) (match_dup 1)) - (const_int 0)))] - "operands[1] - = gen_int_mode (INTVAL (operands[1]) - & GET_MODE_MASK (GET_MODE (operands[0])), - SImode); - operands[0] = gen_lowpart (SImode, operands[0]);") + [(set (match_dup 0) + (match_op_dup 1 [(and:SI (match_dup 2) (match_dup 3)) + (const_int 0)]))] +{ + operands[3] + = gen_int_mode (INTVAL (operands[3]) + & GET_MODE_MASK (GET_MODE (operands[2])), SImode); + operands[2] = gen_lowpart (SImode, operands[2]); +}) (define_split [(set (match_operand 0 "register_operand" "") @@ -17537,13 +17673,14 @@ ;; Don't compare memory with zero, load and use a test instead. (define_peephole2 - [(set (reg 17) - (compare (match_operand:SI 0 "memory_operand" "") - (const_int 0))) + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(match_operand:SI 2 "memory_operand" "") + (const_int 0)])) (match_scratch:SI 3 "r")] "ix86_match_ccmode (insn, CCNOmode) && ! optimize_size" - [(set (match_dup 3) (match_dup 0)) - (set (reg:CCNO 17) (compare:CCNO (match_dup 3) (const_int 0)))] + [(set (match_dup 3) (match_dup 2)) + (set (match_dup 0) (match_op_dup 1 [(match_dup 3) (const_int 0)]))] "") ;; NOT is not pairable on Pentium, while XOR is, but one byte longer. @@ -17607,77 +17744,77 @@ ;; versions if we're concerned about partial register stalls. (define_peephole2 - [(set (reg 17) - (compare (and:SI (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "immediate_operand" "")) - (const_int 0)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(and:SI (match_operand:SI 2 "register_operand" "") + (match_operand:SI 3 "immediate_operand" "")) + (const_int 0)]))] "ix86_match_ccmode (insn, CCNOmode) - && (true_regnum (operands[0]) != 0 - || (GET_CODE (operands[1]) == CONST_INT - && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K'))) - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" + && (true_regnum (operands[2]) != 0 + || (GET_CODE (operands[3]) == CONST_INT + && CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'K'))) + && peep2_reg_dead_p (1, operands[2])" [(parallel - [(set (reg:CCNO 17) - (compare:CCNO (and:SI (match_dup 0) - (match_dup 1)) - (const_int 0))) - (set (match_dup 0) - (and:SI (match_dup 0) (match_dup 1)))])] + [(set (match_dup 0) + (match_op_dup 1 [(and:SI (match_dup 2) (match_dup 3)) + (const_int 0)])) + (set (match_dup 2) + (and:SI (match_dup 2) (match_dup 3)))])] "") ;; We don't need to handle HImode case, because it will be promoted to SImode ;; on ! TARGET_PARTIAL_REG_STALL (define_peephole2 - [(set (reg 17) - (compare (and:QI (match_operand:QI 0 "register_operand" "") - (match_operand:QI 1 "immediate_operand" "")) - (const_int 0)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(and:QI (match_operand:QI 2 "register_operand" "") + (match_operand:QI 3 "immediate_operand" "")) + (const_int 0)]))] "! TARGET_PARTIAL_REG_STALL && ix86_match_ccmode (insn, CCNOmode) - && true_regnum (operands[0]) != 0 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" + && true_regnum (operands[2]) != 0 + && peep2_reg_dead_p (1, operands[2])" [(parallel - [(set (reg:CCNO 17) - (compare:CCNO (and:QI (match_dup 0) - (match_dup 1)) - (const_int 0))) - (set (match_dup 0) - (and:QI (match_dup 0) (match_dup 1)))])] + [(set (match_dup 0) + (match_op_dup 1 [(and:QI (match_dup 2) (match_dup 3)) + (const_int 0)])) + (set (match_dup 2) + (and:QI (match_dup 2) (match_dup 3)))])] "") (define_peephole2 - [(set (reg 17) - (compare - (and:SI - (zero_extract:SI - (match_operand 0 "ext_register_operand" "") - (const_int 8) - (const_int 8)) - (match_operand 1 "const_int_operand" "")) - (const_int 0)))] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(and:SI + (zero_extract:SI + (match_operand 2 "ext_register_operand" "") + (const_int 8) + (const_int 8)) + (match_operand 3 "const_int_operand" "")) + (const_int 0)]))] "! TARGET_PARTIAL_REG_STALL && ix86_match_ccmode (insn, CCNOmode) - && true_regnum (operands[0]) != 0 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" - [(parallel [(set (reg:CCNO 17) - (compare:CCNO - (and:SI - (zero_extract:SI - (match_dup 0) - (const_int 8) - (const_int 8)) - (match_dup 1)) - (const_int 0))) - (set (zero_extract:SI (match_dup 0) + && true_regnum (operands[2]) != 0 + && peep2_reg_dead_p (1, operands[2])" + [(parallel [(set (match_dup 0) + (match_op_dup 1 + [(and:SI + (zero_extract:SI + (match_dup 2) + (const_int 8) + (const_int 8)) + (match_dup 3)) + (const_int 0)])) + (set (zero_extract:SI (match_dup 2) (const_int 8) (const_int 8)) (and:SI (zero_extract:SI - (match_dup 0) + (match_dup 2) (const_int 8) (const_int 8)) - (match_dup 1)))])] + (match_dup 3)))])] "") ;; Don't do logical operations with memory inputs. @@ -17979,66 +18116,20 @@ "") ;; Convert compares with 1 to shorter inc/dec operations when CF is not -;; required and register dies. -(define_peephole2 - [(set (reg 17) - (compare (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "incdec_operand" "")))] - "ix86_match_ccmode (insn, CCGCmode) - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" - [(parallel [(set (reg:CCGC 17) - (compare:CCGC (match_dup 0) - (match_dup 1))) - (clobber (match_dup 0))])] - "") - +;; required and register dies. Similarly for 128 to plus -128. (define_peephole2 - [(set (reg 17) - (compare (match_operand:HI 0 "register_operand" "") - (match_operand:HI 1 "incdec_operand" "")))] - "ix86_match_ccmode (insn, CCGCmode) - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" - [(parallel [(set (reg:CCGC 17) - (compare:CCGC (match_dup 0) - (match_dup 1))) - (clobber (match_dup 0))])] - "") - -(define_peephole2 - [(set (reg 17) - (compare (match_operand:QI 0 "register_operand" "") - (match_operand:QI 1 "incdec_operand" "")))] - "ix86_match_ccmode (insn, CCGCmode) - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" - [(parallel [(set (reg:CCGC 17) - (compare:CCGC (match_dup 0) - (match_dup 1))) - (clobber (match_dup 0))])] - "") - -;; Convert compares with 128 to shorter add -128 -(define_peephole2 - [(set (reg 17) - (compare (match_operand:SI 0 "register_operand" "") - (const_int 128)))] - "ix86_match_ccmode (insn, CCGCmode) - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" - [(parallel [(set (reg:CCGC 17) - (compare:CCGC (match_dup 0) - (const_int 128))) - (clobber (match_dup 0))])] - "") - -(define_peephole2 - [(set (reg 17) - (compare (match_operand:HI 0 "register_operand" "") - (const_int 128)))] - "ix86_match_ccmode (insn, CCGCmode) - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" - [(parallel [(set (reg:CCGC 17) - (compare:CCGC (match_dup 0) - (const_int 128))) - (clobber (match_dup 0))])] + [(set (match_operand 0 "flags_reg_operand" "") + (match_operator 1 "compare_operator" + [(match_operand 2 "register_operand" "") + (match_operand 3 "const_int_operand" "")]))] + "(INTVAL (operands[3]) == -1 + || INTVAL (operands[3]) == 1 + || INTVAL (operands[3]) == 128) + && ix86_match_ccmode (insn, CCGCmode) + && peep2_reg_dead_p (1, operands[2])" + [(parallel [(set (match_dup 0) + (match_op_dup 1 [(match_dup 2) (match_dup 3)])) + (clobber (match_dup 2))])] "") (define_peephole2 @@ -18326,7 +18417,7 @@ { if (constant_call_address_operand (operands[1], QImode)) return "call\t%P1"; - return "call\t%*%1"; + return "call\t%A1"; } [(set_attr "type" "callv")]) @@ -18338,7 +18429,7 @@ { if (constant_call_address_operand (operands[1], QImode)) return "jmp\t%P1"; - return "jmp\t%*%1"; + return "jmp\t%A1"; } [(set_attr "type" "callv")]) @@ -18422,10 +18513,11 @@ ;; Moves for SSE/MMX regs. -(define_insn "movv4sf_internal" +(define_insn "*movv4sf_internal" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,x,m") (match_operand:V4SF 1 "vector_move_operand" "C,xm,x"))] - "TARGET_SSE" + "TARGET_SSE + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ xorps\t%0, %0 movaps\t{%1, %0|%0, %1} @@ -18436,7 +18528,7 @@ (define_split [(set (match_operand:V4SF 0 "register_operand" "") (match_operand:V4SF 1 "zero_extended_scalar_load_operand" ""))] - "TARGET_SSE" + "TARGET_SSE && reload_completed" [(set (match_dup 0) (vec_merge:V4SF (vec_duplicate:V4SF (match_dup 1)) @@ -18447,10 +18539,11 @@ operands[2] = CONST0_RTX (V4SFmode); }) -(define_insn "movv4si_internal" +(define_insn "*movv4si_internal" [(set (match_operand:V4SI 0 "nonimmediate_operand" "=x,x,m") (match_operand:V4SI 1 "vector_move_operand" "C,xm,x"))] - "TARGET_SSE" + "TARGET_SSE + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" { switch (which_alternative) { @@ -18487,10 +18580,11 @@ (const_string "TI"))] (const_string "TI")))]) -(define_insn "movv2di_internal" +(define_insn "*movv2di_internal" [(set (match_operand:V2DI 0 "nonimmediate_operand" "=x,x,m") (match_operand:V2DI 1 "vector_move_operand" "C,xm,x"))] - "TARGET_SSE" + "TARGET_SSE + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" { switch (which_alternative) { @@ -18530,7 +18624,7 @@ (define_split [(set (match_operand:V2DF 0 "register_operand" "") (match_operand:V2DF 1 "zero_extended_scalar_load_operand" ""))] - "TARGET_SSE2" + "TARGET_SSE2 && reload_completed" [(set (match_dup 0) (vec_merge:V2DF (vec_duplicate:V2DF (match_dup 1)) @@ -18541,52 +18635,80 @@ operands[2] = CONST0_RTX (V2DFmode); }) -(define_insn "movv8qi_internal" - [(set (match_operand:V8QI 0 "nonimmediate_operand" "=y,y,m") - (match_operand:V8QI 1 "vector_move_operand" "C,ym,y"))] +(define_insn "*movv2si_internal" + [(set (match_operand:V2SI 0 "nonimmediate_operand" + "=y,y ,m,!y,!*Y,*x,?*x,?m") + (match_operand:V2SI 1 "vector_move_operand" + "C ,ym,y,*Y,y ,C ,*xm,*x"))] "TARGET_MMX && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ pxor\t%0, %0 movq\t{%1, %0|%0, %1} + movq\t{%1, %0|%0, %1} + movdq2q\t{%1, %0|%0, %1} + movq2dq\t{%1, %0|%0, %1} + pxor\t%0, %0 + movq\t{%1, %0|%0, %1} movq\t{%1, %0|%0, %1}" - [(set_attr "type" "mmxmov") + [(set_attr "type" "mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov") (set_attr "mode" "DI")]) -(define_insn "movv4hi_internal" - [(set (match_operand:V4HI 0 "nonimmediate_operand" "=y,y,m") - (match_operand:V4HI 1 "vector_move_operand" "C,ym,y"))] +(define_insn "*movv4hi_internal" + [(set (match_operand:V4HI 0 "nonimmediate_operand" + "=y,y ,m,!y,!*Y,*x,?*x,?m") + (match_operand:V4HI 1 "vector_move_operand" + "C ,ym,y,*Y,y ,C ,*xm,*x"))] "TARGET_MMX && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ pxor\t%0, %0 movq\t{%1, %0|%0, %1} + movq\t{%1, %0|%0, %1} + movdq2q\t{%1, %0|%0, %1} + movq2dq\t{%1, %0|%0, %1} + pxor\t%0, %0 + movq\t{%1, %0|%0, %1} movq\t{%1, %0|%0, %1}" - [(set_attr "type" "mmxmov") + [(set_attr "type" "mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov") (set_attr "mode" "DI")]) -(define_insn "movv2si_internal" - [(set (match_operand:V2SI 0 "nonimmediate_operand" "=y,y,m") - (match_operand:V2SI 1 "vector_move_operand" "C,ym,y"))] +(define_insn "*movv8qi_internal" + [(set (match_operand:V8QI 0 "nonimmediate_operand" + "=y,y ,m,!y,!*Y,*x,?*x,?m") + (match_operand:V8QI 1 "vector_move_operand" + "C ,ym,y,*Y,y ,C ,*xm,*x"))] "TARGET_MMX && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ pxor\t%0, %0 movq\t{%1, %0|%0, %1} + movq\t{%1, %0|%0, %1} + movdq2q\t{%1, %0|%0, %1} + movq2dq\t{%1, %0|%0, %1} + pxor\t%0, %0 + movq\t{%1, %0|%0, %1} movq\t{%1, %0|%0, %1}" - [(set_attr "type" "mmxcvt") + [(set_attr "type" "mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov") (set_attr "mode" "DI")]) -(define_insn "movv2sf_internal" - [(set (match_operand:V2SF 0 "nonimmediate_operand" "=y,y,m") - (match_operand:V2SF 1 "vector_move_operand" "C,ym,y"))] - "TARGET_3DNOW +(define_insn "*movv2sf_internal" + [(set (match_operand:V2SF 0 "nonimmediate_operand" + "=y,y ,m,!y,!*Y,*x,?*x,?m") + (match_operand:V2SF 1 "vector_move_operand" + "C ,ym,y,*Y,y ,C ,*xm,*x"))] + "TARGET_MMX && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ pxor\t%0, %0 movq\t{%1, %0|%0, %1} + movq\t{%1, %0|%0, %1} + movdq2q\t{%1, %0|%0, %1} + movq2dq\t{%1, %0|%0, %1} + xorps\t%0, %0 + movq\t{%1, %0|%0, %1} movq\t{%1, %0|%0, %1}" - [(set_attr "type" "mmxcvt") + [(set_attr "type" "mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov") (set_attr "mode" "DI")]) (define_expand "movti" @@ -18606,17 +18728,14 @@ (match_operand:TF 1 "nonimmediate_operand" ""))] "TARGET_64BIT" { - if (TARGET_64BIT) - ix86_expand_move (TFmode, operands); - else - ix86_expand_vector_move (TFmode, operands); + ix86_expand_move (TFmode, operands); DONE; }) -(define_insn "movv2df_internal" +(define_insn "*movv2df_internal" [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,m") (match_operand:V2DF 1 "vector_move_operand" "C,xm,x"))] - "TARGET_SSE2 + "TARGET_SSE && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" { switch (which_alternative) @@ -18638,7 +18757,9 @@ } [(set_attr "type" "ssemov") (set (attr "mode") - (cond [(eq_attr "alternative" "0,1") + (cond [(eq (symbol_ref "TARGET_SSE2") (const_int 0)) + (const_string "V4SF") + (eq_attr "alternative" "0,1") (if_then_else (ne (symbol_ref "optimize_size") (const_int 0)) @@ -18654,10 +18775,10 @@ (const_string "V2DF"))] (const_string "V2DF")))]) -(define_insn "movv8hi_internal" +(define_insn "*movv8hi_internal" [(set (match_operand:V8HI 0 "nonimmediate_operand" "=x,x,m") (match_operand:V8HI 1 "vector_move_operand" "C,xm,x"))] - "TARGET_SSE2 + "TARGET_SSE && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" { switch (which_alternative) @@ -18695,10 +18816,10 @@ (const_string "TI"))] (const_string "TI")))]) -(define_insn "movv16qi_internal" +(define_insn "*movv16qi_internal" [(set (match_operand:V16QI 0 "nonimmediate_operand" "=x,x,m") - (match_operand:V16QI 1 "nonimmediate_operand" "C,xm,x"))] - "TARGET_SSE2 + (match_operand:V16QI 1 "vector_move_operand" "C,xm,x"))] + "TARGET_SSE && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" { switch (which_alternative) @@ -18739,7 +18860,7 @@ (define_expand "movv2df" [(set (match_operand:V2DF 0 "nonimmediate_operand" "") (match_operand:V2DF 1 "nonimmediate_operand" ""))] - "TARGET_SSE2" + "TARGET_SSE" { ix86_expand_vector_move (V2DFmode, operands); DONE; @@ -18748,7 +18869,7 @@ (define_expand "movv8hi" [(set (match_operand:V8HI 0 "nonimmediate_operand" "") (match_operand:V8HI 1 "nonimmediate_operand" ""))] - "TARGET_SSE2" + "TARGET_SSE" { ix86_expand_vector_move (V8HImode, operands); DONE; @@ -18757,7 +18878,7 @@ (define_expand "movv16qi" [(set (match_operand:V16QI 0 "nonimmediate_operand" "") (match_operand:V16QI 1 "nonimmediate_operand" ""))] - "TARGET_SSE2" + "TARGET_SSE" { ix86_expand_vector_move (V16QImode, operands); DONE; @@ -18820,7 +18941,7 @@ (define_expand "movv2sf" [(set (match_operand:V2SF 0 "nonimmediate_operand" "") (match_operand:V2SF 1 "nonimmediate_operand" ""))] - "TARGET_3DNOW" + "TARGET_MMX" { ix86_expand_vector_move (V2SFmode, operands); DONE; @@ -18841,19 +18962,19 @@ (define_insn "*pushv2di" [(set (match_operand:V2DI 0 "push_operand" "=<") (match_operand:V2DI 1 "register_operand" "x"))] - "TARGET_SSE2" + "TARGET_SSE" "#") (define_insn "*pushv8hi" [(set (match_operand:V8HI 0 "push_operand" "=<") (match_operand:V8HI 1 "register_operand" "x"))] - "TARGET_SSE2" + "TARGET_SSE" "#") (define_insn "*pushv16qi" [(set (match_operand:V16QI 0 "push_operand" "=<") (match_operand:V16QI 1 "register_operand" "x"))] - "TARGET_SSE2" + "TARGET_SSE" "#") (define_insn "*pushv4sf" @@ -18865,7 +18986,7 @@ (define_insn "*pushv4si" [(set (match_operand:V4SI 0 "push_operand" "=<") (match_operand:V4SI 1 "register_operand" "x"))] - "TARGET_SSE2" + "TARGET_SSE" "#") (define_insn "*pushv2si" @@ -18889,7 +19010,7 @@ (define_insn "*pushv2sf" [(set (match_operand:V2SF 0 "push_operand" "=<") (match_operand:V2SF 1 "register_operand" "y"))] - "TARGET_3DNOW" + "TARGET_MMX" "#") (define_split @@ -18915,7 +19036,7 @@ operands[3] = GEN_INT (-GET_MODE_SIZE (GET_MODE (operands[0])));") -(define_insn "movti_internal" +(define_insn "*movti_internal" [(set (match_operand:TI 0 "nonimmediate_operand" "=x,x,m") (match_operand:TI 1 "vector_move_operand" "C,xm,x"))] "TARGET_SSE && !TARGET_64BIT @@ -19462,26 +19583,16 @@ ;; of DImode subregs again! ;; SSE1 single precision floating point logical operation (define_expand "sse_andv4sf3" - [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0) - (and:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0) - (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))] + [(set (match_operand:V4SF 0 "register_operand" "") + (and:V4SF (match_operand:V4SF 1 "register_operand" "") + (match_operand:V4SF 2 "nonimmediate_operand" "")))] "TARGET_SSE" "") (define_insn "*sse_andv4sf3" - [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "=x") 0) - (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] - "TARGET_SSE - && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" - "andps\t{%2, %0|%0, %2}" - [(set_attr "type" "sselog") - (set_attr "mode" "V4SF")]) - -(define_insn "*sse_andsf3" - [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) - (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] + [(set (match_operand:V4SF 0 "register_operand" "=x") + (and:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "%0") + (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "andps\t{%2, %0|%0, %2}" @@ -19489,51 +19600,32 @@ (set_attr "mode" "V4SF")]) (define_expand "sse_nandv4sf3" - [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0) - (and:TI (not:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0)) - (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))] + [(set (match_operand:V4SF 0 "register_operand" "") + (and:V4SF (not:V4SF (match_operand:V4SF 1 "register_operand" "")) + (match_operand:V4SF 2 "nonimmediate_operand" "")))] "TARGET_SSE" "") (define_insn "*sse_nandv4sf3" - [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "=x") 0) - (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) - (match_operand:TI 2 "nonimmediate_operand" "xm")))] - "TARGET_SSE" - "andnps\t{%2, %0|%0, %2}" - [(set_attr "type" "sselog") - (set_attr "mode" "V4SF")]) - -(define_insn "*sse_nandsf3" - [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) - (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) - (match_operand:TI 2 "nonimmediate_operand" "xm")))] + [(set (match_operand:V4SF 0 "register_operand" "=x") + (and:V4SF (not:V4SF (match_operand:V4SF 1 "register_operand" "0")) + (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "andnps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")]) (define_expand "sse_iorv4sf3" - [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0) - (ior:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0) - (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))] + [(set (match_operand:V4SF 0 "register_operand" "") + (ior:V4SF (match_operand:V4SF 1 "register_operand" "") + (match_operand:V4SF 2 "nonimmediate_operand" "")))] "TARGET_SSE" "") (define_insn "*sse_iorv4sf3" - [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "=x") 0) - (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] - "TARGET_SSE - && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" - "orps\t{%2, %0|%0, %2}" - [(set_attr "type" "sselog") - (set_attr "mode" "V4SF")]) - -(define_insn "*sse_iorsf3" - [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) - (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] + [(set (match_operand:V4SF 0 "register_operand" "=x") + (ior:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "%0") + (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "orps\t{%2, %0|%0, %2}" @@ -19541,27 +19633,16 @@ (set_attr "mode" "V4SF")]) (define_expand "sse_xorv4sf3" - [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0) - (xor:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0) - (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))] - "TARGET_SSE - && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" + [(set (match_operand:V4SF 0 "register_operand" "") + (xor:V4SF (match_operand:V4SF 1 "register_operand" "") + (match_operand:V4SF 2 "nonimmediate_operand" "")))] + "TARGET_SSE" "") (define_insn "*sse_xorv4sf3" - [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "=x") 0) - (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] - "TARGET_SSE - && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" - "xorps\t{%2, %0|%0, %2}" - [(set_attr "type" "sselog") - (set_attr "mode" "V4SF")]) - -(define_insn "*sse_xorsf3" - [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) - (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] + [(set (match_operand:V4SF 0 "register_operand" "=x") + (xor:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "%0") + (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "xorps\t{%2, %0|%0, %2}" @@ -19571,26 +19652,16 @@ ;; SSE2 double precision floating point logical operation (define_expand "sse2_andv2df3" - [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0) - (and:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0) - (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))] + [(set (match_operand:V2DF 0 "register_operand" "") + (and:V2DF (match_operand:V2DF 1 "register_operand" "") + (match_operand:V2DF 2 "nonimmediate_operand" "")))] "TARGET_SSE2" "") (define_insn "*sse2_andv2df3" - [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "=x") 0) - (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] - "TARGET_SSE2 - && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" - "andpd\t{%2, %0|%0, %2}" - [(set_attr "type" "sselog") - (set_attr "mode" "V2DF")]) - -(define_insn "*sse2_andv2df3" - [(set (subreg:TI (match_operand:DF 0 "register_operand" "=x") 0) - (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] + [(set (match_operand:V2DF 0 "register_operand" "=x") + (and:V2DF (match_operand:V2DF 1 "nonimmediate_operand" "%0") + (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "andpd\t{%2, %0|%0, %2}" @@ -19598,51 +19669,32 @@ (set_attr "mode" "V2DF")]) (define_expand "sse2_nandv2df3" - [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0) - (and:TI (not:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0)) - (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))] + [(set (match_operand:V2DF 0 "register_operand" "") + (and:V2DF (not:V2DF (match_operand:V2DF 1 "register_operand" "")) + (match_operand:V2DF 2 "nonimmediate_operand" "")))] "TARGET_SSE2" "") (define_insn "*sse2_nandv2df3" - [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "=x") 0) - (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) - (match_operand:TI 2 "nonimmediate_operand" "xm")))] - "TARGET_SSE2" - "andnpd\t{%2, %0|%0, %2}" - [(set_attr "type" "sselog") - (set_attr "mode" "V2DF")]) - -(define_insn "*sse_nandti3_df" - [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) - (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) - (match_operand:TI 2 "nonimmediate_operand" "Ym")))] + [(set (match_operand:V2DF 0 "register_operand" "=x") + (and:V2DF (not:V2DF (match_operand:V2DF 1 "register_operand" "0")) + (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2" "andnpd\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V2DF")]) (define_expand "sse2_iorv2df3" - [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0) - (ior:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0) - (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))] + [(set (match_operand:V2DF 0 "register_operand" "") + (ior:V2DF (match_operand:V2DF 1 "register_operand" "") + (match_operand:V2DF 2 "nonimmediate_operand" "")))] "TARGET_SSE2" "") (define_insn "*sse2_iorv2df3" - [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "=x") 0) - (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] - "TARGET_SSE2 - && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" - "orpd\t{%2, %0|%0, %2}" - [(set_attr "type" "sselog") - (set_attr "mode" "V2DF")]) - -(define_insn "*sse2_iordf3" - [(set (subreg:TI (match_operand:DF 0 "register_operand" "=x") 0) - (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] + [(set (match_operand:V2DF 0 "register_operand" "=x") + (ior:V2DF (match_operand:V2DF 1 "nonimmediate_operand" "%0") + (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "orpd\t{%2, %0|%0, %2}" @@ -19650,26 +19702,16 @@ (set_attr "mode" "V2DF")]) (define_expand "sse2_xorv2df3" - [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0) - (xor:TI (subreg:TI (match_operand:V2DF 1 "nonimmediate_operand" "") 0) - (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))] + [(set (match_operand:V2DF 0 "register_operand" "") + (xor:V2DF (match_operand:V2DF 1 "nonimmediate_operand" "") + (match_operand:V2DF 2 "nonimmediate_operand" "")))] "TARGET_SSE2" "") (define_insn "*sse2_xorv2df3" - [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "=x") 0) - (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] - "TARGET_SSE2 - && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" - "xorpd\t{%2, %0|%0, %2}" - [(set_attr "type" "sselog") - (set_attr "mode" "V2DF")]) - -(define_insn "*sse2_xordf3" - [(set (subreg:TI (match_operand:DF 0 "register_operand" "=x") 0) - (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") - (match_operand:TI 2 "nonimmediate_operand" "xm")))] + [(set (match_operand:V2DF 0 "register_operand" "=x") + (xor:V2DF (match_operand:V2DF 1 "nonimmediate_operand" "%0") + (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "xorpd\t{%2, %0|%0, %2}" diff --git a/contrib/gcc/config/i386/t-rtems-i386 b/contrib/gcc/config/i386/t-rtems-i386 index b57f4fd..d32928c 100644 --- a/contrib/gcc/config/i386/t-rtems-i386 +++ b/contrib/gcc/config/i386/t-rtems-i386 @@ -36,17 +36,17 @@ xp-bit.c: $(srcdir)/config/fp-bit.c echo '#define EXTENDED_FLOAT_STUBS' > xp-bit.c cat $(srcdir)/config/fp-bit.c >> xp-bit.c -MULTILIB_OPTIONS = mcpu=i486/mcpu=pentium/mcpu=pentiumpro/mcpu=k6/mcpu=athlon \ +MULTILIB_OPTIONS = mtune=i486/mtune=pentium/mtune=pentiumpro/mtune=k6/mtune=athlon \ msoft-float mno-fp-ret-in-387 MULTILIB_DIRNAMES= m486 mpentium mpentiumpro k6 athlon soft-float nofp MULTILIB_MATCHES = msoft-float=mno-m80387 MULTILIB_EXCEPTIONS = \ mno-fp-ret-in-387 \ -mcpu=i486/*mno-fp-ret-in-387* \ -mcpu=pentium/*msoft-float* mcpu=pentium/*mno-fp-ret-in-387* \ -mcpu=pentiumpro/*msoft-float* mcpu=pentiumpro/*mno-fp-ret-in-387* \ -mcpu=k6/*msoft-float* mcpu=k6/*mno-fp-ret-in-387* \ -mcpu=athlon/*msoft-float* mcpu=athlon/*mno-fp-ret-in-387* +mtune=i486/*mno-fp-ret-in-387* \ +mtune=pentium/*msoft-float* mtune=pentium/*mno-fp-ret-in-387* \ +mtune=pentiumpro/*msoft-float* mtune=pentiumpro/*mno-fp-ret-in-387* \ +mtune=k6/*msoft-float* mtune=k6/*mno-fp-ret-in-387* \ +mtune=athlon/*msoft-float* mtune=athlon/*mno-fp-ret-in-387* EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o diff --git a/contrib/gcc/config/i386/xmmintrin.h b/contrib/gcc/config/i386/xmmintrin.h index 1bc8878..921806f 100644 --- a/contrib/gcc/config/i386/xmmintrin.h +++ b/contrib/gcc/config/i386/xmmintrin.h @@ -38,10 +38,10 @@ #include <mmintrin.h> /* The data type intended for user use. */ -typedef int __m128 __attribute__ ((__mode__(__V4SF__))); +typedef float __m128 __attribute__ ((__mode__(__V4SF__))); /* Internal data types for implementing the intrinsics. */ -typedef int __v4sf __attribute__ ((__mode__(__V4SF__))); +typedef float __v4sf __attribute__ ((__mode__(__V4SF__))); /* Create a selector for use with the SHUFPS instruction. */ #define _MM_SHUFFLE(fp3,fp2,fp1,fp0) \ diff --git a/contrib/gcc/config/ia64/ia64.c b/contrib/gcc/config/ia64/ia64.c index 19c5e92..c215b19 100644 --- a/contrib/gcc/config/ia64/ia64.c +++ b/contrib/gcc/config/ia64/ia64.c @@ -390,20 +390,55 @@ call_operand (rtx op, enum machine_mode mode) int sdata_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) { + HOST_WIDE_INT offset = 0, size = 0; + switch (GET_CODE (op)) { case CONST: - if (GET_CODE (XEXP (op, 0)) != PLUS - || GET_CODE (XEXP (XEXP (op, 0), 0)) != SYMBOL_REF) + op = XEXP (op, 0); + if (GET_CODE (op) != PLUS + || GET_CODE (XEXP (op, 0)) != SYMBOL_REF + || GET_CODE (XEXP (op, 1)) != CONST_INT) break; - op = XEXP (XEXP (op, 0), 0); + offset = INTVAL (XEXP (op, 1)); + op = XEXP (op, 0); /* FALLTHRU */ case SYMBOL_REF: if (CONSTANT_POOL_ADDRESS_P (op)) - return GET_MODE_SIZE (get_pool_mode (op)) <= ia64_section_threshold; + { + size = GET_MODE_SIZE (get_pool_mode (op)); + if (size > ia64_section_threshold) + return false; + } else - return SYMBOL_REF_LOCAL_P (op) && SYMBOL_REF_SMALL_P (op); + { + tree t; + + if (!SYMBOL_REF_LOCAL_P (op) || !SYMBOL_REF_SMALL_P (op)) + return false; + + /* Note that in addition to DECLs, we can get various forms + of constants here. */ + t = SYMBOL_REF_DECL (op); + if (DECL_P (t)) + t = DECL_SIZE_UNIT (t); + else + t = TYPE_SIZE_UNIT (TREE_TYPE (t)); + if (t && host_integerp (t, 0)) + { + size = tree_low_cst (t, 0); + if (size < 0) + size = 0; + } + } + + /* Deny the stupid user trick of addressing outside the object. Such + things quickly result in GPREL22 relocation overflows. Of course, + they're also highly undefined. From a pure pedant's point of view + they deserve a slap on the wrist (such as provided by a relocation + overflow), but that just leads to bugzilla noise. */ + return (offset >= 0 && offset <= size); default: break; @@ -3154,10 +3189,13 @@ ia64_expand_epilogue (int sibcall_p) preserve those input registers used as arguments to the sibling call. It is unclear how to compute that number here. */ if (current_frame_info.n_input_regs != 0) - emit_insn (gen_alloc (gen_rtx_REG (DImode, fp), - GEN_INT (0), GEN_INT (0), - GEN_INT (current_frame_info.n_input_regs), - GEN_INT (0))); + { + rtx n_inputs = GEN_INT (current_frame_info.n_input_regs); + insn = emit_insn (gen_alloc (gen_rtx_REG (DImode, fp), + const0_rtx, const0_rtx, + n_inputs, const0_rtx)); + RTX_FRAME_RELATED_P (insn) = 1; + } } } @@ -3283,15 +3321,16 @@ static bool ia64_assemble_integer (rtx x, unsigned int size, int aligned_p) { if (size == POINTER_SIZE / BITS_PER_UNIT - && aligned_p && !(TARGET_NO_PIC || TARGET_AUTO_PIC) && GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x)) { - if (POINTER_SIZE == 32) - fputs ("\tdata4\t@fptr(", asm_out_file); - else - fputs ("\tdata8\t@fptr(", asm_out_file); + static const char * const directive[2][2] = { + /* 64-bit pointer */ /* 32-bit pointer */ + { "\tdata8.ua\t@fptr(", "\tdata4.ua\t@fptr("}, /* unaligned */ + { "\tdata8\t@fptr(", "\tdata4\t@fptr("} /* aligned */ + }; + fputs (directive[(aligned_p != 0)][POINTER_SIZE == 32], asm_out_file); output_addr_const (asm_out_file, x); fputs (")\n", asm_out_file); return true; @@ -3917,6 +3956,12 @@ ia64_function_arg_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, static bool ia64_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) { + /* We can't perform a sibcall if the current function has the syscall_linkage + attribute. */ + if (lookup_attribute ("syscall_linkage", + TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) + return false; + /* We must always return with our current GP. This means we can only sibcall to functions defined in the current module. */ return decl && (*targetm.binds_local_p) (decl); @@ -7782,13 +7827,24 @@ process_set (FILE *asm_out_file, rtx pat) { dest_regno = REGNO (dest); - /* If this isn't the final destination for ar.pfs, the alloc - shouldn't have been marked frame related. */ - if (dest_regno != current_frame_info.reg_save_ar_pfs) - abort (); - - fprintf (asm_out_file, "\t.save ar.pfs, r%d\n", - ia64_dbx_register_number (dest_regno)); + /* If this is the final destination for ar.pfs, then this must + be the alloc in the prologue. */ + if (dest_regno == current_frame_info.reg_save_ar_pfs) + fprintf (asm_out_file, "\t.save ar.pfs, r%d\n", + ia64_dbx_register_number (dest_regno)); + else + { + /* This must be an alloc before a sibcall. We must drop the + old frame info. The easiest way to drop the old frame + info is to ensure we had a ".restore sp" directive + followed by a new prologue. If the procedure doesn't + have a memory-stack frame, we'll issue a dummy ".restore + sp" now. */ + if (current_frame_info.total_size == 0 && !frame_pointer_needed) + /* if haven't done process_epilogue() yet, do it now */ + process_epilogue (); + fprintf (asm_out_file, "\t.prologue\n"); + } return 1; } diff --git a/contrib/gcc/config/ia64/t-glibc b/contrib/gcc/config/ia64/t-glibc index a105662..df4fe9c 100644 --- a/contrib/gcc/config/ia64/t-glibc +++ b/contrib/gcc/config/ia64/t-glibc @@ -1 +1,3 @@ -LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c +# Use system libunwind library on IA-64 GLIBC based system. +LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ + $(srcdir)/unwind-compat.c diff --git a/contrib/gcc/config/ia64/t-glibc-libunwind b/contrib/gcc/config/ia64/t-glibc-libunwind new file mode 100644 index 0000000..df78f1d --- /dev/null +++ b/contrib/gcc/config/ia64/t-glibc-libunwind @@ -0,0 +1,4 @@ +# Build libunwind for IA-64 GLIBC based system. +LIBUNWIND = $(srcdir)/config/ia64/fde-glibc.c \ + $(srcdir)/config/ia64/unwind-ia64.c +LIBUNWINDDEP = unwind.inc diff --git a/contrib/gcc/config/ia64/t-hpux b/contrib/gcc/config/ia64/t-hpux index 597c2ac..d89f174 100644 --- a/contrib/gcc/config/ia64/t-hpux +++ b/contrib/gcc/config/ia64/t-hpux @@ -23,6 +23,8 @@ LIBGCC1_TEST = # We do not want to include the EH stuff that linux uses, we want to use # the HP-UX libunwind library. +T_CFLAGS += -DUSE_LIBUNWIND_EXCEPTIONS + LIB2ADDEH = SHLIB_EXT = .so diff --git a/contrib/gcc/config/ia64/unwind-ia64.c b/contrib/gcc/config/ia64/unwind-ia64.c index d981d8c..a49652e 100644 --- a/contrib/gcc/config/ia64/unwind-ia64.c +++ b/contrib/gcc/config/ia64/unwind-ia64.c @@ -37,6 +37,7 @@ #include "tm.h" #include "unwind.h" #include "unwind-ia64.h" +#include "unwind-compat.h" #include "ia64intrin.h" /* This isn't thread safe, but nice for occasional tests. */ @@ -2274,6 +2275,8 @@ uw_install_context (struct _Unwind_Context *current __attribute__((unused)), "(p6) ldf.fill f22 = [r28] \n\t" "cmp.ne p7, p0 = r0, r29 \n\t" ";; \n\t" + "ld8 r27 = [r20], 8 \n\t" + ";; \n\t" "ld8 r28 = [r20], 8 \n\t" "(p7) ldf.fill f23 = [r29] \n\t" "cmp.ne p6, p0 = r0, r22 \n\t" @@ -2381,4 +2384,24 @@ uw_identify_context (struct _Unwind_Context *context) } #include "unwind.inc" + +#if defined (USE_GAS_SYMVER) && defined (SHARED) && defined (USE_LIBUNWIND_EXCEPTIONS) +alias (_Unwind_Backtrace); +alias (_Unwind_DeleteException); +alias (_Unwind_FindEnclosingFunction); +alias (_Unwind_FindTableEntry); +alias (_Unwind_ForcedUnwind); +alias (_Unwind_GetBSP); +alias (_Unwind_GetCFA); +alias (_Unwind_GetGR); +alias (_Unwind_GetIP); +alias (_Unwind_GetLanguageSpecificData); +alias (_Unwind_GetRegionStart); +alias (_Unwind_RaiseException); +alias (_Unwind_Resume); +alias (_Unwind_Resume_or_Rethrow); +alias (_Unwind_SetGR); +alias (_Unwind_SetIP); +#endif + #endif diff --git a/contrib/gcc/config/ia64/unwind-ia64.h b/contrib/gcc/config/ia64/unwind-ia64.h index b56b38c..053829f 100644 --- a/contrib/gcc/config/ia64/unwind-ia64.h +++ b/contrib/gcc/config/ia64/unwind-ia64.h @@ -28,4 +28,5 @@ struct unw_table_entry extern struct unw_table_entry * _Unwind_FindTableEntry (void *pc, unsigned long *segment_base, - unsigned long *gp); + unsigned long *gp) + __attribute__ ((__visibility__ ("hidden"))); diff --git a/contrib/gcc/config/rs6000/aix.h b/contrib/gcc/config/rs6000/aix.h index f189407..b14107f 100644 --- a/contrib/gcc/config/rs6000/aix.h +++ b/contrib/gcc/config/rs6000/aix.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for IBM RS/6000 POWER running AIX. - Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -175,15 +175,15 @@ #define JUMP_TABLES_IN_TEXT_SECTION 1 /* Enable AIX XL compiler calling convention breakage compatibility. */ -#undef TARGET_XL_CALL -#define MASK_XL_CALL 0x40000000 -#define TARGET_XL_CALL (target_flags & MASK_XL_CALL) +#undef TARGET_XL_COMPAT +#define MASK_XL_COMPAT 0x40000000 +#define TARGET_XL_COMPAT (target_flags & MASK_XL_COMPAT) #undef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES \ - {"xl-call", MASK_XL_CALL, \ - N_("Always pass floating-point arguments in memory") }, \ - {"no-xl-call", - MASK_XL_CALL, \ - N_("Don't always pass floating-point arguments in memory") }, \ + {"xl-compat", MASK_XL_COMPAT, \ + N_("Conform more closely to IBM XLC semantics") }, \ + {"no-xl-compat", - MASK_XL_COMPAT, \ + N_("Default GCC semantics that differ from IBM XLC") }, \ SUBSUBTARGET_SWITCHES #define SUBSUBTARGET_SWITCHES @@ -209,7 +209,7 @@ code that does the save/restore is generated by the linker, so we have no good way to determine at compile time what to do. */ -#ifdef __powerpc64__ +#ifdef __64BIT__ #define MD_FROB_UPDATE_CONTEXT(CTX, FS) \ do { \ if ((FS)->regs.reg[2].how == REG_UNSAVED) \ diff --git a/contrib/gcc/config/rs6000/aix41.h b/contrib/gcc/config/rs6000/aix41.h index 373c10c..542f928 100644 --- a/contrib/gcc/config/rs6000/aix41.h +++ b/contrib/gcc/config/rs6000/aix41.h @@ -98,3 +98,7 @@ #undef RS6000_CALL_GLUE #define RS6000_CALL_GLUE "{cror 31,31,31|nop}" +/* The IBM AIX 4.x assembler doesn't support forward references in + .set directives. We handle this by deferring the output of .set + directives to the end of the compilation unit. */ +#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) true diff --git a/contrib/gcc/config/rs6000/aix43.h b/contrib/gcc/config/rs6000/aix43.h index a76e694..50bd304 100644 --- a/contrib/gcc/config/rs6000/aix43.h +++ b/contrib/gcc/config/rs6000/aix43.h @@ -187,3 +187,8 @@ do { \ #undef LD_INIT_SWITCH #define LD_INIT_SWITCH "-binitfini" + +/* The IBM AIX 4.x assembler doesn't support forward references in + .set directives. We handle this by deferring the output of .set + directives to the end of the compilation unit. */ +#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) true diff --git a/contrib/gcc/config/rs6000/aix52.h b/contrib/gcc/config/rs6000/aix52.h index c066650..6f12619 100644 --- a/contrib/gcc/config/rs6000/aix52.h +++ b/contrib/gcc/config/rs6000/aix52.h @@ -193,3 +193,7 @@ do { \ #undef TARGET_C99_FUNCTIONS #define TARGET_C99_FUNCTIONS 1 +#ifndef _AIX52 +extern long long int atoll(const char *); +#endif + diff --git a/contrib/gcc/config/rs6000/altivec.h b/contrib/gcc/config/rs6000/altivec.h index 04d120d..779b428 100644 --- a/contrib/gcc/config/rs6000/altivec.h +++ b/contrib/gcc/config/rs6000/altivec.h @@ -32,46 +32,29 @@ #ifndef _ALTIVEC_H #define _ALTIVEC_H 1 -/* Required by Motorola specs. */ -#define __VEC__ 10206 - -#ifndef __ALTIVEC__ -#define __ALTIVEC__ 1 +#if !defined(__VEC__) || !defined(__ALTIVEC__) +#error Use the "-maltivec" flag to enable PowerPC AltiVec support #endif -#define __vector __attribute__((vector_size(16))) +/* If __APPLE_ALTIVEC__ is defined, the compiler supports 'vector', + 'pixel' and 'bool' as context-sensitive AltiVec keywords (in + non-AltiVec contexts, they revert to their original meanings, + if any), so we do not need to define them as macros. */ -/* You are allowed to undef this for C++ compatibility. */ +#if !defined(__APPLE_ALTIVEC__) +/* You are allowed to undef these for C++ compatibility. */ #define vector __vector +#define pixel __pixel +#define bool __bool +#endif -#define bool signed -#define pixel unsigned short -#define __pixel unsigned short - -/* Dummy prototype. */ -extern int __altivec_link_error_invalid_argument (); - -/* Helper macros. */ +/* Condition register codes for AltiVec predicates. */ #define __CR6_EQ 0 #define __CR6_EQ_REV 1 #define __CR6_LT 2 #define __CR6_LT_REV 3 -#define __bin_args_eq(xtype, x, ytype, y) \ - (__builtin_types_compatible_p (xtype, typeof (x)) \ - && __builtin_types_compatible_p (ytype, typeof (y))) - -#define __un_args_eq(xtype, x) \ - __builtin_types_compatible_p (xtype, typeof (x)) - -#define __tern_args_eq(xtype, x, ytype, y, ztype, z) \ - (__builtin_types_compatible_p (xtype, typeof (x)) \ - && __builtin_types_compatible_p (ytype, typeof (y)) \ - && __builtin_types_compatible_p (ztype, typeof (z))) - -#define __ch(x, y, z) __builtin_choose_expr (x, y, z) - /* These are easy... Same exact arguments. */ #define vec_vaddcuw vec_addc @@ -122,1077 +105,1434 @@ extern "C++" { /* Prototypes for builtins that take literals and must always be inlined. */ -inline vector float vec_ctf (vector unsigned int, const char) __attribute__ ((always_inline)); -inline vector float vec_ctf (vector signed int, const char) __attribute__ ((always_inline)); -inline vector float vec_vcfsx (vector signed int a1, const char a2) __attribute__ ((always_inline)); -inline vector float vec_vcfux (vector unsigned int a1, const char a2) __attribute__ ((always_inline)); -inline vector signed int vec_cts (vector float, const char) __attribute__ ((always_inline)); -inline vector unsigned int vec_ctu (vector float, const char) __attribute__ ((always_inline)); -inline void vec_dss (const char) __attribute__ ((always_inline)); - -inline void vec_dst (vector unsigned char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (vector signed char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (vector unsigned short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (vector signed short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (vector unsigned int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (vector signed int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (vector float *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (unsigned char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (signed char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (unsigned short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (signed short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (unsigned int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (signed int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (unsigned long *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (signed long *, int, const char) __attribute__ ((always_inline)); -inline void vec_dst (float *, int, const char) __attribute__ ((always_inline)); - -inline void vec_dstst (vector unsigned char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (vector signed char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (vector unsigned short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (vector signed short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (vector unsigned int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (vector signed int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (vector float *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (unsigned char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (signed char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (unsigned short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (signed short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (unsigned int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (signed int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (unsigned long *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (signed long *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstst (float *, int, const char) __attribute__ ((always_inline)); - -inline void vec_dststt (vector unsigned char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (vector signed char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (vector unsigned short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (vector signed short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (vector unsigned int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (vector signed int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (vector float *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (unsigned char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (signed char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (unsigned short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (signed short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (unsigned int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (signed int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (unsigned long *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (signed long *, int, const char) __attribute__ ((always_inline)); -inline void vec_dststt (float *, int, const char) __attribute__ ((always_inline)); - -inline void vec_dstt (vector unsigned char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (vector signed char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (vector unsigned short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (vector signed short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (vector unsigned int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (vector signed int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (vector float *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (unsigned char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (signed char *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (unsigned short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (signed short *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (unsigned int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (signed int *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (unsigned long *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (signed long *, int, const char) __attribute__ ((always_inline)); -inline void vec_dstt (float *, int, const char) __attribute__ ((always_inline)); - -inline vector float vec_sld (vector float, vector float, const char) __attribute__ ((always_inline)); -inline vector signed int vec_sld (vector signed int, vector signed int, const char) __attribute__ ((always_inline)); -inline vector unsigned int vec_sld (vector unsigned int, vector unsigned int, const char) __attribute__ ((always_inline)); -inline vector signed short vec_sld (vector signed short, vector signed short, const char) __attribute__ ((always_inline)); -inline vector unsigned short vec_sld (vector unsigned short, vector unsigned short, const char) __attribute__ ((always_inline)); -inline vector signed char vec_sld (vector signed char, vector signed char, const char) __attribute__ ((always_inline)); -inline vector unsigned char vec_sld (vector unsigned char, vector unsigned char, const char) __attribute__ ((always_inline)); -inline vector signed char vec_splat (vector signed char, const char) __attribute__ ((always_inline)); -inline vector unsigned char vec_splat (vector unsigned char, const char) __attribute__ ((always_inline)); -inline vector signed short vec_splat (vector signed short, const char) __attribute__ ((always_inline)); -inline vector unsigned short vec_splat (vector unsigned short, const char) __attribute__ ((always_inline)); -inline vector float vec_splat (vector float, const char) __attribute__ ((always_inline)); -inline vector signed int vec_splat (vector signed int, const char) __attribute__ ((always_inline)); -inline vector unsigned int vec_splat (vector unsigned int, const char) __attribute__ ((always_inline)); -inline vector signed char vec_splat_s8 (const char) __attribute__ ((always_inline)); -inline vector signed short vec_splat_s16 (const char) __attribute__ ((always_inline)); -inline vector signed int vec_splat_s32 (const char) __attribute__ ((always_inline)); -inline vector unsigned char vec_splat_u8 (const char) __attribute__ ((always_inline)); -inline vector unsigned short vec_splat_u16 (const char) __attribute__ ((always_inline)); -inline vector unsigned int vec_splat_u32 (const char) __attribute__ ((always_inline)); -inline vector float vec_vspltw (vector float a1, const char a2) __attribute__ ((always_inline)); -inline vector signed int vec_vspltw (vector signed int a1, const char a2) __attribute__ ((always_inline)); -inline vector unsigned int vec_vspltw (vector unsigned int a1, const char a2) __attribute__ ((always_inline)); -inline vector signed short vec_vsplth (vector signed short a1, const char a2) __attribute__ ((always_inline)); -inline vector unsigned short vec_vsplth (vector unsigned short a1, const char a2) __attribute__ ((always_inline)); -inline vector signed char vec_vspltb (vector signed char a1, const char a2) __attribute__ ((always_inline)); -inline vector unsigned char vec_vspltb (vector unsigned char a1, const char a2) __attribute__ ((always_inline)); +inline __vector float vec_ctf (__vector unsigned int, const int) __attribute__ ((always_inline)); +inline __vector float vec_ctf (__vector signed int, const int) __attribute__ ((always_inline)); +inline __vector float vec_vcfsx (__vector signed int a1, const int a2) __attribute__ ((always_inline)); +inline __vector float vec_vcfux (__vector unsigned int a1, const int a2) __attribute__ ((always_inline)); +inline __vector signed int vec_cts (__vector float, const int) __attribute__ ((always_inline)); +inline __vector unsigned int vec_ctu (__vector float, const int) __attribute__ ((always_inline)); +inline void vec_dss (const int) __attribute__ ((always_inline)); + +inline void vec_dst (const __vector unsigned char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector signed char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector __bool char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector unsigned short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector signed short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector __bool short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector __pixel *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector unsigned int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector signed int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector __bool int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const __vector float *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const unsigned char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const signed char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const unsigned short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const unsigned int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const unsigned long *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const long *, int, const int) __attribute__ ((always_inline)); +inline void vec_dst (const float *, int, const int) __attribute__ ((always_inline)); + +inline void vec_dstst (const __vector unsigned char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector signed char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector __bool char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector unsigned short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector signed short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector __bool short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector __pixel *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector unsigned int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector signed int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector __bool int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const __vector float *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const unsigned char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const signed char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const unsigned short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const unsigned int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const unsigned long *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const long *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstst (const float *, int, const int) __attribute__ ((always_inline)); + +inline void vec_dststt (const __vector unsigned char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector signed char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector __bool char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector unsigned short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector signed short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector __bool short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector __pixel *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector unsigned int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector signed int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector __bool int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const __vector float *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const unsigned char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const signed char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const unsigned short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const unsigned int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const unsigned long *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const long *, int, const int) __attribute__ ((always_inline)); +inline void vec_dststt (const float *, int, const int) __attribute__ ((always_inline)); + +inline void vec_dstt (const __vector unsigned char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector signed char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector __bool char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector unsigned short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector signed short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector __bool short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector __pixel *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector unsigned int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector signed int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector __bool int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const __vector float *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const unsigned char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const signed char *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const unsigned short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const short *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const unsigned int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const int *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const unsigned long *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const long *, int, const int) __attribute__ ((always_inline)); +inline void vec_dstt (const float *, int, const int) __attribute__ ((always_inline)); + +inline __vector float vec_sld (__vector float, __vector float, const int) __attribute__ ((always_inline)); +inline __vector signed int vec_sld (__vector signed int, __vector signed int, const int) __attribute__ ((always_inline)); +inline __vector unsigned int vec_sld (__vector unsigned int, __vector unsigned int, const int) __attribute__ ((always_inline)); +inline __vector __bool int vec_sld (__vector __bool int, __vector __bool int, const int) __attribute__ ((always_inline)); +inline __vector signed short vec_sld (__vector signed short, __vector signed short, const int) __attribute__ ((always_inline)); +inline __vector unsigned short vec_sld (__vector unsigned short, __vector unsigned short, const int) __attribute__ ((always_inline)); +inline __vector __bool short vec_sld (__vector __bool short, __vector __bool short, const int) __attribute__ ((always_inline)); +inline __vector __pixel vec_sld (__vector __pixel, __vector __pixel, const int) __attribute__ ((always_inline)); +inline __vector signed char vec_sld (__vector signed char, __vector signed char, const int) __attribute__ ((always_inline)); +inline __vector unsigned char vec_sld (__vector unsigned char, __vector unsigned char, const int) __attribute__ ((always_inline)); +inline __vector __bool char vec_sld (__vector __bool char, __vector __bool char, const int) __attribute__ ((always_inline)); +inline __vector signed char vec_splat (__vector signed char, const int) __attribute__ ((always_inline)); +inline __vector unsigned char vec_splat (__vector unsigned char, const int) __attribute__ ((always_inline)); +inline __vector __bool char vec_splat (__vector __bool char, const int) __attribute__ ((always_inline)); +inline __vector signed short vec_splat (__vector signed short, const int) __attribute__ ((always_inline)); +inline __vector unsigned short vec_splat (__vector unsigned short, const int) __attribute__ ((always_inline)); +inline __vector __bool short vec_splat (__vector __bool short, const int) __attribute__ ((always_inline)); +inline __vector __pixel vec_splat (__vector __pixel, const int) __attribute__ ((always_inline)); +inline __vector float vec_splat (__vector float, const int) __attribute__ ((always_inline)); +inline __vector signed int vec_splat (__vector signed int, const int) __attribute__ ((always_inline)); +inline __vector unsigned int vec_splat (__vector unsigned int, const int) __attribute__ ((always_inline)); +inline __vector __bool int vec_splat (__vector __bool int, const int) __attribute__ ((always_inline)); +inline __vector signed char vec_splat_s8 (const int) __attribute__ ((always_inline)); +inline __vector signed short vec_splat_s16 (const int) __attribute__ ((always_inline)); +inline __vector signed int vec_splat_s32 (const int) __attribute__ ((always_inline)); +inline __vector unsigned char vec_splat_u8 (const int) __attribute__ ((always_inline)); +inline __vector unsigned short vec_splat_u16 (const int) __attribute__ ((always_inline)); +inline __vector unsigned int vec_splat_u32 (const int) __attribute__ ((always_inline)); +inline __vector float vec_vspltw (__vector float a1, const int a2) __attribute__ ((always_inline)); +inline __vector __bool int vec_vspltw (__vector __bool int a1, const int a2) __attribute__ ((always_inline)); +inline __vector signed int vec_vspltw (__vector signed int a1, const int a2) __attribute__ ((always_inline)); +inline __vector unsigned int vec_vspltw (__vector unsigned int a1, const int a2) __attribute__ ((always_inline)); +inline __vector __bool short vec_vsplth (__vector __bool short a1, const int a2) __attribute__ ((always_inline)); +inline __vector signed short vec_vsplth (__vector signed short a1, const int a2) __attribute__ ((always_inline)); +inline __vector unsigned short vec_vsplth (__vector unsigned short a1, const int a2) __attribute__ ((always_inline)); +inline __vector __pixel vec_vsplth (__vector __pixel a1, const int a2) __attribute__ ((always_inline)); +inline __vector __bool char vec_vspltb (__vector __bool char a1, const int a2) __attribute__ ((always_inline)); +inline __vector signed char vec_vspltb (__vector signed char a1, const int a2) __attribute__ ((always_inline)); +inline __vector unsigned char vec_vspltb (__vector unsigned char a1, const int a2) __attribute__ ((always_inline)); + +/* vec_step */ + +template<typename _Tp> +struct __vec_step_help +{ + // All proper __vector types will specialize _S_elem. +}; + +template<> +struct __vec_step_help<__vector signed short> +{ + static const int _S_elem = 8; +}; + +template<> +struct __vec_step_help<__vector unsigned short> +{ + static const int _S_elem = 8; +}; + +template<> +struct __vec_step_help<__vector __bool short> +{ + static const int _S_elem = 8; +}; + +template<> +struct __vec_step_help<__vector __pixel> +{ + static const int _S_elem = 8; +}; + +template<> +struct __vec_step_help<__vector signed int> +{ + static const int _S_elem = 4; +}; + +template<> +struct __vec_step_help<__vector unsigned int> +{ + static const int _S_elem = 4; +}; + +template<> +struct __vec_step_help<__vector __bool int> +{ + static const int _S_elem = 4; +}; + +template<> +struct __vec_step_help<__vector unsigned char> +{ + static const int _S_elem = 16; +}; + +template<> +struct __vec_step_help<__vector signed char> +{ + static const int _S_elem = 16; +}; + +template<> +struct __vec_step_help<__vector __bool char> +{ + static const int _S_elem = 16; +}; + +template<> +struct __vec_step_help<__vector float> +{ + static const int _S_elem = 4; +}; + +#define vec_step(t) __vec_step_help<typeof(t)>::_S_elem /* vec_abs */ -inline vector signed char -vec_abs (vector signed char a1) +inline __vector signed char +vec_abs (__vector signed char a1) { return __builtin_altivec_abs_v16qi (a1); } -inline vector signed short -vec_abs (vector signed short a1) +inline __vector signed short +vec_abs (__vector signed short a1) { return __builtin_altivec_abs_v8hi (a1); } -inline vector signed int -vec_abs (vector signed int a1) +inline __vector signed int +vec_abs (__vector signed int a1) { return __builtin_altivec_abs_v4si (a1); } -inline vector float -vec_abs (vector float a1) +inline __vector float +vec_abs (__vector float a1) { return __builtin_altivec_abs_v4sf (a1); } /* vec_abss */ -inline vector signed char -vec_abss (vector signed char a1) +inline __vector signed char +vec_abss (__vector signed char a1) { return __builtin_altivec_abss_v16qi (a1); } -inline vector signed short -vec_abss (vector signed short a1) +inline __vector signed short +vec_abss (__vector signed short a1) { return __builtin_altivec_abss_v8hi (a1); } -inline vector signed int -vec_abss (vector signed int a1) +inline __vector signed int +vec_abss (__vector signed int a1) { return __builtin_altivec_abss_v4si (a1); } /* vec_add */ -inline vector signed char -vec_add (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_add (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_add (__vector signed char a1, __vector __bool char a2) +{ + return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_add (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_add (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_add (__vector unsigned char a1, __vector __bool char a2) +{ + return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_add (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed short +vec_add (__vector __bool short a1, __vector signed short a2) { - return (vector signed char) __builtin_altivec_vaddubm ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_add (vector signed char a1, vector unsigned char a2) +inline __vector signed short +vec_add (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_add (vector unsigned char a1, vector signed char a2) +inline __vector signed short +vec_add (__vector signed short a1, __vector signed short a2) { - return (vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_add (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned short +vec_add (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_add (vector signed short a1, vector signed short a2) +inline __vector unsigned short +vec_add (__vector unsigned short a1, __vector __bool short a2) { - return (vector signed short) __builtin_altivec_vadduhm ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_add (vector signed short a1, vector unsigned short a2) +inline __vector unsigned short +vec_add (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_add (vector unsigned short a1, vector signed short a2) +inline __vector signed int +vec_add (__vector __bool int a1, __vector signed int a2) { - return (vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_add (vector unsigned short a1, vector unsigned short a2) +inline __vector signed int +vec_add (__vector signed int a1, __vector __bool int a2) { - return (vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_add (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_add (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vadduwm ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_add (vector signed int a1, vector unsigned int a2) +inline __vector unsigned int +vec_add (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_add (vector unsigned int a1, vector signed int a2) +inline __vector unsigned int +vec_add (__vector unsigned int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_add (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_add (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_add (vector float a1, vector float a2) +inline __vector float +vec_add (__vector float a1, __vector float a2) { - return (vector float) __builtin_altivec_vaddfp ((vector float) a1, (vector float) a2); + return (__vector float) __builtin_altivec_vaddfp ((__vector float) a1, (__vector float) a2); } /* vec_vaddfp */ -inline vector float -vec_vaddfp (vector float a1, vector float a2) +inline __vector float +vec_vaddfp (__vector float a1, __vector float a2) { - return (vector float) __builtin_altivec_vaddfp ((vector float) a1, (vector float) a2); + return (__vector float) __builtin_altivec_vaddfp ((__vector float) a1, (__vector float) a2); } /* vec_vadduwm */ -inline vector signed int -vec_vadduwm (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_vadduwm (__vector __bool int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vadduwm ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vadduwm (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_vadduwm (__vector signed int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vadduwm (vector unsigned int a1, vector signed int a2) +inline __vector signed int +vec_vadduwm (__vector signed int a1, __vector signed int a2) { - return (vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vadduwm (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vadduwm (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vadduwm ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_vadduwm (__vector unsigned int a1, __vector __bool int a2) +{ + return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_vadduwm (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vadduhm */ -inline vector signed short -vec_vadduhm (vector signed short a1, vector signed short a2) +inline __vector signed short +vec_vadduhm (__vector __bool short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vadduhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vadduhm (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_vadduhm (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vadduhm (vector unsigned short a1, vector signed short a2) +inline __vector signed short +vec_vadduhm (__vector signed short a1, __vector signed short a2) { - return (vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vadduhm (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vadduhm (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vadduhm ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector unsigned short +vec_vadduhm (__vector unsigned short a1, __vector __bool short a2) +{ + return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector unsigned short +vec_vadduhm (__vector unsigned short a1, __vector unsigned short a2) +{ + return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vaddubm */ -inline vector signed char -vec_vaddubm (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_vaddubm (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vaddubm (__vector signed char a1, __vector __bool char a2) +{ + return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vaddubm (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vaddubm ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vaddubm (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vaddubm (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vaddubm (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_vaddubm (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vaddubm (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vaddubm (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vaddubm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2); } /* vec_addc */ -inline vector unsigned int -vec_addc (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_addc (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vaddcuw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vaddcuw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_adds */ -inline vector unsigned char -vec_adds (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_adds (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_adds (__vector unsigned char a1, __vector __bool char a2) +{ + return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_adds (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_adds (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_adds (__vector signed char a1, __vector __bool char a2) +{ + return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_adds (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned short +vec_adds (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_adds (vector unsigned char a1, vector signed char a2) +inline __vector unsigned short +vec_adds (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_adds (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned short +vec_adds (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed char -vec_adds (vector signed char a1, vector signed char a2) +inline __vector signed short +vec_adds (__vector __bool short a1, __vector signed short a2) { - return (vector signed char) __builtin_altivec_vaddsbs ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_adds (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_adds (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_adds (vector unsigned short a1, vector signed short a2) +inline __vector signed short +vec_adds (__vector signed short a1, __vector signed short a2) { - return (vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_adds (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned int +vec_adds (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_adds (vector signed short a1, vector signed short a2) +inline __vector unsigned int +vec_adds (__vector unsigned int a1, __vector __bool int a2) { - return (vector signed short) __builtin_altivec_vaddshs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_adds (vector signed int a1, vector unsigned int a2) +inline __vector unsigned int +vec_adds (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vadduws ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_adds (vector unsigned int a1, vector signed int a2) +inline __vector signed int +vec_adds (__vector __bool int a1, __vector signed int a2) { - return (vector unsigned int) __builtin_altivec_vadduws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_adds (vector unsigned int a1, vector unsigned int a2) +inline __vector signed int +vec_adds (__vector signed int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vadduws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_adds (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_adds (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vaddsws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vaddsws */ -inline vector signed int -vec_vaddsws (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_vaddsws (__vector __bool int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vaddsws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vaddsws (__vector signed int a1, __vector __bool int a2) +{ + return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vaddsws (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vadduws */ -inline vector unsigned int -vec_vadduws (vector signed int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vadduws (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vadduws ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vadduws (vector unsigned int a1, vector signed int a2) +inline __vector unsigned int +vec_vadduws (__vector unsigned int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vadduws ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vadduws (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vadduws (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vadduws ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vaddshs */ -inline vector signed short -vec_vaddshs (vector signed short a1, vector signed short a2) + +inline __vector signed short +vec_vaddshs (__vector __bool short a1, __vector signed short a2) +{ + return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vaddshs (__vector signed short a1, __vector __bool short a2) { - return (vector signed short) __builtin_altivec_vaddshs ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vaddshs (__vector signed short a1, __vector signed short a2) +{ + return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vadduhs */ -inline vector unsigned short -vec_vadduhs (vector signed short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vadduhs (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vadduhs (vector unsigned short a1, vector signed short a2) +inline __vector unsigned short +vec_vadduhs (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vadduhs (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vadduhs (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vadduhs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vaddsbs */ -inline vector signed char -vec_vaddsbs (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_vaddsbs (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vaddsbs (__vector signed char a1, __vector __bool char a2) { - return (vector signed char) __builtin_altivec_vaddsbs ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vaddsbs (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2); } /* vec_vaddubs */ -inline vector unsigned char -vec_vaddubs (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vaddubs (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vaddubs (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_vaddubs (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vaddubs (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vaddubs (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vaddubs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2); } /* vec_and */ -inline vector float -vec_and (vector float a1, vector float a2) +inline __vector float +vec_and (__vector float a1, __vector float a2) { - return (vector float) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_and (vector float a1, vector signed int a2) +inline __vector float +vec_and (__vector float a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_and (vector signed int a1, vector float a2) +inline __vector float +vec_and (__vector __bool int a1, __vector float a2) { - return (vector float) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_and (vector signed int a1, vector signed int a2) +inline __vector __bool int +vec_and (__vector __bool int a1, __vector __bool int a2) { - return (vector signed int) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_and (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_and (__vector __bool int a1, __vector signed int a2) { - return (vector unsigned int) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_and (vector unsigned int a1, vector signed int a2) +inline __vector signed int +vec_and (__vector signed int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_and (vector unsigned int a1, vector unsigned int a2) +inline __vector signed int +vec_and (__vector signed int a1, __vector signed int a2) { - return (vector unsigned int) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_and (vector signed short a1, vector signed short a2) +inline __vector unsigned int +vec_and (__vector __bool int a1, __vector unsigned int a2) { - return (vector signed short) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_and (vector signed short a1, vector unsigned short a2) +inline __vector unsigned int +vec_and (__vector unsigned int a1, __vector __bool int a2) { - return (vector unsigned short) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_and (vector unsigned short a1, vector signed short a2) +inline __vector unsigned int +vec_and (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_and (vector unsigned short a1, vector unsigned short a2) +inline __vector __bool short +vec_and (__vector __bool short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_and (vector signed char a1, vector signed char a2) +inline __vector signed short +vec_and (__vector __bool short a1, __vector signed short a2) { - return (vector signed char) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_and (vector signed char a1, vector unsigned char a2) +inline __vector signed short +vec_and (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned char) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_and (vector unsigned char a1, vector signed char a2) +inline __vector signed short +vec_and (__vector signed short a1, __vector signed short a2) { - return (vector unsigned char) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_and (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned short +vec_and (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vand ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned short +vec_and (__vector unsigned short a1, __vector __bool short a2) +{ + return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned short +vec_and (__vector unsigned short a1, __vector unsigned short a2) +{ + return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_and (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool char +vec_and (__vector __bool char a1, __vector __bool char a2) +{ + return (__vector __bool char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_and (__vector signed char a1, __vector __bool char a2) +{ + return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_and (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_and (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_and (__vector unsigned char a1, __vector __bool char a2) +{ + return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_and (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2); } /* vec_andc */ -inline vector float -vec_andc (vector float a1, vector float a2) +inline __vector float +vec_andc (__vector float a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_andc (__vector float a1, __vector __bool int a2) +{ + return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_andc (__vector __bool int a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool int +vec_andc (__vector __bool int a1, __vector __bool int a2) +{ + return (__vector __bool int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_andc (__vector __bool int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_andc (__vector signed int a1, __vector __bool int a2) +{ + return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_andc (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_andc (__vector __bool int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_andc (__vector unsigned int a1, __vector __bool int a2) +{ + return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_andc (__vector unsigned int a1, __vector unsigned int a2) { - return (vector float) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_andc (vector float a1, vector signed int a2) +inline __vector __bool short +vec_andc (__vector __bool short a1, __vector __bool short a2) { - return (vector float) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_andc (vector signed int a1, vector float a2) +inline __vector signed short +vec_andc (__vector __bool short a1, __vector signed short a2) { - return (vector float) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_andc (vector signed int a1, vector signed int a2) +inline __vector signed short +vec_andc (__vector signed short a1, __vector __bool short a2) { - return (vector signed int) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_andc (vector signed int a1, vector unsigned int a2) +inline __vector signed short +vec_andc (__vector signed short a1, __vector signed short a2) { - return (vector unsigned int) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_andc (vector unsigned int a1, vector signed int a2) +inline __vector unsigned short +vec_andc (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_andc (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned short +vec_andc (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned int) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_andc (vector signed short a1, vector signed short a2) +inline __vector unsigned short +vec_andc (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_andc (vector signed short a1, vector unsigned short a2) +inline __vector signed char +vec_andc (__vector __bool char a1, __vector signed char a2) { - return (vector unsigned short) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_andc (vector unsigned short a1, vector signed short a2) +inline __vector __bool char +vec_andc (__vector __bool char a1, __vector __bool char a2) { - return (vector unsigned short) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_andc (vector unsigned short a1, vector unsigned short a2) +inline __vector signed char +vec_andc (__vector signed char a1, __vector __bool char a2) { - return (vector unsigned short) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_andc (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_andc (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_andc (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_andc (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_andc (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_andc (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_andc (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_andc (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vandc ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2); } /* vec_avg */ -inline vector unsigned char -vec_avg (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_avg (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vavgub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed char -vec_avg (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_avg (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vavgsb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_avg (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_avg (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vavguh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_avg (vector signed short a1, vector signed short a2) +inline __vector signed short +vec_avg (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vavgsh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_avg (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_avg (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vavguw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_avg (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_avg (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vavgsw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vavgsw */ -inline vector signed int -vec_vavgsw (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_vavgsw (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vavgsw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vavguw */ -inline vector unsigned int -vec_vavguw (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vavguw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vavguw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vavgsh */ -inline vector signed short -vec_vavgsh (vector signed short a1, vector signed short a2) +inline __vector signed short +vec_vavgsh (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vavgsh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vavguh */ -inline vector unsigned short -vec_vavguh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vavguh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vavguh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vavgsb */ -inline vector signed char -vec_vavgsb (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_vavgsb (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vavgsb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_vavgub */ -inline vector unsigned char -vec_vavgub (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vavgub (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vavgub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) a1, (__vector signed char) a2); } /* vec_ceil */ -inline vector float -vec_ceil (vector float a1) +inline __vector float +vec_ceil (__vector float a1) { - return (vector float) __builtin_altivec_vrfip ((vector float) a1); + return (__vector float) __builtin_altivec_vrfip ((__vector float) a1); } /* vec_cmpb */ -inline vector signed int -vec_cmpb (vector float a1, vector float a2) +inline __vector signed int +vec_cmpb (__vector float a1, __vector float a2) { - return (vector signed int) __builtin_altivec_vcmpbfp ((vector float) a1, (vector float) a2); + return (__vector signed int) __builtin_altivec_vcmpbfp ((__vector float) a1, (__vector float) a2); } /* vec_cmpeq */ -inline vector signed char -vec_cmpeq (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_cmpeq (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vcmpequb ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed char -vec_cmpeq (vector unsigned char a1, vector unsigned char a2) +inline __vector __bool char +vec_cmpeq (__vector unsigned char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vcmpequb ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_cmpeq (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_cmpeq (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vcmpequh ((vector signed short) a1, (vector signed short) a2); + return (__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_cmpeq (vector unsigned short a1, vector unsigned short a2) +inline __vector __bool short +vec_cmpeq (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vcmpequh ((vector signed short) a1, (vector signed short) a2); + return (__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_cmpeq (vector signed int a1, vector signed int a2) +inline __vector __bool int +vec_cmpeq (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vcmpequw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_cmpeq (vector unsigned int a1, vector unsigned int a2) +inline __vector __bool int +vec_cmpeq (__vector unsigned int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vcmpequw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_cmpeq (vector float a1, vector float a2) +inline __vector __bool int +vec_cmpeq (__vector float a1, __vector float a2) { - return (vector signed int) __builtin_altivec_vcmpeqfp ((vector float) a1, (vector float) a2); + return (__vector __bool int) __builtin_altivec_vcmpeqfp ((__vector float) a1, (__vector float) a2); } /* vec_vcmpeqfp */ -inline vector signed int -vec_vcmpeqfp (vector float a1, vector float a2) +inline __vector __bool int +vec_vcmpeqfp (__vector float a1, __vector float a2) { - return (vector signed int) __builtin_altivec_vcmpeqfp ((vector float) a1, (vector float) a2); + return (__vector __bool int) __builtin_altivec_vcmpeqfp ((__vector float) a1, (__vector float) a2); } /* vec_vcmpequw */ -inline vector signed int -vec_vcmpequw (vector signed int a1, vector signed int a2) +inline __vector __bool int +vec_vcmpequw (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vcmpequw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_vcmpequw (vector unsigned int a1, vector unsigned int a2) +inline __vector __bool int +vec_vcmpequw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vcmpequw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vcmpequh */ -inline vector signed short -vec_vcmpequh (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_vcmpequh (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vcmpequh ((vector signed short) a1, (vector signed short) a2); + return (__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_vcmpequh (vector unsigned short a1, vector unsigned short a2) +inline __vector __bool short +vec_vcmpequh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vcmpequh ((vector signed short) a1, (vector signed short) a2); + return (__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vcmpequb */ -inline vector signed char -vec_vcmpequb (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_vcmpequb (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vcmpequb ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed char -vec_vcmpequb (vector unsigned char a1, vector unsigned char a2) +inline __vector __bool char +vec_vcmpequb (__vector unsigned char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vcmpequb ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_cmpge */ -inline vector signed int -vec_cmpge (vector float a1, vector float a2) +inline __vector __bool int +vec_cmpge (__vector float a1, __vector float a2) { - return (vector signed int) __builtin_altivec_vcmpgefp ((vector float) a1, (vector float) a2); + return (__vector __bool int) __builtin_altivec_vcmpgefp ((__vector float) a1, (__vector float) a2); } /* vec_cmpgt */ -inline vector signed char -vec_cmpgt (vector unsigned char a1, vector unsigned char a2) +inline __vector __bool char +vec_cmpgt (__vector unsigned char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed char -vec_cmpgt (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_cmpgt (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vcmpgtsb ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_cmpgt (vector unsigned short a1, vector unsigned short a2) +inline __vector __bool short +vec_cmpgt (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vcmpgtuh ((vector signed short) a1, (vector signed short) a2); + return (__vector __bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_cmpgt (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_cmpgt (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vcmpgtsh ((vector signed short) a1, (vector signed short) a2); + return (__vector __bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_cmpgt (vector unsigned int a1, vector unsigned int a2) +inline __vector __bool int +vec_cmpgt (__vector unsigned int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vcmpgtuw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_cmpgt (vector signed int a1, vector signed int a2) +inline __vector __bool int +vec_cmpgt (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vcmpgtsw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_cmpgt (vector float a1, vector float a2) +inline __vector __bool int +vec_cmpgt (__vector float a1, __vector float a2) { - return (vector signed int) __builtin_altivec_vcmpgtfp ((vector float) a1, (vector float) a2); + return (__vector __bool int) __builtin_altivec_vcmpgtfp ((__vector float) a1, (__vector float) a2); } /* vec_vcmpgtfp */ -inline vector signed int -vec_vcmpgtfp (vector float a1, vector float a2) +inline __vector __bool int +vec_vcmpgtfp (__vector float a1, __vector float a2) { - return (vector signed int) __builtin_altivec_vcmpgtfp ((vector float) a1, (vector float) a2); + return (__vector __bool int) __builtin_altivec_vcmpgtfp ((__vector float) a1, (__vector float) a2); } /* vec_vcmpgtsw */ -inline vector signed int -vec_vcmpgtsw (vector signed int a1, vector signed int a2) +inline __vector __bool int +vec_vcmpgtsw (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vcmpgtsw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vcmpgtuw */ -inline vector signed int -vec_vcmpgtuw (vector unsigned int a1, vector unsigned int a2) +inline __vector __bool int +vec_vcmpgtuw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vcmpgtuw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vcmpgtsh */ -inline vector signed short -vec_cmpgtsh (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_vcmpgtsh (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vcmpgtsh ((vector signed short) a1, (vector signed short) a2); + return (__vector __bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vcmpgtuh */ -inline vector signed short -vec_vcmpgtuh (vector unsigned short a1, vector unsigned short a2) +inline __vector __bool short +vec_vcmpgtuh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vcmpgtuh ((vector signed short) a1, (vector signed short) a2); + return (__vector __bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vcmpgtsb */ -inline vector signed char -vec_vcmpgtsb (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_vcmpgtsb (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vcmpgtsb ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_vcmpgtub */ -inline vector signed char -vec_vcmpgtub (vector unsigned char a1, vector unsigned char a2) +inline __vector __bool char +vec_vcmpgtub (__vector unsigned char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a1, (__vector signed char) a2); } /* vec_cmple */ -inline vector signed int -vec_cmple (vector float a1, vector float a2) +inline __vector __bool int +vec_cmple (__vector float a1, __vector float a2) { - return (vector signed int) __builtin_altivec_vcmpgefp ((vector float) a2, (vector float) a1); + return (__vector __bool int) __builtin_altivec_vcmpgefp ((__vector float) a2, (__vector float) a1); } /* vec_cmplt */ -inline vector signed char -vec_cmplt (vector unsigned char a1, vector unsigned char a2) +inline __vector __bool char +vec_cmplt (__vector unsigned char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) a2, (vector signed char) a1); + return (__vector __bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a2, (__vector signed char) a1); } -inline vector signed char -vec_cmplt (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_cmplt (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vcmpgtsb ((vector signed char) a2, (vector signed char) a1); + return (__vector __bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a2, (__vector signed char) a1); } -inline vector signed short -vec_cmplt (vector unsigned short a1, vector unsigned short a2) +inline __vector __bool short +vec_cmplt (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vcmpgtuh ((vector signed short) a2, (vector signed short) a1); + return (__vector __bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a2, (__vector signed short) a1); } -inline vector signed short -vec_cmplt (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_cmplt (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vcmpgtsh ((vector signed short) a2, (vector signed short) a1); + return (__vector __bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a2, (__vector signed short) a1); } -inline vector signed int -vec_cmplt (vector unsigned int a1, vector unsigned int a2) +inline __vector __bool int +vec_cmplt (__vector unsigned int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vcmpgtuw ((vector signed int) a2, (vector signed int) a1); + return (__vector __bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a2, (__vector signed int) a1); } -inline vector signed int -vec_cmplt (vector signed int a1, vector signed int a2) +inline __vector __bool int +vec_cmplt (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vcmpgtsw ((vector signed int) a2, (vector signed int) a1); + return (__vector __bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a2, (__vector signed int) a1); } -inline vector signed int -vec_cmplt (vector float a1, vector float a2) +inline __vector __bool int +vec_cmplt (__vector float a1, __vector float a2) { - return (vector signed int) __builtin_altivec_vcmpgtfp ((vector float) a2, (vector float) a1); + return (__vector __bool int) __builtin_altivec_vcmpgtfp ((__vector float) a2, (__vector float) a1); } /* vec_ctf */ -inline vector float -vec_ctf (vector unsigned int a1, const char a2) +inline __vector float +vec_ctf (__vector unsigned int a1, const int a2) { - return (vector float) __builtin_altivec_vcfux ((vector signed int) a1, a2); + return (__vector float) __builtin_altivec_vcfux ((__vector signed int) a1, a2); } -inline vector float -vec_ctf (vector signed int a1, const char a2) +inline __vector float +vec_ctf (__vector signed int a1, const int a2) { - return (vector float) __builtin_altivec_vcfsx ((vector signed int) a1, a2); + return (__vector float) __builtin_altivec_vcfsx ((__vector signed int) a1, a2); } /* vec_vcfsx */ -inline vector float -vec_vcfsx (vector signed int a1, const char a2) +inline __vector float +vec_vcfsx (__vector signed int a1, const int a2) { - return (vector float) __builtin_altivec_vcfsx ((vector signed int) a1, a2); + return (__vector float) __builtin_altivec_vcfsx ((__vector signed int) a1, a2); } /* vec_vcfux */ -inline vector float -vec_vcfux (vector unsigned int a1, const char a2) +inline __vector float +vec_vcfux (__vector unsigned int a1, const int a2) { - return (vector float) __builtin_altivec_vcfux ((vector signed int) a1, a2); + return (__vector float) __builtin_altivec_vcfux ((__vector signed int) a1, a2); } /* vec_cts */ -inline vector signed int -vec_cts (vector float a1, const char a2) +inline __vector signed int +vec_cts (__vector float a1, const int a2) { - return (vector signed int) __builtin_altivec_vctsxs ((vector float) a1, a2); + return (__vector signed int) __builtin_altivec_vctsxs ((__vector float) a1, a2); } /* vec_ctu */ -inline vector unsigned int -vec_ctu (vector float a1, const char a2) +inline __vector unsigned int +vec_ctu (__vector float a1, const int a2) { - return (vector unsigned int) __builtin_altivec_vctuxs ((vector float) a1, a2); + return (__vector unsigned int) __builtin_altivec_vctuxs ((__vector float) a1, a2); } /* vec_dss */ inline void -vec_dss (const char a1) +vec_dss (const int a1) { __builtin_altivec_dss (a1); } @@ -1208,97 +1548,121 @@ vec_dssall (void) /* vec_dst */ inline void -vec_dst (vector unsigned char *a1, int a2, const char a3) +vec_dst (const __vector unsigned char *a1, int a2, const int a3) +{ + __builtin_altivec_dst ((void *) a1, a2, a3); +} + +inline void +vec_dst (const __vector signed char *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (vector signed char *a1, int a2, const char a3) +vec_dst (const __vector __bool char *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (vector unsigned short *a1, int a2, const char a3) +vec_dst (const __vector unsigned short *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (vector signed short *a1, int a2, const char a3) +vec_dst (const __vector signed short *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (vector unsigned int *a1, int a2, const char a3) +vec_dst (const __vector __bool short *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (vector signed int *a1, int a2, const char a3) +vec_dst (const __vector __pixel *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (vector float *a1, int a2, const char a3) +vec_dst (const __vector unsigned int *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (unsigned char *a1, int a2, const char a3) +vec_dst (const __vector signed int *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (signed char *a1, int a2, const char a3) +vec_dst (const __vector __bool int *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (unsigned short *a1, int a2, const char a3) +vec_dst (const __vector float *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (signed short *a1, int a2, const char a3) +vec_dst (const unsigned char *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (unsigned int *a1, int a2, const char a3) +vec_dst (const signed char *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (signed int *a1, int a2, const char a3) +vec_dst (const unsigned short *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (unsigned long *a1, int a2, const char a3) +vec_dst (const short *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (signed long *a1, int a2, const char a3) +vec_dst (const unsigned int *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } inline void -vec_dst (float *a1, int a2, const char a3) +vec_dst (const int *a1, int a2, const int a3) +{ + __builtin_altivec_dst ((void *) a1, a2, a3); +} + +inline void +vec_dst (const unsigned long *a1, int a2, const int a3) +{ + __builtin_altivec_dst ((void *) a1, a2, a3); +} + +inline void +vec_dst (const long *a1, int a2, const int a3) +{ + __builtin_altivec_dst ((void *) a1, a2, a3); +} + +inline void +vec_dst (const float *a1, int a2, const int a3) { __builtin_altivec_dst ((void *) a1, a2, a3); } @@ -1306,97 +1670,121 @@ vec_dst (float *a1, int a2, const char a3) /* vec_dstst */ inline void -vec_dstst (vector unsigned char *a1, int a2, const char a3) +vec_dstst (const __vector unsigned char *a1, int a2, const int a3) +{ + __builtin_altivec_dstst ((void *) a1, a2, a3); +} + +inline void +vec_dstst (const __vector signed char *a1, int a2, const int a3) +{ + __builtin_altivec_dstst ((void *) a1, a2, a3); +} + +inline void +vec_dstst (const __vector __bool char *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (vector signed char *a1, int a2, const char a3) +vec_dstst (const __vector unsigned short *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (vector unsigned short *a1, int a2, const char a3) +vec_dstst (const __vector signed short *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (vector signed short *a1, int a2, const char a3) +vec_dstst (const __vector __bool short *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (vector unsigned int *a1, int a2, const char a3) +vec_dstst (const __vector __pixel *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (vector signed int *a1, int a2, const char a3) +vec_dstst (const __vector unsigned int *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (vector float *a1, int a2, const char a3) +vec_dstst (const __vector signed int *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (unsigned char *a1, int a2, const char a3) +vec_dstst (const __vector __bool int *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (signed char *a1, int a2, const char a3) +vec_dstst (const __vector float *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (unsigned short *a1, int a2, const char a3) +vec_dstst (const unsigned char *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (signed short *a1, int a2, const char a3) +vec_dstst (const signed char *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (unsigned int *a1, int a2, const char a3) +vec_dstst (const unsigned short *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (signed int *a1, int a2, const char a3) +vec_dstst (const short *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (unsigned long *a1, int a2, const char a3) +vec_dstst (const unsigned int *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (signed long *a1, int a2, const char a3) +vec_dstst (const int *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } inline void -vec_dstst (float *a1, int a2, const char a3) +vec_dstst (const unsigned long *a1, int a2, const int a3) +{ + __builtin_altivec_dstst ((void *) a1, a2, a3); +} + +inline void +vec_dstst (const long *a1, int a2, const int a3) +{ + __builtin_altivec_dstst ((void *) a1, a2, a3); +} + +inline void +vec_dstst (const float *a1, int a2, const int a3) { __builtin_altivec_dstst ((void *) a1, a2, a3); } @@ -1404,97 +1792,121 @@ vec_dstst (float *a1, int a2, const char a3) /* vec_dststt */ inline void -vec_dststt (vector unsigned char *a1, int a2, const char a3) +vec_dststt (const __vector unsigned char *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (vector signed char *a1, int a2, const char a3) +vec_dststt (const __vector signed char *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (vector unsigned short *a1, int a2, const char a3) +vec_dststt (const __vector __bool char *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (vector signed short *a1, int a2, const char a3) +vec_dststt (const __vector unsigned short *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (vector unsigned int *a1, int a2, const char a3) +vec_dststt (const __vector signed short *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (vector signed int *a1, int a2, const char a3) +vec_dststt (const __vector __bool short *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (vector float *a1, int a2, const char a3) +vec_dststt (const __vector __pixel *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (unsigned char *a1, int a2, const char a3) +vec_dststt (const __vector unsigned int *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (signed char *a1, int a2, const char a3) +vec_dststt (const __vector signed int *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (unsigned short *a1, int a2, const char a3) +vec_dststt (const __vector __bool int *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (signed short *a1, int a2, const char a3) +vec_dststt (const __vector float *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (unsigned int *a1, int a2, const char a3) +vec_dststt (const unsigned char *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (signed int *a1, int a2, const char a3) +vec_dststt (const signed char *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (unsigned long *a1, int a2, const char a3) +vec_dststt (const unsigned short *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (signed long *a1, int a2, const char a3) +vec_dststt (const short *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } inline void -vec_dststt (float *a1, int a2, const char a3) +vec_dststt (const unsigned int *a1, int a2, const int a3) +{ + __builtin_altivec_dststt ((void *) a1, a2, a3); +} + +inline void +vec_dststt (const int *a1, int a2, const int a3) +{ + __builtin_altivec_dststt ((void *) a1, a2, a3); +} + +inline void +vec_dststt (const unsigned long *a1, int a2, const int a3) +{ + __builtin_altivec_dststt ((void *) a1, a2, a3); +} + +inline void +vec_dststt (const long *a1, int a2, const int a3) +{ + __builtin_altivec_dststt ((void *) a1, a2, a3); +} + +inline void +vec_dststt (const float *a1, int a2, const int a3) { __builtin_altivec_dststt ((void *) a1, a2, a3); } @@ -1502,3561 +1914,4931 @@ vec_dststt (float *a1, int a2, const char a3) /* vec_dstt */ inline void -vec_dstt (vector unsigned char *a1, int a2, const char a3) +vec_dstt (const __vector unsigned char *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (vector signed char *a1, int a2, const char a3) +vec_dstt (const __vector signed char *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (vector unsigned short *a1, int a2, const char a3) +vec_dstt (const __vector __bool char *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (vector signed short *a1, int a2, const char a3) +vec_dstt (const __vector unsigned short *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (vector unsigned int *a1, int a2, const char a3) +vec_dstt (const __vector signed short *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (vector signed int *a1, int a2, const char a3) +vec_dstt (const __vector __bool short *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (vector float *a1, int a2, const char a3) +vec_dstt (const __vector __pixel *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (unsigned char *a1, int a2, const char a3) +vec_dstt (const __vector unsigned int *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (signed char *a1, int a2, const char a3) +vec_dstt (const __vector signed int *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (unsigned short *a1, int a2, const char a3) +vec_dstt (const __vector __bool int *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (signed short *a1, int a2, const char a3) +vec_dstt (const __vector float *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (unsigned int *a1, int a2, const char a3) +vec_dstt (const unsigned char *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (signed int *a1, int a2, const char a3) +vec_dstt (const signed char *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (unsigned long *a1, int a2, const char a3) +vec_dstt (const unsigned short *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (signed long *a1, int a2, const char a3) +vec_dstt (const short *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } inline void -vec_dstt (float *a1, int a2, const char a3) +vec_dstt (const unsigned int *a1, int a2, const int a3) +{ + __builtin_altivec_dstt ((void *) a1, a2, a3); +} + +inline void +vec_dstt (const int *a1, int a2, const int a3) +{ + __builtin_altivec_dstt ((void *) a1, a2, a3); +} + +inline void +vec_dstt (const unsigned long *a1, int a2, const int a3) +{ + __builtin_altivec_dstt ((void *) a1, a2, a3); +} + +inline void +vec_dstt (const long *a1, int a2, const int a3) +{ + __builtin_altivec_dstt ((void *) a1, a2, a3); +} + +inline void +vec_dstt (const float *a1, int a2, const int a3) { __builtin_altivec_dstt ((void *) a1, a2, a3); } /* vec_expte */ -inline vector float -vec_expte (vector float a1) +inline __vector float +vec_expte (__vector float a1) { - return (vector float) __builtin_altivec_vexptefp ((vector float) a1); + return (__vector float) __builtin_altivec_vexptefp ((__vector float) a1); } /* vec_floor */ -inline vector float -vec_floor (vector float a1) +inline __vector float +vec_floor (__vector float a1) { - return (vector float) __builtin_altivec_vrfim ((vector float) a1); + return (__vector float) __builtin_altivec_vrfim ((__vector float) a1); } /* vec_ld */ -inline vector float -vec_ld (int a1, vector float *a2) +inline __vector float +vec_ld (int a1, const __vector float *a2) +{ + return (__vector float) __builtin_altivec_lvx (a1, (void *) a2); +} + +inline __vector float +vec_ld (int a1, const float *a2) +{ + return (__vector float) __builtin_altivec_lvx (a1, (void *) a2); +} + +inline __vector __bool int +vec_ld (int a1, const __vector __bool int *a2) { - return (vector float) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector __bool int) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector float -vec_ld (int a1, float *a2) +inline __vector signed int +vec_ld (int a1, const __vector signed int *a2) { - return (vector float) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector signed int -vec_ld (int a1, vector signed int *a2) +inline __vector signed int +vec_ld (int a1, const int *a2) { - return (vector signed int) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector signed int -vec_ld (int a1, signed int *a2) +inline __vector signed int +vec_ld (int a1, const long *a2) { - return (vector signed int) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector signed int -vec_ld (int a1, signed long *a2) +inline __vector unsigned int +vec_ld (int a1, const __vector unsigned int *a2) { - return (vector signed int) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector unsigned int -vec_ld (int a1, vector unsigned int *a2) +inline __vector unsigned int +vec_ld (int a1, const unsigned int *a2) { - return (vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector unsigned int -vec_ld (int a1, unsigned int *a2) +inline __vector unsigned int +vec_ld (int a1, const unsigned long *a2) { - return (vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector unsigned int -vec_ld (int a1, unsigned long *a2) +inline __vector __bool short +vec_ld (int a1, const __vector __bool short *a2) { - return (vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector __bool short) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector signed short -vec_ld (int a1, vector signed short *a2) +inline __vector __pixel +vec_ld (int a1, const __vector __pixel *a2) { - return (vector signed short) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector __pixel) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector signed short -vec_ld (int a1, signed short *a2) +inline __vector signed short +vec_ld (int a1, const __vector signed short *a2) { - return (vector signed short) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector signed short) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector unsigned short -vec_ld (int a1, vector unsigned short *a2) +inline __vector signed short +vec_ld (int a1, const short *a2) { - return (vector unsigned short) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector signed short) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector unsigned short -vec_ld (int a1, unsigned short *a2) +inline __vector unsigned short +vec_ld (int a1, const __vector unsigned short *a2) { - return (vector unsigned short) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector unsigned short) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector signed char -vec_ld (int a1, vector signed char *a2) +inline __vector unsigned short +vec_ld (int a1, const unsigned short *a2) { - return (vector signed char) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector unsigned short) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector signed char -vec_ld (int a1, signed char *a2) +inline __vector __bool char +vec_ld (int a1, const __vector __bool char *a2) { - return (vector signed char) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector __bool char) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector unsigned char -vec_ld (int a1, vector unsigned char *a2) +inline __vector signed char +vec_ld (int a1, const __vector signed char *a2) { - return (vector unsigned char) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector signed char) __builtin_altivec_lvx (a1, (void *) a2); } -inline vector unsigned char -vec_ld (int a1, unsigned char *a2) +inline __vector signed char +vec_ld (int a1, const signed char *a2) { - return (vector unsigned char) __builtin_altivec_lvx (a1, (void *) a2); + return (__vector signed char) __builtin_altivec_lvx (a1, (void *) a2); +} + +inline __vector unsigned char +vec_ld (int a1, const __vector unsigned char *a2) +{ + return (__vector unsigned char) __builtin_altivec_lvx (a1, (void *) a2); +} + +inline __vector unsigned char +vec_ld (int a1, const unsigned char *a2) +{ + return (__vector unsigned char) __builtin_altivec_lvx (a1, (void *) a2); } /* vec_lde */ -inline vector signed char -vec_lde (int a1, signed char *a2) +inline __vector signed char +vec_lde (int a1, const signed char *a2) { - return (vector signed char) __builtin_altivec_lvebx (a1, (void *) a2); + return (__vector signed char) __builtin_altivec_lvebx (a1, (void *) a2); } -inline vector unsigned char -vec_lde (int a1, unsigned char *a2) +inline __vector unsigned char +vec_lde (int a1, const unsigned char *a2) { - return (vector unsigned char) __builtin_altivec_lvebx (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvebx (a1, (void *) a2); } -inline vector signed short -vec_lde (int a1, signed short *a2) +inline __vector signed short +vec_lde (int a1, const short *a2) { - return (vector signed short) __builtin_altivec_lvehx (a1, (void *) a2); + return (__vector signed short) __builtin_altivec_lvehx (a1, (void *) a2); } -inline vector unsigned short -vec_lde (int a1, unsigned short *a2) +inline __vector unsigned short +vec_lde (int a1, const unsigned short *a2) { - return (vector unsigned short) __builtin_altivec_lvehx (a1, (void *) a2); + return (__vector unsigned short) __builtin_altivec_lvehx (a1, (void *) a2); } -inline vector float -vec_lde (int a1, float *a2) +inline __vector float +vec_lde (int a1, const float *a2) { - return (vector float) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector float) __builtin_altivec_lvewx (a1, (void *) a2); } -inline vector signed int -vec_lde (int a1, signed int *a2) +inline __vector signed int +vec_lde (int a1, const int *a2) { - return (vector signed int) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2); } -inline vector unsigned int -vec_lde (int a1, unsigned int *a2) +inline __vector unsigned int +vec_lde (int a1, const unsigned int *a2) { - return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2); } -inline vector signed int -vec_lde (int a1, signed long *a2) +inline __vector signed int +vec_lde (int a1, const long *a2) { - return (vector signed int) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2); } -inline vector unsigned int -vec_lde (int a1, unsigned long *a2) +inline __vector unsigned int +vec_lde (int a1, const unsigned long *a2) { - return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2); } /* vec_lvewx */ -inline vector float +inline __vector float vec_lvewx (int a1, float *a2) { - return (vector float) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector float) __builtin_altivec_lvewx (a1, (void *) a2); } -inline vector signed int -vec_lvewx (int a1, signed int *a2) +inline __vector signed int +vec_lvewx (int a1, int *a2) { - return (vector signed int) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2); } -inline vector unsigned int +inline __vector unsigned int vec_lvewx (int a1, unsigned int *a2) { - return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2); } -inline vector signed int -vec_lvewx (int a1, signed long *a2) +inline __vector signed int +vec_lvewx (int a1, long *a2) { - return (vector signed int) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2); } -inline vector unsigned int +inline __vector unsigned int vec_lvewx (int a1, unsigned long *a2) { - return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2); } /* vec_lvehx */ -inline vector signed short -vec_lvehx (int a1, signed short *a2) +inline __vector signed short +vec_lvehx (int a1, short *a2) { - return (vector signed short) __builtin_altivec_lvehx (a1, (void *) a2); + return (__vector signed short) __builtin_altivec_lvehx (a1, (void *) a2); } -inline vector unsigned short +inline __vector unsigned short vec_lvehx (int a1, unsigned short *a2) { - return (vector unsigned short) __builtin_altivec_lvehx (a1, (void *) a2); + return (__vector unsigned short) __builtin_altivec_lvehx (a1, (void *) a2); } /* vec_lvebx */ -inline vector signed char +inline __vector signed char vec_lvebx (int a1, signed char *a2) { - return (vector signed char) __builtin_altivec_lvebx (a1, (void *) a2); + return (__vector signed char) __builtin_altivec_lvebx (a1, (void *) a2); } -inline vector unsigned char +inline __vector unsigned char vec_lvebx (int a1, unsigned char *a2) { - return (vector unsigned char) __builtin_altivec_lvebx (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvebx (a1, (void *) a2); } /* vec_ldl */ -inline vector float -vec_ldl (int a1, vector float *a2) +inline __vector float +vec_ldl (int a1, const __vector float *a2) +{ + return (__vector float) __builtin_altivec_lvxl (a1, (void *) a2); +} + +inline __vector float +vec_ldl (int a1, const float *a2) +{ + return (__vector float) __builtin_altivec_lvxl (a1, (void *) a2); +} + +inline __vector __bool int +vec_ldl (int a1, const __vector __bool int *a2) +{ + return (__vector __bool int) __builtin_altivec_lvxl (a1, (void *) a2); +} + +inline __vector signed int +vec_ldl (int a1, const __vector signed int *a2) { - return (vector float) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector float -vec_ldl (int a1, float *a2) +inline __vector signed int +vec_ldl (int a1, const int *a2) { - return (vector float) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector signed int -vec_ldl (int a1, vector signed int *a2) +inline __vector signed int +vec_ldl (int a1, const long *a2) { - return (vector signed int) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector signed int -vec_ldl (int a1, signed int *a2) +inline __vector unsigned int +vec_ldl (int a1, const __vector unsigned int *a2) { - return (vector signed int) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector signed int -vec_ldl (int a1, signed long *a2) +inline __vector unsigned int +vec_ldl (int a1, const unsigned int *a2) { - return (vector signed int) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector unsigned int -vec_ldl (int a1, vector unsigned int *a2) +inline __vector unsigned int +vec_ldl (int a1, const unsigned long *a2) { - return (vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector unsigned int -vec_ldl (int a1, unsigned int *a2) +inline __vector __bool short +vec_ldl (int a1, const __vector __bool short *a2) { - return (vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector __bool short) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector unsigned int -vec_ldl (int a1, unsigned long *a2) +inline __vector __pixel +vec_ldl (int a1, const __vector __pixel *a2) { - return (vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector __pixel) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector signed short -vec_ldl (int a1, vector signed short *a2) +inline __vector signed short +vec_ldl (int a1, const __vector signed short *a2) { - return (vector signed short) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector signed short) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector signed short -vec_ldl (int a1, signed short *a2) +inline __vector signed short +vec_ldl (int a1, const short *a2) { - return (vector signed short) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector signed short) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector unsigned short -vec_ldl (int a1, vector unsigned short *a2) +inline __vector unsigned short +vec_ldl (int a1, const __vector unsigned short *a2) { - return (vector unsigned short) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector unsigned short) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector unsigned short -vec_ldl (int a1, unsigned short *a2) +inline __vector unsigned short +vec_ldl (int a1, const unsigned short *a2) { - return (vector unsigned short) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector unsigned short) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector signed char -vec_ldl (int a1, vector signed char *a2) +inline __vector __bool char +vec_ldl (int a1, const __vector __bool char *a2) { - return (vector signed char) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector __bool char) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector signed char -vec_ldl (int a1, signed char *a2) +inline __vector signed char +vec_ldl (int a1, const __vector signed char *a2) { - return (vector signed char) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector signed char) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector unsigned char -vec_ldl (int a1, vector unsigned char *a2) +inline __vector signed char +vec_ldl (int a1, const signed char *a2) { - return (vector unsigned char) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector signed char) __builtin_altivec_lvxl (a1, (void *) a2); } -inline vector unsigned char -vec_ldl (int a1, unsigned char *a2) +inline __vector unsigned char +vec_ldl (int a1, const __vector unsigned char *a2) { - return (vector unsigned char) __builtin_altivec_lvxl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvxl (a1, (void *) a2); +} + +inline __vector unsigned char +vec_ldl (int a1, const unsigned char *a2) +{ + return (__vector unsigned char) __builtin_altivec_lvxl (a1, (void *) a2); } /* vec_loge */ -inline vector float -vec_loge (vector float a1) +inline __vector float +vec_loge (__vector float a1) { - return (vector float) __builtin_altivec_vlogefp ((vector float) a1); + return (__vector float) __builtin_altivec_vlogefp ((__vector float) a1); } /* vec_lvsl */ -inline vector unsigned char -vec_lvsl (int a1, unsigned char *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile unsigned char *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } -inline vector unsigned char -vec_lvsl (int a1, signed char *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile signed char *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } -inline vector unsigned char -vec_lvsl (int a1, unsigned short *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile unsigned short *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } -inline vector unsigned char -vec_lvsl (int a1, signed short *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile short *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } -inline vector unsigned char -vec_lvsl (int a1, unsigned int *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile unsigned int *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } -inline vector unsigned char -vec_lvsl (int a1, signed int *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile int *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } -inline vector unsigned char -vec_lvsl (int a1, unsigned long *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile unsigned long *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } -inline vector unsigned char -vec_lvsl (int a1, signed long *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile long *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } -inline vector unsigned char -vec_lvsl (int a1, float *a2) +inline __vector unsigned char +vec_lvsl (int a1, const volatile float *a2) { - return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2); } /* vec_lvsr */ -inline vector unsigned char -vec_lvsr (int a1, unsigned char *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile unsigned char *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } -inline vector unsigned char -vec_lvsr (int a1, signed char *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile signed char *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } -inline vector unsigned char -vec_lvsr (int a1, unsigned short *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile unsigned short *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } -inline vector unsigned char -vec_lvsr (int a1, signed short *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile short *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } -inline vector unsigned char -vec_lvsr (int a1, unsigned int *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile unsigned int *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } -inline vector unsigned char -vec_lvsr (int a1, signed int *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile int *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } -inline vector unsigned char -vec_lvsr (int a1, unsigned long *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile unsigned long *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } -inline vector unsigned char -vec_lvsr (int a1, signed long *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile long *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } -inline vector unsigned char -vec_lvsr (int a1, float *a2) +inline __vector unsigned char +vec_lvsr (int a1, const volatile float *a2) { - return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); + return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2); } /* vec_madd */ -inline vector float -vec_madd (vector float a1, vector float a2, vector float a3) +inline __vector float +vec_madd (__vector float a1, __vector float a2, __vector float a3) { - return (vector float) __builtin_altivec_vmaddfp ((vector float) a1, (vector float) a2, (vector float) a3); + return (__vector float) __builtin_altivec_vmaddfp ((__vector float) a1, (__vector float) a2, (__vector float) a3); } - /* vec_madds */ -inline vector signed short -vec_madds (vector signed short a1, vector signed short a2, vector signed short a3) +inline __vector signed short +vec_madds (__vector signed short a1, __vector signed short a2, __vector signed short a3) { - return (vector signed short) __builtin_altivec_vmhaddshs ((vector signed short) a1, (vector signed short) a2, (vector signed short) a3); + return (__vector signed short) __builtin_altivec_vmhaddshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3); } /* vec_max */ -inline vector unsigned char -vec_max (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_max (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_max (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_max (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_max (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_max (vector unsigned char a1, vector unsigned char a2) +inline __vector signed char +vec_max (__vector __bool char a1, __vector signed char a2) { - return (vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed char -vec_max (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_max (__vector signed char a1, __vector __bool char a2) { - return (vector signed char) __builtin_altivec_vmaxsb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_max (vector signed short a1, vector unsigned short a2) +inline __vector signed char +vec_max (__vector signed char a1, __vector signed char a2) { - return (vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_max (vector unsigned short a1, vector signed short a2) +inline __vector unsigned short +vec_max (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_max (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_max (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_max (vector signed short a1, vector signed short a2) +inline __vector unsigned short +vec_max (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vmaxsh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_max (vector signed int a1, vector unsigned int a2) +inline __vector signed short +vec_max (__vector __bool short a1, __vector signed short a2) { - return (vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_max (vector unsigned int a1, vector signed int a2) +inline __vector signed short +vec_max (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_max (vector unsigned int a1, vector unsigned int a2) +inline __vector signed short +vec_max (__vector signed short a1, __vector signed short a2) { - return (vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_max (vector signed int a1, vector signed int a2) +inline __vector unsigned int +vec_max (__vector __bool int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vmaxsw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_max (vector float a1, vector float a2) +inline __vector unsigned int +vec_max (__vector unsigned int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vmaxfp ((vector float) a1, (vector float) a2); + return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_max (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_max (__vector __bool int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_max (__vector signed int a1, __vector __bool int a2) +{ + return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_max (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_max (__vector float a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vmaxfp ((__vector float) a1, (__vector float) a2); } /* vec_vmaxfp */ -inline vector float -vec_vmaxfp (vector float a1, vector float a2) +inline __vector float +vec_vmaxfp (__vector float a1, __vector float a2) { - return (vector float) __builtin_altivec_vmaxfp ((vector float) a1, (vector float) a2); + return (__vector float) __builtin_altivec_vmaxfp ((__vector float) a1, (__vector float) a2); } /* vec_vmaxsw */ -inline vector signed int -vec_vmaxsw (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_vmaxsw (__vector __bool int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vmaxsw (__vector signed int a1, __vector __bool int a2) { - return (vector signed int) __builtin_altivec_vmaxsw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vmaxsw (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vmaxuw */ -inline vector unsigned int -vec_vmaxuw (vector signed int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vmaxuw (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vmaxuw (vector unsigned int a1, vector signed int a2) +inline __vector unsigned int +vec_vmaxuw (__vector unsigned int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vmaxuw (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vmaxuw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vmaxuw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vmaxsh */ -inline vector signed short -vec_vmaxsh (vector signed short a1, vector signed short a2) +inline __vector signed short +vec_vmaxsh (__vector __bool short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vmaxsh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vmaxsh (__vector signed short a1, __vector __bool short a2) +{ + return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vmaxsh (__vector signed short a1, __vector signed short a2) +{ + return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmaxuh */ -inline vector unsigned short -vec_vmaxuh (vector signed short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vmaxuh (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vmaxuh (vector unsigned short a1, vector signed short a2) +inline __vector unsigned short +vec_vmaxuh (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vmaxuh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vmaxuh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vmaxuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmaxsb */ -inline vector signed char -vec_vmaxsb (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_vmaxsb (__vector __bool char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vmaxsb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vmaxsb (__vector signed char a1, __vector __bool char a2) +{ + return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vmaxsb (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_vmaxub */ -inline vector unsigned char -vec_vmaxub (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vmaxub (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vmaxub (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_vmaxub (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vmaxub (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vmaxub (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vmaxub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2); } /* vec_mergeh */ -inline vector signed char -vec_mergeh (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_mergeh (__vector __bool char a1, __vector __bool char a2) +{ + return (__vector __bool char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_mergeh (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_mergeh (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector __bool short +vec_mergeh (__vector __bool short a1, __vector __bool short a2) +{ + return (__vector __bool short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector __pixel +vec_mergeh (__vector __pixel a1, __vector __pixel a2) { - return (vector signed char) __builtin_altivec_vmrghb ((vector signed char) a1, (vector signed char) a2); + return (__vector __pixel) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_mergeh (vector unsigned char a1, vector unsigned char a2) +inline __vector signed short +vec_mergeh (__vector signed short a1, __vector signed short a2) { - return (vector unsigned char) __builtin_altivec_vmrghb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_mergeh (vector signed short a1, vector signed short a2) +inline __vector unsigned short +vec_mergeh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vmrghh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_mergeh (vector unsigned short a1, vector unsigned short a2) +inline __vector float +vec_mergeh (__vector float a1, __vector float a2) { - return (vector unsigned short) __builtin_altivec_vmrghh ((vector signed short) a1, (vector signed short) a2); + return (__vector float) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_mergeh (vector float a1, vector float a2) +inline __vector __bool int +vec_mergeh (__vector __bool int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vmrghw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_mergeh (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_mergeh (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vmrghw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_mergeh (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_mergeh (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vmrghw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vmrghw */ -inline vector float -vec_vmrghw (vector float a1, vector float a2) +inline __vector float +vec_vmrghw (__vector float a1, __vector float a2) { - return (vector float) __builtin_altivec_vmrghw ((vector signed int) a1, (vector signed int) a2); + return (__vector float) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_vmrghw (vector signed int a1, vector signed int a2) +inline __vector __bool int +vec_vmrghw (__vector __bool int a1, __vector __bool int a2) { - return (vector signed int) __builtin_altivec_vmrghw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vmrghw (vector unsigned int a1, vector unsigned int a2) +inline __vector signed int +vec_vmrghw (__vector signed int a1, __vector signed int a2) { - return (vector unsigned int) __builtin_altivec_vmrghw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_vmrghw (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vmrghh */ -inline vector signed short -vec_vmrghh (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_vmrghh (__vector __bool short a1, __vector __bool short a2) +{ + return (__vector __bool short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vmrghh (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vmrghh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vmrghh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vmrghh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vmrghh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector __pixel +vec_vmrghh (__vector __pixel a1, __vector __pixel a2) +{ + return (__vector __pixel) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmrghb */ -inline vector signed char -vec_vmrghb (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_vmrghb (__vector __bool char a1, __vector __bool char a2) +{ + return (__vector __bool char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vmrghb (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vmrghb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vmrghb (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vmrghb (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vmrghb ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_mergel */ -inline vector signed char -vec_mergel (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_mergel (__vector __bool char a1, __vector __bool char a2) +{ + return (__vector __bool char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_mergel (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_mergel (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector __bool short +vec_mergel (__vector __bool short a1, __vector __bool short a2) +{ + return (__vector __bool short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector __pixel +vec_mergel (__vector __pixel a1, __vector __pixel a2) { - return (vector signed char) __builtin_altivec_vmrglb ((vector signed char) a1, (vector signed char) a2); + return (__vector __pixel) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_mergel (vector unsigned char a1, vector unsigned char a2) +inline __vector signed short +vec_mergel (__vector signed short a1, __vector signed short a2) { - return (vector unsigned char) __builtin_altivec_vmrglb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_mergel (vector signed short a1, vector signed short a2) +inline __vector unsigned short +vec_mergel (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vmrglh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_mergel (vector unsigned short a1, vector unsigned short a2) +inline __vector float +vec_mergel (__vector float a1, __vector float a2) { - return (vector unsigned short) __builtin_altivec_vmrglh ((vector signed short) a1, (vector signed short) a2); + return (__vector float) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_mergel (vector float a1, vector float a2) +inline __vector __bool int +vec_mergel (__vector __bool int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vmrglw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_mergel (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_mergel (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vmrglw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_mergel (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_mergel (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vmrglw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vmrglw */ -inline vector float -vec_vmrglw (vector float a1, vector float a2) +inline __vector float +vec_vmrglw (__vector float a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vmrglw (__vector signed int a1, __vector signed int a2) { - return (vector float) __builtin_altivec_vmrglw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_vmrglw (vector signed int a1, vector signed int a2) +inline __vector unsigned int +vec_vmrglw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vmrglw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vmrglw (vector unsigned int a1, vector unsigned int a2) +inline __vector __bool int +vec_vmrglw (__vector __bool int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vmrglw ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vmrglh */ -inline vector signed short -vec_vmrglh (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_vmrglh (__vector __bool short a1, __vector __bool short a2) +{ + return (__vector __bool short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vmrglh (__vector signed short a1, __vector signed short a2) +{ + return (__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector unsigned short +vec_vmrglh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vmrglh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vmrglh (vector unsigned short a1, vector unsigned short a2) +inline __vector __pixel +vec_vmrglh (__vector __pixel a1, __vector __pixel a2) { - return (vector unsigned short) __builtin_altivec_vmrglh ((vector signed short) a1, (vector signed short) a2); + return (__vector __pixel) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmrglb */ -inline vector signed char -vec_vmrglb (vector signed char a1, vector signed char a2) +inline __vector __bool char +vec_vmrglb (__vector __bool char a1, __vector __bool char a2) { - return (vector signed char) __builtin_altivec_vmrglb ((vector signed char) a1, (vector signed char) a2); + return (__vector __bool char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vmrglb (vector unsigned char a1, vector unsigned char a2) +inline __vector signed char +vec_vmrglb (__vector signed char a1, __vector signed char a2) { - return (vector unsigned char) __builtin_altivec_vmrglb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_vmrglb (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_mfvscr */ -inline vector unsigned short +inline __vector unsigned short vec_mfvscr (void) { - return (vector unsigned short) __builtin_altivec_mfvscr (); + return (__vector unsigned short) __builtin_altivec_mfvscr (); } /* vec_min */ -inline vector unsigned char -vec_min (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_min (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector unsigned char +vec_min (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vminub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_min (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_min (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vminub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_min (vector unsigned char a1, vector unsigned char a2) +inline __vector signed char +vec_min (__vector __bool char a1, __vector signed char a2) { - return (vector unsigned char) __builtin_altivec_vminub ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed char -vec_min (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_min (__vector signed char a1, __vector __bool char a2) { - return (vector signed char) __builtin_altivec_vminsb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_min (vector signed short a1, vector unsigned short a2) +inline __vector signed char +vec_min (__vector signed char a1, __vector signed char a2) { - return (vector unsigned short) __builtin_altivec_vminuh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_min (vector unsigned short a1, vector signed short a2) +inline __vector unsigned short +vec_min (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vminuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_min (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_min (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vminuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_min (vector signed short a1, vector signed short a2) +inline __vector unsigned short +vec_min (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vminsh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_min (vector signed int a1, vector unsigned int a2) +inline __vector signed short +vec_min (__vector __bool short a1, __vector signed short a2) { - return (vector unsigned int) __builtin_altivec_vminuw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_min (vector unsigned int a1, vector signed int a2) +inline __vector signed short +vec_min (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned int) __builtin_altivec_vminuw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_min (vector unsigned int a1, vector unsigned int a2) +inline __vector signed short +vec_min (__vector signed short a1, __vector signed short a2) { - return (vector unsigned int) __builtin_altivec_vminuw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_min (vector signed int a1, vector signed int a2) +inline __vector unsigned int +vec_min (__vector __bool int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vminsw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_min (vector float a1, vector float a2) +inline __vector unsigned int +vec_min (__vector unsigned int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vminfp ((vector float) a1, (vector float) a2); + return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_min (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_min (__vector __bool int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_min (__vector signed int a1, __vector __bool int a2) +{ + return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_min (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_min (__vector float a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vminfp ((__vector float) a1, (__vector float) a2); } /* vec_vminfp */ -inline vector float -vec_vminfp (vector float a1, vector float a2) +inline __vector float +vec_vminfp (__vector float a1, __vector float a2) { - return (vector float) __builtin_altivec_vminfp ((vector float) a1, (vector float) a2); + return (__vector float) __builtin_altivec_vminfp ((__vector float) a1, (__vector float) a2); } /* vec_vminsw */ -inline vector signed int -vec_vminsw (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_vminsw (__vector __bool int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vminsw (__vector signed int a1, __vector __bool int a2) { - return (vector signed int) __builtin_altivec_vminsw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vminsw (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vminuw */ -inline vector unsigned int -vec_vminuw (vector signed int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vminuw (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vminuw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vminuw (vector unsigned int a1, vector signed int a2) +inline __vector unsigned int +vec_vminuw (__vector unsigned int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vminuw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vminuw (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vminuw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vminuw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vminsh */ -inline vector signed short -vec_vminsh (vector signed short a1, vector signed short a2) +inline __vector signed short +vec_vminsh (__vector __bool short a1, __vector signed short a2) +{ + return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vminsh (__vector signed short a1, __vector __bool short a2) { - return (vector signed short) __builtin_altivec_vminsh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vminsh (__vector signed short a1, __vector signed short a2) +{ + return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vminuh */ -inline vector unsigned short -vec_vminuh (vector signed short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vminuh (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vminuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vminuh (vector unsigned short a1, vector signed short a2) +inline __vector unsigned short +vec_vminuh (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vminuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vminuh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vminuh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vminuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vminsb */ -inline vector signed char -vec_vminsb (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_vminsb (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vminsb (__vector signed char a1, __vector __bool char a2) { - return (vector signed char) __builtin_altivec_vminsb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vminsb (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_vminub */ -inline vector unsigned char -vec_vminub (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vminub (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vminub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vminub (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_vminub (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vminub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vminub (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vminub (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vminub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2); } /* vec_mladd */ -inline vector signed short -vec_mladd (vector signed short a1, vector signed short a2, vector signed short a3) +inline __vector signed short +vec_mladd (__vector signed short a1, __vector signed short a2, __vector signed short a3) { - return (vector signed short) __builtin_altivec_vmladduhm ((vector signed short) a1, (vector signed short) a2, (vector signed short) a3); + return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3); } -inline vector signed short -vec_mladd (vector signed short a1, vector unsigned short a2, vector unsigned short a3) +inline __vector signed short +vec_mladd (__vector signed short a1, __vector unsigned short a2, __vector unsigned short a3) { - return (vector signed short) __builtin_altivec_vmladduhm ((vector signed short) a1, (vector signed short) a2, (vector signed short) a3); + return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3); } -inline vector signed short -vec_mladd (vector unsigned short a1, vector signed short a2, vector signed short a3) +inline __vector signed short +vec_mladd (__vector unsigned short a1, __vector signed short a2, __vector signed short a3) { - return (vector signed short) __builtin_altivec_vmladduhm ((vector signed short) a1, (vector signed short) a2, (vector signed short) a3); + return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3); } -inline vector unsigned short -vec_mladd (vector unsigned short a1, vector unsigned short a2, vector unsigned short a3) +inline __vector unsigned short +vec_mladd (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned short a3) { - return (vector unsigned short) __builtin_altivec_vmladduhm ((vector signed short) a1, (vector signed short) a2, (vector signed short) a3); + return (__vector unsigned short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3); } /* vec_mradds */ -inline vector signed short -vec_mradds (vector signed short a1, vector signed short a2, vector signed short a3) +inline __vector signed short +vec_mradds (__vector signed short a1, __vector signed short a2, __vector signed short a3) { - return (vector signed short) __builtin_altivec_vmhraddshs ((vector signed short) a1, (vector signed short) a2, (vector signed short) a3); + return (__vector signed short) __builtin_altivec_vmhraddshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3); } /* vec_msum */ -inline vector unsigned int -vec_msum (vector unsigned char a1, vector unsigned char a2, vector unsigned int a3) +inline __vector unsigned int +vec_msum (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned int a3) { - return (vector unsigned int) __builtin_altivec_vmsumubm ((vector signed char) a1, (vector signed char) a2, (vector signed int) a3); + return (__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3); } -inline vector signed int -vec_msum (vector signed char a1, vector unsigned char a2, vector signed int a3) +inline __vector signed int +vec_msum (__vector signed char a1, __vector unsigned char a2, __vector signed int a3) { - return (vector signed int) __builtin_altivec_vmsummbm ((vector signed char) a1, (vector signed char) a2, (vector signed int) a3); + return (__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3); } -inline vector unsigned int -vec_msum (vector unsigned short a1, vector unsigned short a2, vector unsigned int a3) +inline __vector unsigned int +vec_msum (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3) { - return (vector unsigned int) __builtin_altivec_vmsumuhm ((vector signed short) a1, (vector signed short) a2, (vector signed int) a3); + return (__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3); } -inline vector signed int -vec_msum (vector signed short a1, vector signed short a2, vector signed int a3) +inline __vector signed int +vec_msum (__vector signed short a1, __vector signed short a2, __vector signed int a3) { - return (vector signed int) __builtin_altivec_vmsumshm ((vector signed short) a1, (vector signed short) a2, (vector signed int) a3); + return (__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3); } /* vec_vmsumshm */ -inline vector signed int -vec_vmsumshm (vector signed short a1, vector signed short a2, vector signed int a3) +inline __vector signed int +vec_vmsumshm (__vector signed short a1, __vector signed short a2, __vector signed int a3) { - return (vector signed int) __builtin_altivec_vmsumshm ((vector signed short) a1, (vector signed short) a2, (vector signed int) a3); + return (__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3); } /* vec_vmsumuhm */ -inline vector unsigned int -vec_vmsumuhm (vector unsigned short a1, vector unsigned short a2, vector unsigned int a3) +inline __vector unsigned int +vec_vmsumuhm (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3) { - return (vector unsigned int) __builtin_altivec_vmsumuhm ((vector signed short) a1, (vector signed short) a2, (vector signed int) a3); + return (__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3); } /* vec_vmsummbm */ -inline vector signed int -vec_vmsummbm (vector signed char a1, vector unsigned char a2, vector signed int a3) +inline __vector signed int +vec_vmsummbm (__vector signed char a1, __vector unsigned char a2, __vector signed int a3) { - return (vector signed int) __builtin_altivec_vmsummbm ((vector signed char) a1, (vector signed char) a2, (vector signed int) a3); + return (__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3); } /* vec_vmsumubm */ -inline vector unsigned int -vec_vmsumubm (vector unsigned char a1, vector unsigned char a2, vector unsigned int a3) +inline __vector unsigned int +vec_vmsumubm (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned int a3) { - return (vector unsigned int) __builtin_altivec_vmsumubm ((vector signed char) a1, (vector signed char) a2, (vector signed int) a3); + return (__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3); } /* vec_msums */ -inline vector unsigned int -vec_msums (vector unsigned short a1, vector unsigned short a2, vector unsigned int a3) +inline __vector unsigned int +vec_msums (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3) { - return (vector unsigned int) __builtin_altivec_vmsumuhs ((vector signed short) a1, (vector signed short) a2, (vector signed int) a3); + return (__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3); } -inline vector signed int -vec_msums (vector signed short a1, vector signed short a2, vector signed int a3) +inline __vector signed int +vec_msums (__vector signed short a1, __vector signed short a2, __vector signed int a3) { - return (vector signed int) __builtin_altivec_vmsumshs ((vector signed short) a1, (vector signed short) a2, (vector signed int) a3); + return (__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3); } /* vec_vmsumshs */ -inline vector signed int -vec_vmsumshs (vector signed short a1, vector signed short a2, vector signed int a3) +inline __vector signed int +vec_vmsumshs (__vector signed short a1, __vector signed short a2, __vector signed int a3) { - return (vector signed int) __builtin_altivec_vmsumshs ((vector signed short) a1, (vector signed short) a2, (vector signed int) a3); + return (__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3); } /* vec_vmsumuhs */ -inline vector unsigned int -vec_vmsumuhs (vector unsigned short a1, vector unsigned short a2, vector unsigned int a3) +inline __vector unsigned int +vec_vmsumuhs (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3) { - return (vector unsigned int) __builtin_altivec_vmsumuhs ((vector signed short) a1, (vector signed short) a2, (vector signed int) a3); + return (__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3); } /* vec_mtvscr */ inline void -vec_mtvscr (vector signed int a1) +vec_mtvscr (__vector signed int a1) +{ + __builtin_altivec_mtvscr ((__vector signed int) a1); +} + +inline void +vec_mtvscr (__vector unsigned int a1) +{ + __builtin_altivec_mtvscr ((__vector signed int) a1); +} + +inline void +vec_mtvscr (__vector __bool int a1) { - __builtin_altivec_mtvscr ((vector signed int) a1); + __builtin_altivec_mtvscr ((__vector signed int) a1); } inline void -vec_mtvscr (vector unsigned int a1) +vec_mtvscr (__vector signed short a1) { - __builtin_altivec_mtvscr ((vector signed int) a1); + __builtin_altivec_mtvscr ((__vector signed int) a1); } inline void -vec_mtvscr (vector signed short a1) +vec_mtvscr (__vector unsigned short a1) { - __builtin_altivec_mtvscr ((vector signed int) a1); + __builtin_altivec_mtvscr ((__vector signed int) a1); } inline void -vec_mtvscr (vector unsigned short a1) +vec_mtvscr (__vector __bool short a1) { - __builtin_altivec_mtvscr ((vector signed int) a1); + __builtin_altivec_mtvscr ((__vector signed int) a1); } inline void -vec_mtvscr (vector signed char a1) +vec_mtvscr (__vector __pixel a1) { - __builtin_altivec_mtvscr ((vector signed int) a1); + __builtin_altivec_mtvscr ((__vector signed int) a1); } inline void -vec_mtvscr (vector unsigned char a1) +vec_mtvscr (__vector signed char a1) { - __builtin_altivec_mtvscr ((vector signed int) a1); + __builtin_altivec_mtvscr ((__vector signed int) a1); +} + +inline void +vec_mtvscr (__vector unsigned char a1) +{ + __builtin_altivec_mtvscr ((__vector signed int) a1); +} + +inline void +vec_mtvscr (__vector __bool char a1) +{ + __builtin_altivec_mtvscr ((__vector signed int) a1); } /* vec_mule */ -inline vector unsigned short -vec_mule (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned short +vec_mule (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned short) __builtin_altivec_vmuleub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_mule (vector signed char a1, vector signed char a2) +inline __vector signed short +vec_mule (__vector signed char a1, __vector signed char a2) { - return (vector signed short) __builtin_altivec_vmulesb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned int -vec_mule (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned int +vec_mule (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vmuleuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_mule (vector signed short a1, vector signed short a2) +inline __vector signed int +vec_mule (__vector signed short a1, __vector signed short a2) { - return (vector signed int) __builtin_altivec_vmulesh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmulesh */ -inline vector signed int -vec_vmulesh (vector signed short a1, vector signed short a2) +inline __vector signed int +vec_vmulesh (__vector signed short a1, __vector signed short a2) { - return (vector signed int) __builtin_altivec_vmulesh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmuleuh */ -inline vector unsigned int -vec_vmuleuh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned int +vec_vmuleuh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vmuleuh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) a1, (__vector signed short) a2); +} + +/* vec_vmulesb */ + +inline __vector signed short +vec_vmulesb (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2); } /* vec_vmuleub */ -inline vector unsigned short -vec_vmuleub (vector unsigned char a1, vector unsigned char a2) + +inline __vector unsigned short +vec_vmuleub (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned short) __builtin_altivec_vmuleub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2); } /* vec_mulo */ -inline vector unsigned short -vec_mulo (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned short +vec_mulo (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned short) __builtin_altivec_vmuloub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_mulo (vector signed char a1, vector signed char a2) +inline __vector signed short +vec_mulo (__vector signed char a1, __vector signed char a2) { - return (vector signed short) __builtin_altivec_vmulosb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned int -vec_mulo (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned int +vec_mulo (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vmulouh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_mulo (vector signed short a1, vector signed short a2) +inline __vector signed int +vec_mulo (__vector signed short a1, __vector signed short a2) { - return (vector signed int) __builtin_altivec_vmulosh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmulosh */ -inline vector signed int -vec_vmulosh (vector signed short a1, vector signed short a2) +inline __vector signed int +vec_vmulosh (__vector signed short a1, __vector signed short a2) { - return (vector signed int) __builtin_altivec_vmulosh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmulouh */ -inline vector unsigned int -vec_vmulouh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned int +vec_vmulouh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vmulouh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vmulosb */ -inline vector signed short -vec_vmulosb (vector signed char a1, vector signed char a2) +inline __vector signed short +vec_vmulosb (__vector signed char a1, __vector signed char a2) { - return (vector signed short) __builtin_altivec_vmulosb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_vmuloub */ -inline vector unsigned short -vec_vmuloub (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned short +vec_vmuloub (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned short) __builtin_altivec_vmuloub ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) a1, (__vector signed char) a2); } /* vec_nmsub */ -inline vector float -vec_nmsub (vector float a1, vector float a2, vector float a3) +inline __vector float +vec_nmsub (__vector float a1, __vector float a2, __vector float a3) { - return (vector float) __builtin_altivec_vnmsubfp ((vector float) a1, (vector float) a2, (vector float) a3); + return (__vector float) __builtin_altivec_vnmsubfp ((__vector float) a1, (__vector float) a2, (__vector float) a3); } /* vec_nor */ -inline vector float -vec_nor (vector float a1, vector float a2) +inline __vector float +vec_nor (__vector float a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_nor (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_nor (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool int +vec_nor (__vector __bool int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vnor ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_nor (vector signed int a1, vector signed int a2) +inline __vector signed short +vec_nor (__vector signed short a1, __vector signed short a2) { - return (vector signed int) __builtin_altivec_vnor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_nor (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned short +vec_nor (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vnor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_nor (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_nor (__vector __bool short a1, __vector __bool short a2) { - return (vector signed short) __builtin_altivec_vnor ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_nor (vector unsigned short a1, vector unsigned short a2) +inline __vector signed char +vec_nor (__vector signed char a1, __vector signed char a2) { - return (vector unsigned short) __builtin_altivec_vnor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_nor (vector signed char a1, vector signed char a2) +inline __vector unsigned char +vec_nor (__vector unsigned char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vnor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_nor (vector unsigned char a1, vector unsigned char a2) +inline __vector __bool char +vec_nor (__vector __bool char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vnor ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2); } /* vec_or */ -inline vector float -vec_or (vector float a1, vector float a2) +inline __vector float +vec_or (__vector float a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_or (__vector float a1, __vector __bool int a2) +{ + return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_or (__vector __bool int a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool int +vec_or (__vector __bool int a1, __vector __bool int a2) +{ + return (__vector __bool int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_or (__vector __bool int a1, __vector signed int a2) { - return (vector float) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_or (vector float a1, vector signed int a2) +inline __vector signed int +vec_or (__vector signed int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_or (vector signed int a1, vector float a2) +inline __vector signed int +vec_or (__vector signed int a1, __vector signed int a2) { - return (vector float) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_or (vector signed int a1, vector signed int a2) +inline __vector unsigned int +vec_or (__vector __bool int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_or (vector signed int a1, vector unsigned int a2) +inline __vector unsigned int +vec_or (__vector unsigned int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_or (vector unsigned int a1, vector signed int a2) +inline __vector unsigned int +vec_or (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_or (vector unsigned int a1, vector unsigned int a2) +inline __vector __bool short +vec_or (__vector __bool short a1, __vector __bool short a2) { - return (vector unsigned int) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_or (vector signed short a1, vector signed short a2) +inline __vector signed short +vec_or (__vector __bool short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_or (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_or (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_or (vector unsigned short a1, vector signed short a2) +inline __vector signed short +vec_or (__vector signed short a1, __vector signed short a2) { - return (vector unsigned short) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_or (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_or (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_or (vector signed char a1, vector signed char a2) +inline __vector unsigned short +vec_or (__vector unsigned short a1, __vector __bool short a2) { - return (vector signed char) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_or (vector signed char a1, vector unsigned char a2) +inline __vector unsigned short +vec_or (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_or (vector unsigned char a1, vector signed char a2) +inline __vector signed char +vec_or (__vector __bool char a1, __vector signed char a2) { - return (vector unsigned char) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_or (vector unsigned char a1, vector unsigned char a2) +inline __vector __bool char +vec_or (__vector __bool char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vor ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_or (__vector signed char a1, __vector __bool char a2) +{ + return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_or (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_or (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_or (__vector unsigned char a1, __vector __bool char a2) +{ + return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_or (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2); } /* vec_pack */ -inline vector signed char -vec_pack (vector signed short a1, vector signed short a2) +inline __vector signed char +vec_pack (__vector signed short a1, __vector signed short a2) { - return (vector signed char) __builtin_altivec_vpkuhum ((vector signed short) a1, (vector signed short) a2); + return (__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_pack (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned char +vec_pack (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vpkuhum ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_pack (vector signed int a1, vector signed int a2) +inline __vector __bool char +vec_pack (__vector __bool short a1, __vector __bool short a2) { - return (vector signed short) __builtin_altivec_vpkuwum ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_pack (vector unsigned int a1, vector unsigned int a2) +inline __vector signed short +vec_pack (__vector signed int a1, __vector signed int a2) { - return (vector unsigned short) __builtin_altivec_vpkuwum ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned short +vec_pack (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool short +vec_pack (__vector __bool int a1, __vector __bool int a2) +{ + return (__vector __bool short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vpkuwum */ -inline vector signed short -vec_vpkuwum (vector signed int a1, vector signed int a2) +inline __vector __bool short +vec_vpkuwum (__vector __bool int a1, __vector __bool int a2) +{ + return (__vector __bool short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed short +vec_vpkuwum (__vector signed int a1, __vector signed int a2) { - return (vector signed short) __builtin_altivec_vpkuwum ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_vpkuwum (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned short +vec_vpkuwum (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vpkuwum ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vpkuhum */ -inline vector signed char -vec_vpkuhum (vector signed short a1, vector signed short a2) +inline __vector __bool char +vec_vpkuhum (__vector __bool short a1, __vector __bool short a2) +{ + return (__vector __bool char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed char +vec_vpkuhum (__vector signed short a1, __vector signed short a2) { - return (vector signed char) __builtin_altivec_vpkuhum ((vector signed short) a1, (vector signed short) a2); + return (__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_vpkuhum (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned char +vec_vpkuhum (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vpkuhum ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2); } /* vec_packpx */ -inline vector unsigned short -vec_packpx (vector unsigned int a1, vector unsigned int a2) +inline __vector __pixel +vec_packpx (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vpkpx ((vector signed int) a1, (vector signed int) a2); + return (__vector __pixel) __builtin_altivec_vpkpx ((__vector signed int) a1, (__vector signed int) a2); } /* vec_packs */ -inline vector unsigned char -vec_packs (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned char +vec_packs (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vpkuhus ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed char -vec_packs (vector signed short a1, vector signed short a2) +inline __vector signed char +vec_packs (__vector signed short a1, __vector signed short a2) { - return (vector signed char) __builtin_altivec_vpkshss ((vector signed short) a1, (vector signed short) a2); + return (__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_packs (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned short +vec_packs (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vpkuwus ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_packs (vector signed int a1, vector signed int a2) +inline __vector signed short +vec_packs (__vector signed int a1, __vector signed int a2) { - return (vector signed short) __builtin_altivec_vpkswss ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vpkswss */ -inline vector signed short -vec_vpkswss (vector signed int a1, vector signed int a2) +inline __vector signed short +vec_vpkswss (__vector signed int a1, __vector signed int a2) { - return (vector signed short) __builtin_altivec_vpkswss ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vpkuwus */ -inline vector unsigned short -vec_vpkuwus (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned short +vec_vpkuwus (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vpkuwus ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vpkshss */ -inline vector signed char -vec_vpkshss (vector signed short a1, vector signed short a2) +inline __vector signed char +vec_vpkshss (__vector signed short a1, __vector signed short a2) { - return (vector signed char) __builtin_altivec_vpkshss ((vector signed short) a1, (vector signed short) a2); + return (__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vpkuhus */ -inline vector unsigned char -vec_vpkuhus (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned char +vec_vpkuhus (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vpkuhus ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2); } /* vec_packsu */ -inline vector unsigned char -vec_packsu (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned char +vec_packsu (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vpkuhus ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned char -vec_packsu (vector signed short a1, vector signed short a2) +inline __vector unsigned char +vec_packsu (__vector signed short a1, __vector signed short a2) { - return (vector unsigned char) __builtin_altivec_vpkshus ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_packsu (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned short +vec_packsu (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vpkuwus ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_packsu (vector signed int a1, vector signed int a2) +inline __vector unsigned short +vec_packsu (__vector signed int a1, __vector signed int a2) { - return (vector unsigned short) __builtin_altivec_vpkswus ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vpkswus */ -inline vector unsigned short -vec_vpkswus (vector signed int a1, vector signed int a2) +inline __vector unsigned short +vec_vpkswus (__vector signed int a1, __vector signed int a2) { - return (vector unsigned short) __builtin_altivec_vpkswus ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vpkshus */ -inline vector unsigned char -vec_vpkshus (vector signed short a1, vector signed short a2) +inline __vector unsigned char +vec_vpkshus (__vector signed short a1, __vector signed short a2) { - return (vector unsigned char) __builtin_altivec_vpkshus ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) a1, (__vector signed short) a2); } /* vec_perm */ -inline vector float -vec_perm (vector float a1, vector float a2, vector unsigned char a3) +inline __vector float +vec_perm (__vector float a1, __vector float a2, __vector unsigned char a3) +{ + return (__vector float) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); +} + +inline __vector signed int +vec_perm (__vector signed int a1, __vector signed int a2, __vector unsigned char a3) +{ + return (__vector signed int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); +} + +inline __vector unsigned int +vec_perm (__vector unsigned int a1, __vector unsigned int a2, __vector unsigned char a3) { - return (vector float) __builtin_altivec_vperm_4si ((vector signed int) a1, (vector signed int) a2, (vector signed char) a3); + return (__vector unsigned int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); } -inline vector signed int -vec_perm (vector signed int a1, vector signed int a2, vector unsigned char a3) +inline __vector __bool int +vec_perm (__vector __bool int a1, __vector __bool int a2, __vector unsigned char a3) { - return (vector signed int) __builtin_altivec_vperm_4si ((vector signed int) a1, (vector signed int) a2, (vector signed char) a3); + return (__vector __bool int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); } -inline vector unsigned int -vec_perm (vector unsigned int a1, vector unsigned int a2, vector unsigned char a3) +inline __vector signed short +vec_perm (__vector signed short a1, __vector signed short a2, __vector unsigned char a3) { - return (vector unsigned int) __builtin_altivec_vperm_4si ((vector signed int) a1, (vector signed int) a2, (vector signed char) a3); + return (__vector signed short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); } -inline vector signed short -vec_perm (vector signed short a1, vector signed short a2, vector unsigned char a3) +inline __vector unsigned short +vec_perm (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned char a3) { - return (vector signed short) __builtin_altivec_vperm_4si ((vector signed int) a1, (vector signed int) a2, (vector signed char) a3); + return (__vector unsigned short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); } -inline vector unsigned short -vec_perm (vector unsigned short a1, vector unsigned short a2, vector unsigned char a3) +inline __vector __bool short +vec_perm (__vector __bool short a1, __vector __bool short a2, __vector unsigned char a3) { - return (vector unsigned short) __builtin_altivec_vperm_4si ((vector signed int) a1, (vector signed int) a2, (vector signed char) a3); + return (__vector __bool short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); } -inline vector signed char -vec_perm (vector signed char a1, vector signed char a2, vector unsigned char a3) +inline __vector __pixel +vec_perm (__vector __pixel a1, __vector __pixel a2, __vector unsigned char a3) { - return (vector signed char) __builtin_altivec_vperm_4si ((vector signed int) a1, (vector signed int) a2, (vector signed char) a3); + return (__vector __pixel) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); } -inline vector unsigned char -vec_perm (vector unsigned char a1, vector unsigned char a2, vector unsigned char a3) +inline __vector signed char +vec_perm (__vector signed char a1, __vector signed char a2, __vector unsigned char a3) { - return (vector unsigned char) __builtin_altivec_vperm_4si ((vector signed int) a1, (vector signed int) a2, (vector signed char) a3); + return (__vector signed char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); +} + +inline __vector unsigned char +vec_perm (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned char a3) +{ + return (__vector unsigned char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); +} + +inline __vector __bool char +vec_perm (__vector __bool char a1, __vector __bool char a2, __vector unsigned char a3) +{ + return (__vector __bool char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3); } /* vec_re */ -inline vector float -vec_re (vector float a1) +inline __vector float +vec_re (__vector float a1) { - return (vector float) __builtin_altivec_vrefp ((vector float) a1); + return (__vector float) __builtin_altivec_vrefp ((__vector float) a1); } /* vec_rl */ -inline vector signed char -vec_rl (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_rl (__vector signed char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vrlb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_rl (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_rl (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vrlb ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_rl (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_rl (__vector signed short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vrlh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_rl (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_rl (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vrlh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_rl (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_rl (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vrlw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_rl (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_rl (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vrlw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vrlw */ -inline vector signed int -vec_vrlw (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_vrlw (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vrlw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vrlw (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vrlw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vrlw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vrlh */ -inline vector signed short -vec_vrlh (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_vrlh (__vector signed short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vrlh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vrlh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vrlh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vrlh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vrlb */ -inline vector signed char -vec_vrlb (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_vrlb (__vector signed char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vrlb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vrlb (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vrlb (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vrlb ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_round */ -inline vector float -vec_round (vector float a1) +inline __vector float +vec_round (__vector float a1) { - return (vector float) __builtin_altivec_vrfin ((vector float) a1); + return (__vector float) __builtin_altivec_vrfin ((__vector float) a1); } /* vec_rsqrte */ -inline vector float -vec_rsqrte (vector float a1) +inline __vector float +vec_rsqrte (__vector float a1) { - return (vector float) __builtin_altivec_vrsqrtefp ((vector float) a1); + return (__vector float) __builtin_altivec_vrsqrtefp ((__vector float) a1); } /* vec_sel */ -inline vector float -vec_sel (vector float a1, vector float a2, vector signed int a3) +inline __vector float +vec_sel (__vector float a1, __vector float a2, __vector __bool int a3) +{ + return (__vector float) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); +} + +inline __vector float +vec_sel (__vector float a1, __vector float a2, __vector unsigned int a3) +{ + return (__vector float) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); +} + +inline __vector signed int +vec_sel (__vector signed int a1, __vector signed int a2, __vector __bool int a3) { - return (vector float) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector float -vec_sel (vector float a1, vector float a2, vector unsigned int a3) +inline __vector signed int +vec_sel (__vector signed int a1, __vector signed int a2, __vector unsigned int a3) { - return (vector float) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector signed int -vec_sel (vector signed int a1, vector signed int a2, vector signed int a3) +inline __vector unsigned int +vec_sel (__vector unsigned int a1, __vector unsigned int a2, __vector __bool int a3) { - return (vector signed int) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector signed int -vec_sel (vector signed int a1, vector signed int a2, vector unsigned int a3) +inline __vector unsigned int +vec_sel (__vector unsigned int a1, __vector unsigned int a2, __vector unsigned int a3) { - return (vector signed int) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector unsigned int -vec_sel (vector unsigned int a1, vector unsigned int a2, vector signed int a3) +inline __vector __bool int +vec_sel (__vector __bool int a1, __vector __bool int a2, __vector __bool int a3) { - return (vector unsigned int) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector __bool int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector unsigned int -vec_sel (vector unsigned int a1, vector unsigned int a2, vector unsigned int a3) +inline __vector __bool int +vec_sel (__vector __bool int a1, __vector __bool int a2, __vector unsigned int a3) { - return (vector unsigned int) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector __bool int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector signed short -vec_sel (vector signed short a1, vector signed short a2, vector signed short a3) +inline __vector signed short +vec_sel (__vector signed short a1, __vector signed short a2, __vector __bool short a3) { - return (vector signed short) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector signed short -vec_sel (vector signed short a1, vector signed short a2, vector unsigned short a3) +inline __vector signed short +vec_sel (__vector signed short a1, __vector signed short a2, __vector unsigned short a3) { - return (vector signed short) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector unsigned short -vec_sel (vector unsigned short a1, vector unsigned short a2, vector signed short a3) +inline __vector unsigned short +vec_sel (__vector unsigned short a1, __vector unsigned short a2, __vector __bool short a3) { - return (vector unsigned short) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector unsigned short -vec_sel (vector unsigned short a1, vector unsigned short a2, vector unsigned short a3) +inline __vector unsigned short +vec_sel (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned short a3) { - return (vector unsigned short) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector signed char -vec_sel (vector signed char a1, vector signed char a2, vector signed char a3) +inline __vector __bool short +vec_sel (__vector __bool short a1, __vector __bool short a2, __vector __bool short a3) { - return (vector signed char) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector __bool short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector signed char -vec_sel (vector signed char a1, vector signed char a2, vector unsigned char a3) +inline __vector __bool short +vec_sel (__vector __bool short a1, __vector __bool short a2, __vector unsigned short a3) { - return (vector signed char) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector __bool short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector unsigned char -vec_sel (vector unsigned char a1, vector unsigned char a2, vector signed char a3) +inline __vector signed char +vec_sel (__vector signed char a1, __vector signed char a2, __vector __bool char a3) { - return (vector unsigned char) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } -inline vector unsigned char -vec_sel (vector unsigned char a1, vector unsigned char a2, vector unsigned char a3) +inline __vector signed char +vec_sel (__vector signed char a1, __vector signed char a2, __vector unsigned char a3) { - return (vector unsigned char) __builtin_altivec_vsel_4si ((vector signed int) a1, (vector signed int) a2, (vector signed int) a3); + return (__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); +} + +inline __vector unsigned char +vec_sel (__vector unsigned char a1, __vector unsigned char a2, __vector __bool char a3) +{ + return (__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); +} + +inline __vector unsigned char +vec_sel (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned char a3) +{ + return (__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); +} + +inline __vector __bool char +vec_sel (__vector __bool char a1, __vector __bool char a2, __vector __bool char a3) +{ + return (__vector __bool char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); +} + +inline __vector __bool char +vec_sel (__vector __bool char a1, __vector __bool char a2, __vector unsigned char a3) +{ + return (__vector __bool char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3); } /* vec_sl */ -inline vector signed char -vec_sl (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_sl (__vector signed char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vslb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_sl (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_sl (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vslb ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_sl (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_sl (__vector signed short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vslh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_sl (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_sl (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vslh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_sl (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_sl (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vslw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_sl (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_sl (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vslw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vslw */ -inline vector signed int -vec_vslw (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_vslw (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vslw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vslw (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vslw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vslw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vslh */ -inline vector signed short -vec_vslh (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_vslh (__vector signed short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vslh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vslh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vslh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vslh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vslb */ -inline vector signed char -vec_vslb (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_vslb (__vector signed char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vslb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vslb (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vslb (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vslb ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_sld */ -inline vector float -vec_sld (vector float a1, vector float a2, const char a3) +inline __vector float +vec_sld (__vector float a1, __vector float a2, const int a3) +{ + return (__vector float) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); +} + +inline __vector signed int +vec_sld (__vector signed int a1, __vector signed int a2, const int a3) +{ + return (__vector signed int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); +} + +inline __vector unsigned int +vec_sld (__vector unsigned int a1, __vector unsigned int a2, const int a3) +{ + return (__vector unsigned int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); +} + +inline __vector __bool int +vec_sld (__vector __bool int a1, __vector __bool int a2, const int a3) +{ + return (__vector __bool int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); +} + +inline __vector signed short +vec_sld (__vector signed short a1, __vector signed short a2, const int a3) { - return (vector float) __builtin_altivec_vsldoi_4si ((vector signed int) a1, (vector signed int) a2, a3); + return (__vector signed short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); } -inline vector signed int -vec_sld (vector signed int a1, vector signed int a2, const char a3) +inline __vector unsigned short +vec_sld (__vector unsigned short a1, __vector unsigned short a2, const int a3) { - return (vector signed int) __builtin_altivec_vsldoi_4si ((vector signed int) a1, (vector signed int) a2, a3); + return (__vector unsigned short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); } -inline vector unsigned int -vec_sld (vector unsigned int a1, vector unsigned int a2, const char a3) +inline __vector __bool short +vec_sld (__vector __bool short a1, __vector __bool short a2, const int a3) { - return (vector unsigned int) __builtin_altivec_vsldoi_4si ((vector signed int) a1, (vector signed int) a2, a3); + return (__vector __bool short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); } -inline vector signed short -vec_sld (vector signed short a1, vector signed short a2, const char a3) +inline __vector __pixel +vec_sld (__vector __pixel a1, __vector __pixel a2, const int a3) { - return (vector signed short) __builtin_altivec_vsldoi_4si ((vector signed int) a1, (vector signed int) a2, a3); + return (__vector __pixel) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); } -inline vector unsigned short -vec_sld (vector unsigned short a1, vector unsigned short a2, const char a3) +inline __vector signed char +vec_sld (__vector signed char a1, __vector signed char a2, const int a3) { - return (vector unsigned short) __builtin_altivec_vsldoi_4si ((vector signed int) a1, (vector signed int) a2, a3); + return (__vector signed char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); } -inline vector signed char -vec_sld (vector signed char a1, vector signed char a2, const char a3) +inline __vector unsigned char +vec_sld (__vector unsigned char a1, __vector unsigned char a2, const int a3) { - return (vector signed char) __builtin_altivec_vsldoi_4si ((vector signed int) a1, (vector signed int) a2, a3); + return (__vector unsigned char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); } -inline vector unsigned char -vec_sld (vector unsigned char a1, vector unsigned char a2, const char a3) +inline __vector __bool char +vec_sld (__vector __bool char a1, __vector __bool char a2, const int a3) { - return (vector unsigned char) __builtin_altivec_vsldoi_4si ((vector signed int) a1, (vector signed int) a2, a3); + return (__vector __bool char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3); } /* vec_sll */ -inline vector signed int -vec_sll (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_sll (__vector signed int a1, __vector unsigned int a2) +{ + return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_sll (__vector signed int a1, __vector unsigned short a2) +{ + return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_sll (__vector signed int a1, __vector unsigned char a2) +{ + return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_sll (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_sll (__vector unsigned int a1, __vector unsigned short a2) +{ + return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_sll (__vector unsigned int a1, __vector unsigned char a2) +{ + return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool int +vec_sll (__vector __bool int a1, __vector unsigned int a2) +{ + return (__vector __bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool int +vec_sll (__vector __bool int a1, __vector unsigned short a2) { - return (vector signed int) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_sll (vector signed int a1, vector unsigned short a2) +inline __vector __bool int +vec_sll (__vector __bool int a1, __vector unsigned char a2) { - return (vector signed int) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_sll (vector signed int a1, vector unsigned char a2) +inline __vector signed short +vec_sll (__vector signed short a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_sll (vector unsigned int a1, vector unsigned int a2) +inline __vector signed short +vec_sll (__vector signed short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_sll (vector unsigned int a1, vector unsigned short a2) +inline __vector signed short +vec_sll (__vector signed short a1, __vector unsigned char a2) { - return (vector unsigned int) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_sll (vector unsigned int a1, vector unsigned char a2) +inline __vector unsigned short +vec_sll (__vector unsigned short a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_sll (vector signed short a1, vector unsigned int a2) +inline __vector unsigned short +vec_sll (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_sll (vector signed short a1, vector unsigned short a2) +inline __vector unsigned short +vec_sll (__vector unsigned short a1, __vector unsigned char a2) { - return (vector signed short) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_sll (vector signed short a1, vector unsigned char a2) +inline __vector __bool short +vec_sll (__vector __bool short a1, __vector unsigned int a2) { - return (vector signed short) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_sll (vector unsigned short a1, vector unsigned int a2) +inline __vector __bool short +vec_sll (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_sll (vector unsigned short a1, vector unsigned short a2) +inline __vector __bool short +vec_sll (__vector __bool short a1, __vector unsigned char a2) { - return (vector unsigned short) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_sll (vector unsigned short a1, vector unsigned char a2) +inline __vector __pixel +vec_sll (__vector __pixel a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector __pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_sll (vector signed char a1, vector unsigned int a2) +inline __vector __pixel +vec_sll (__vector __pixel a1, __vector unsigned short a2) { - return (vector signed char) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector __pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_sll (vector signed char a1, vector unsigned short a2) +inline __vector __pixel +vec_sll (__vector __pixel a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector __pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_sll (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_sll (__vector signed char a1, __vector unsigned int a2) { - return (vector signed char) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_sll (vector unsigned char a1, vector unsigned int a2) +inline __vector signed char +vec_sll (__vector signed char a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_sll (vector unsigned char a1, vector unsigned short a2) +inline __vector signed char +vec_sll (__vector signed char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_sll (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_sll (__vector unsigned char a1, __vector unsigned int a2) { - return (vector unsigned char) __builtin_altivec_vsl ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_sll (__vector unsigned char a1, __vector unsigned short a2) +{ + return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_sll (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool char +vec_sll (__vector __bool char a1, __vector unsigned int a2) +{ + return (__vector __bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool char +vec_sll (__vector __bool char a1, __vector unsigned short a2) +{ + return (__vector __bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool char +vec_sll (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector __bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2); } /* vec_slo */ -inline vector float -vec_slo (vector float a1, vector signed char a2) +inline __vector float +vec_slo (__vector float a1, __vector signed char a2) +{ + return (__vector float) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_slo (__vector float a1, __vector unsigned char a2) { - return (vector float) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector float) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_slo (vector float a1, vector unsigned char a2) +inline __vector signed int +vec_slo (__vector signed int a1, __vector signed char a2) { - return (vector float) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_slo (vector signed int a1, vector signed char a2) +inline __vector signed int +vec_slo (__vector signed int a1, __vector unsigned char a2) { - return (vector signed int) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_slo (vector signed int a1, vector unsigned char a2) +inline __vector unsigned int +vec_slo (__vector unsigned int a1, __vector signed char a2) { - return (vector signed int) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_slo (vector unsigned int a1, vector signed char a2) +inline __vector unsigned int +vec_slo (__vector unsigned int a1, __vector unsigned char a2) { - return (vector unsigned int) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_slo (vector unsigned int a1, vector unsigned char a2) +inline __vector signed short +vec_slo (__vector signed short a1, __vector signed char a2) { - return (vector unsigned int) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_slo (vector signed short a1, vector signed char a2) +inline __vector signed short +vec_slo (__vector signed short a1, __vector unsigned char a2) { - return (vector signed short) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_slo (vector signed short a1, vector unsigned char a2) +inline __vector unsigned short +vec_slo (__vector unsigned short a1, __vector signed char a2) { - return (vector signed short) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_slo (vector unsigned short a1, vector signed char a2) +inline __vector unsigned short +vec_slo (__vector unsigned short a1, __vector unsigned char a2) { - return (vector unsigned short) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_slo (vector unsigned short a1, vector unsigned char a2) +inline __vector __pixel +vec_slo (__vector __pixel a1, __vector signed char a2) { - return (vector unsigned short) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector __pixel) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_slo (vector signed char a1, vector signed char a2) +inline __vector __pixel +vec_slo (__vector __pixel a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector __pixel) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_slo (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_slo (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_slo (vector unsigned char a1, vector signed char a2) +inline __vector signed char +vec_slo (__vector signed char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_slo (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_slo (__vector unsigned char a1, __vector signed char a2) { - return (vector unsigned char) __builtin_altivec_vslo ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_slo (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2); } /* vec_splat */ -inline vector signed char -vec_splat (vector signed char a1, const char a2) +inline __vector signed char +vec_splat (__vector signed char a1, const int a2) { - return (vector signed char) __builtin_altivec_vspltb ((vector signed char) a1, a2); + return (__vector signed char) __builtin_altivec_vspltb ((__vector signed char) a1, a2); } -inline vector unsigned char -vec_splat (vector unsigned char a1, const char a2) +inline __vector unsigned char +vec_splat (__vector unsigned char a1, const int a2) { - return (vector unsigned char) __builtin_altivec_vspltb ((vector signed char) a1, a2); + return (__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) a1, a2); } -inline vector signed short -vec_splat (vector signed short a1, const char a2) +inline __vector __bool char +vec_splat (__vector __bool char a1, const int a2) { - return (vector signed short) __builtin_altivec_vsplth ((vector signed short) a1, a2); + return (__vector __bool char) __builtin_altivec_vspltb ((__vector signed char) a1, a2); } -inline vector unsigned short -vec_splat (vector unsigned short a1, const char a2) +inline __vector signed short +vec_splat (__vector signed short a1, const int a2) { - return (vector unsigned short) __builtin_altivec_vsplth ((vector signed short) a1, a2); + return (__vector signed short) __builtin_altivec_vsplth ((__vector signed short) a1, a2); } -inline vector float -vec_splat (vector float a1, const char a2) +inline __vector unsigned short +vec_splat (__vector unsigned short a1, const int a2) { - return (vector float) __builtin_altivec_vspltw ((vector signed int) a1, a2); + return (__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) a1, a2); } -inline vector signed int -vec_splat (vector signed int a1, const char a2) +inline __vector __bool short +vec_splat (__vector __bool short a1, const int a2) { - return (vector signed int) __builtin_altivec_vspltw ((vector signed int) a1, a2); + return (__vector __bool short) __builtin_altivec_vsplth ((__vector signed short) a1, a2); } -inline vector unsigned int -vec_splat (vector unsigned int a1, const char a2) +inline __vector __pixel +vec_splat (__vector __pixel a1, const int a2) { - return (vector unsigned int) __builtin_altivec_vspltw ((vector signed int) a1, a2); + return (__vector __pixel) __builtin_altivec_vsplth ((__vector signed short) a1, a2); +} + +inline __vector float +vec_splat (__vector float a1, const int a2) +{ + return (__vector float) __builtin_altivec_vspltw ((__vector signed int) a1, a2); +} + +inline __vector signed int +vec_splat (__vector signed int a1, const int a2) +{ + return (__vector signed int) __builtin_altivec_vspltw ((__vector signed int) a1, a2); +} + +inline __vector unsigned int +vec_splat (__vector unsigned int a1, const int a2) +{ + return (__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) a1, a2); +} + +inline __vector __bool int +vec_splat (__vector __bool int a1, const int a2) +{ + return (__vector __bool int) __builtin_altivec_vspltw ((__vector signed int) a1, a2); } /* vec_vspltw */ -inline vector float -vec_vspltw (vector float a1, const char a2) +inline __vector float +vec_vspltw (__vector float a1, const int a2) { - return (vector float) __builtin_altivec_vspltw ((vector signed int) a1, a2); + return (__vector float) __builtin_altivec_vspltw ((__vector signed int) a1, a2); } -inline vector signed int -vec_vspltw (vector signed int a1, const char a2) +inline __vector signed int +vec_vspltw (__vector signed int a1, const int a2) { - return (vector signed int) __builtin_altivec_vspltw ((vector signed int) a1, a2); + return (__vector signed int) __builtin_altivec_vspltw ((__vector signed int) a1, a2); } -inline vector unsigned int -vec_vspltw (vector unsigned int a1, const char a2) +inline __vector unsigned int +vec_vspltw (__vector unsigned int a1, const int a2) { - return (vector unsigned int) __builtin_altivec_vspltw ((vector signed int) a1, a2); + return (__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) a1, a2); +} + +inline __vector __bool int +vec_vspltw (__vector __bool int a1, const int a2) +{ + return (__vector __bool int) __builtin_altivec_vspltw ((__vector signed int) a1, a2); } /* vec_vsplth */ -inline vector signed short -vec_vsplth (vector signed short a1, const char a2) +inline __vector __bool short +vec_vsplth (__vector __bool short a1, const int a2) +{ + return (__vector __bool short) __builtin_altivec_vsplth ((__vector signed short) a1, a2); +} + +inline __vector signed short +vec_vsplth (__vector signed short a1, const int a2) { - return (vector signed short) __builtin_altivec_vsplth ((vector signed short) a1, a2); + return (__vector signed short) __builtin_altivec_vsplth ((__vector signed short) a1, a2); } -inline vector unsigned short -vec_vsplth (vector unsigned short a1, const char a2) +inline __vector unsigned short +vec_vsplth (__vector unsigned short a1, const int a2) { - return (vector unsigned short) __builtin_altivec_vsplth ((vector signed short) a1, a2); + return (__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) a1, a2); +} + +inline __vector __pixel +vec_vsplth (__vector __pixel a1, const int a2) +{ + return (__vector __pixel) __builtin_altivec_vsplth ((__vector signed short) a1, a2); } /* vec_vspltb */ -inline vector signed char -vec_vspltb (vector signed char a1, const char a2) +inline __vector signed char +vec_vspltb (__vector signed char a1, const int a2) { - return (vector signed char) __builtin_altivec_vspltb ((vector signed char) a1, a2); + return (__vector signed char) __builtin_altivec_vspltb ((__vector signed char) a1, a2); } -inline vector unsigned char -vec_vspltb (vector unsigned char a1, const char a2) +inline __vector unsigned char +vec_vspltb (__vector unsigned char a1, const int a2) { - return (vector unsigned char) __builtin_altivec_vspltb ((vector signed char) a1, a2); + return (__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) a1, a2); +} + +inline __vector __bool char +vec_vspltb (__vector __bool char a1, const int a2) +{ + return (__vector __bool char) __builtin_altivec_vspltb ((__vector signed char) a1, a2); } /* vec_splat_s8 */ -inline vector signed char -vec_splat_s8 (const char a1) +inline __vector signed char +vec_splat_s8 (const int a1) { - return (vector signed char) __builtin_altivec_vspltisb (a1); + return (__vector signed char) __builtin_altivec_vspltisb (a1); } /* vec_splat_s16 */ -inline vector signed short -vec_splat_s16 (const char a1) +inline __vector signed short +vec_splat_s16 (const int a1) { - return (vector signed short) __builtin_altivec_vspltish (a1); + return (__vector signed short) __builtin_altivec_vspltish (a1); } /* vec_splat_s32 */ -inline vector signed int -vec_splat_s32 (const char a1) +inline __vector signed int +vec_splat_s32 (const int a1) { - return (vector signed int) __builtin_altivec_vspltisw (a1); + return (__vector signed int) __builtin_altivec_vspltisw (a1); } /* vec_splat_u8 */ -inline vector unsigned char -vec_splat_u8 (const char a1) +inline __vector unsigned char +vec_splat_u8 (const int a1) { - return (vector unsigned char) __builtin_altivec_vspltisb (a1); + return (__vector unsigned char) __builtin_altivec_vspltisb (a1); } /* vec_splat_u16 */ -inline vector unsigned short -vec_splat_u16 (const char a1) +inline __vector unsigned short +vec_splat_u16 (const int a1) { - return (vector unsigned short) __builtin_altivec_vspltish (a1); + return (__vector unsigned short) __builtin_altivec_vspltish (a1); } /* vec_splat_u32 */ -inline vector unsigned int -vec_splat_u32 (const char a1) +inline __vector unsigned int +vec_splat_u32 (const int a1) { - return (vector unsigned int) __builtin_altivec_vspltisw (a1); + return (__vector unsigned int) __builtin_altivec_vspltisw (a1); } /* vec_sr */ -inline vector signed char -vec_sr (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_sr (__vector signed char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vsrb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_sr (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_sr (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsrb ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_sr (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_sr (__vector signed short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vsrh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_sr (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_sr (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsrh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_sr (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_sr (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vsrw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_sr (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_sr (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsrw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vsrw */ -inline vector signed int -vec_vsrw (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_vsrw (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vsrw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vsrw (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vsrw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsrw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vsrh */ -inline vector signed short -vec_vsrh (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_vsrh (__vector signed short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vsrh ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vsrh (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vsrh (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsrh ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vsrb */ -inline vector signed char -vec_vsrb (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_vsrb (__vector signed char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vsrb ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vsrb (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vsrb (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsrb ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2); } /* vec_sra */ -inline vector signed char -vec_sra (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_sra (__vector signed char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vsrab ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_sra (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_sra (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsrab ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_sra (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_sra (__vector signed short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vsrah ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_sra (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_sra (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsrah ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_sra (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_sra (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vsraw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_sra (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_sra (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsraw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vsraw */ -inline vector signed int -vec_vsraw (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_vsraw (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vsraw ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vsraw (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vsraw (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsraw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vsrah */ -inline vector signed short -vec_vsrah (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_vsrah (__vector signed short a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vsrah ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vsrah (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vsrah (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsrah ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vsrab */ -inline vector signed char -vec_vsrab (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_vsrab (__vector signed char a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vsrab ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vsrab (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vsrab (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsrab ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2); } /* vec_srl */ -inline vector signed int -vec_srl (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_srl (__vector signed int a1, __vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_srl (vector signed int a1, vector unsigned short a2) +inline __vector signed int +vec_srl (__vector signed int a1, __vector unsigned short a2) { - return (vector signed int) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_srl (vector signed int a1, vector unsigned char a2) +inline __vector signed int +vec_srl (__vector signed int a1, __vector unsigned char a2) { - return (vector signed int) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_srl (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_srl (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_srl (vector unsigned int a1, vector unsigned short a2) +inline __vector unsigned int +vec_srl (__vector unsigned int a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_srl (vector unsigned int a1, vector unsigned char a2) +inline __vector unsigned int +vec_srl (__vector unsigned int a1, __vector unsigned char a2) { - return (vector unsigned int) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_srl (vector signed short a1, vector unsigned int a2) +inline __vector __bool int +vec_srl (__vector __bool int a1, __vector unsigned int a2) { - return (vector signed short) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_srl (vector signed short a1, vector unsigned short a2) +inline __vector __bool int +vec_srl (__vector __bool int a1, __vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_srl (vector signed short a1, vector unsigned char a2) +inline __vector __bool int +vec_srl (__vector __bool int a1, __vector unsigned char a2) { - return (vector signed short) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_srl (vector unsigned short a1, vector unsigned int a2) +inline __vector signed short +vec_srl (__vector signed short a1, __vector unsigned int a2) { - return (vector unsigned short) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_srl (vector unsigned short a1, vector unsigned short a2) +inline __vector signed short +vec_srl (__vector signed short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_srl (vector unsigned short a1, vector unsigned char a2) +inline __vector signed short +vec_srl (__vector signed short a1, __vector unsigned char a2) { - return (vector unsigned short) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_srl (vector signed char a1, vector unsigned int a2) +inline __vector unsigned short +vec_srl (__vector unsigned short a1, __vector unsigned int a2) { - return (vector signed char) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_srl (vector signed char a1, vector unsigned short a2) +inline __vector unsigned short +vec_srl (__vector unsigned short a1, __vector unsigned short a2) { - return (vector signed char) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_srl (vector signed char a1, vector unsigned char a2) +inline __vector unsigned short +vec_srl (__vector unsigned short a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_srl (vector unsigned char a1, vector unsigned int a2) +inline __vector __bool short +vec_srl (__vector __bool short a1, __vector unsigned int a2) { - return (vector unsigned char) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_srl (vector unsigned char a1, vector unsigned short a2) +inline __vector __bool short +vec_srl (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_srl (vector unsigned char a1, vector unsigned char a2) +inline __vector __bool short +vec_srl (__vector __bool short a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsr ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __pixel +vec_srl (__vector __pixel a1, __vector unsigned int a2) +{ + return (__vector __pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __pixel +vec_srl (__vector __pixel a1, __vector unsigned short a2) +{ + return (__vector __pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __pixel +vec_srl (__vector __pixel a1, __vector unsigned char a2) +{ + return (__vector __pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_srl (__vector signed char a1, __vector unsigned int a2) +{ + return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_srl (__vector signed char a1, __vector unsigned short a2) +{ + return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_srl (__vector signed char a1, __vector unsigned char a2) +{ + return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_srl (__vector unsigned char a1, __vector unsigned int a2) +{ + return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_srl (__vector unsigned char a1, __vector unsigned short a2) +{ + return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_srl (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool char +vec_srl (__vector __bool char a1, __vector unsigned int a2) +{ + return (__vector __bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool char +vec_srl (__vector __bool char a1, __vector unsigned short a2) +{ + return (__vector __bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool char +vec_srl (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector __bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2); } /* vec_sro */ -inline vector float -vec_sro (vector float a1, vector signed char a2) +inline __vector float +vec_sro (__vector float a1, __vector signed char a2) +{ + return (__vector float) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_sro (__vector float a1, __vector unsigned char a2) { - return (vector float) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector float) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_sro (vector float a1, vector unsigned char a2) +inline __vector signed int +vec_sro (__vector signed int a1, __vector signed char a2) { - return (vector float) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_sro (vector signed int a1, vector signed char a2) +inline __vector signed int +vec_sro (__vector signed int a1, __vector unsigned char a2) { - return (vector signed int) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_sro (vector signed int a1, vector unsigned char a2) +inline __vector unsigned int +vec_sro (__vector unsigned int a1, __vector signed char a2) { - return (vector signed int) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_sro (vector unsigned int a1, vector signed char a2) +inline __vector unsigned int +vec_sro (__vector unsigned int a1, __vector unsigned char a2) { - return (vector unsigned int) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_sro (vector unsigned int a1, vector unsigned char a2) +inline __vector signed short +vec_sro (__vector signed short a1, __vector signed char a2) { - return (vector unsigned int) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_sro (vector signed short a1, vector signed char a2) +inline __vector signed short +vec_sro (__vector signed short a1, __vector unsigned char a2) { - return (vector signed short) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_sro (vector signed short a1, vector unsigned char a2) +inline __vector unsigned short +vec_sro (__vector unsigned short a1, __vector signed char a2) { - return (vector signed short) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_sro (vector unsigned short a1, vector signed char a2) +inline __vector unsigned short +vec_sro (__vector unsigned short a1, __vector unsigned char a2) { - return (vector unsigned short) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_sro (vector unsigned short a1, vector unsigned char a2) +inline __vector __pixel +vec_sro (__vector __pixel a1, __vector signed char a2) { - return (vector unsigned short) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector __pixel) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_sro (vector signed char a1, vector signed char a2) +inline __vector __pixel +vec_sro (__vector __pixel a1, __vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector __pixel) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_sro (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_sro (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_sro (vector unsigned char a1, vector signed char a2) +inline __vector signed char +vec_sro (__vector signed char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_sro (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_sro (__vector unsigned char a1, __vector signed char a2) { - return (vector unsigned char) __builtin_altivec_vsro ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_sro (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2); } /* vec_st */ inline void -vec_st (vector float a1, int a2, void *a3) +vec_st (__vector float a1, int a2, __vector float *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector float a1, int a2, float *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector signed int a1, int a2, __vector signed int *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector signed int a1, int a2, int *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector unsigned int a1, int a2, __vector unsigned int *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector unsigned int a1, int a2, unsigned int *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __bool int a1, int a2, __vector __bool int *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __bool int a1, int a2, unsigned int *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __bool int a1, int a2, int *a3) { - __builtin_altivec_stvx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_st (vector signed int a1, int a2, void *a3) +vec_st (__vector signed short a1, int a2, __vector signed short *a3) { - __builtin_altivec_stvx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_st (vector unsigned int a1, int a2, void *a3) +vec_st (__vector signed short a1, int a2, short *a3) { - __builtin_altivec_stvx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_st (vector signed short a1, int a2, void *a3) +vec_st (__vector unsigned short a1, int a2, __vector unsigned short *a3) { - __builtin_altivec_stvx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_st (vector unsigned short a1, int a2, void *a3) +vec_st (__vector unsigned short a1, int a2, unsigned short *a3) { - __builtin_altivec_stvx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_st (vector signed char a1, int a2, void *a3) +vec_st (__vector __bool short a1, int a2, __vector __bool short *a3) { - __builtin_altivec_stvx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_st (vector unsigned char a1, int a2, void *a3) +vec_st (__vector __bool short a1, int a2, unsigned short *a3) { - __builtin_altivec_stvx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __pixel a1, int a2, __vector __pixel *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __pixel a1, int a2, unsigned short *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __pixel a1, int a2, short *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __bool short a1, int a2, short *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector signed char a1, int a2, __vector signed char *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector signed char a1, int a2, signed char *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector unsigned char a1, int a2, __vector unsigned char *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector unsigned char a1, int a2, unsigned char *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __bool char a1, int a2, __vector __bool char *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __bool char a1, int a2, unsigned char *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_st (__vector __bool char a1, int a2, signed char *a3) +{ + __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3); } /* vec_ste */ inline void -vec_ste (vector signed char a1, int a2, void *a3) +vec_ste (__vector signed char a1, int a2, signed char *a3) +{ + __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3); +} + +inline void +vec_ste (__vector unsigned char a1, int a2, unsigned char *a3) +{ + __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3); +} + +inline void +vec_ste (__vector __bool char a1, int a2, signed char *a3) +{ + __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3); +} + +inline void +vec_ste (__vector __bool char a1, int a2, unsigned char *a3) +{ + __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3); +} + +inline void +vec_ste (__vector signed short a1, int a2, short *a3) +{ + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); +} + +inline void +vec_ste (__vector unsigned short a1, int a2, unsigned short *a3) +{ + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); +} + +inline void +vec_ste (__vector __bool short a1, int a2, short *a3) { - __builtin_altivec_stvebx ((vector signed char) a1, a2, (void *) a3); + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); } inline void -vec_ste (vector unsigned char a1, int a2, void *a3) +vec_ste (__vector __bool short a1, int a2, unsigned short *a3) { - __builtin_altivec_stvebx ((vector signed char) a1, a2, (void *) a3); + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); } inline void -vec_ste (vector signed short a1, int a2, void *a3) +vec_ste (__vector __pixel a1, int a2, short *a3) { - __builtin_altivec_stvehx ((vector signed short) a1, a2, (void *) a3); + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); } inline void -vec_ste (vector unsigned short a1, int a2, void *a3) +vec_ste (__vector __pixel a1, int a2, unsigned short *a3) { - __builtin_altivec_stvehx ((vector signed short) a1, a2, (void *) a3); + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); } inline void -vec_ste (vector float a1, int a2, void *a3) +vec_ste (__vector float a1, int a2, float *a3) { - __builtin_altivec_stvewx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_ste (vector signed int a1, int a2, void *a3) +vec_ste (__vector signed int a1, int a2, int *a3) { - __builtin_altivec_stvewx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_ste (vector unsigned int a1, int a2, void *a3) +vec_ste (__vector unsigned int a1, int a2, unsigned int *a3) { - __builtin_altivec_stvewx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_ste (__vector __bool int a1, int a2, int *a3) +{ + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_ste (__vector __bool int a1, int a2, unsigned int *a3) +{ + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); } /* vec_stvewx */ inline void -vec_stvewx (vector float a1, int a2, void *a3) +vec_stvewx (__vector float a1, int a2, float *a3) +{ + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stvewx (__vector signed int a1, int a2, int *a3) { - __builtin_altivec_stvewx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_stvewx (vector signed int a1, int a2, void *a3) +vec_stvewx (__vector unsigned int a1, int a2, unsigned int *a3) { - __builtin_altivec_stvewx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_stvewx (vector unsigned int a1, int a2, void *a3) +vec_stvewx (__vector __bool int a1, int a2, int *a3) { - __builtin_altivec_stvewx ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stvewx (__vector __bool int a1, int a2, unsigned int *a3) +{ + __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3); } /* vec_stvehx */ inline void -vec_stvehx (vector signed short a1, int a2, void *a3) +vec_stvehx (__vector signed short a1, int a2, short *a3) { - __builtin_altivec_stvehx ((vector signed short) a1, a2, (void *) a3); + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); } inline void -vec_stvehx (vector unsigned short a1, int a2, void *a3) +vec_stvehx (__vector unsigned short a1, int a2, unsigned short *a3) { - __builtin_altivec_stvehx ((vector signed short) a1, a2, (void *) a3); + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); +} + +inline void +vec_stvehx (__vector __bool short a1, int a2, short *a3) +{ + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); +} + +inline void +vec_stvehx (__vector __bool short a1, int a2, unsigned short *a3) +{ + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); +} + +inline void +vec_stvehx (__vector __pixel a1, int a2, short *a3) +{ + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); +} + +inline void +vec_stvehx (__vector __pixel a1, int a2, unsigned short *a3) +{ + __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3); } /* vec_stvebx */ inline void -vec_stvebx (vector signed char a1, int a2, void *a3) +vec_stvebx (__vector signed char a1, int a2, signed char *a3) +{ + __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3); +} + +inline void +vec_stvebx (__vector unsigned char a1, int a2, unsigned char *a3) +{ + __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3); +} + +inline void +vec_stvebx (__vector __bool char a1, int a2, signed char *a3) { - __builtin_altivec_stvebx ((vector signed char) a1, a2, (void *) a3); + __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3); } inline void -vec_stvebx (vector unsigned char a1, int a2, void *a3) +vec_stvebx (__vector __bool char a1, int a2, unsigned char *a3) { - __builtin_altivec_stvebx ((vector signed char) a1, a2, (void *) a3); + __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3); } /* vec_stl */ inline void -vec_stl (vector float a1, int a2, void *a3) +vec_stl (__vector float a1, int a2, __vector float *a3) { - __builtin_altivec_stvxl ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_stl (vector signed int a1, int a2, void *a3) +vec_stl (__vector float a1, int a2, float *a3) { - __builtin_altivec_stvxl ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_stl (vector unsigned int a1, int a2, void *a3) +vec_stl (__vector signed int a1, int a2, __vector signed int *a3) { - __builtin_altivec_stvxl ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_stl (vector signed short a1, int a2, void *a3) +vec_stl (__vector signed int a1, int a2, int *a3) { - __builtin_altivec_stvxl ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_stl (vector unsigned short a1, int a2, void *a3) +vec_stl (__vector unsigned int a1, int a2, __vector unsigned int *a3) { - __builtin_altivec_stvxl ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_stl (vector signed char a1, int a2, void *a3) +vec_stl (__vector unsigned int a1, int a2, unsigned int *a3) { - __builtin_altivec_stvxl ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); } inline void -vec_stl (vector unsigned char a1, int a2, void *a3) +vec_stl (__vector __bool int a1, int a2, __vector __bool int *a3) { - __builtin_altivec_stvxl ((vector signed int) a1, a2, (void *) a3); + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __bool int a1, int a2, unsigned int *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __bool int a1, int a2, int *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector signed short a1, int a2, __vector signed short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector signed short a1, int a2, short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector unsigned short a1, int a2, __vector unsigned short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector unsigned short a1, int a2, unsigned short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __bool short a1, int a2, __vector __bool short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __bool short a1, int a2, unsigned short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __bool short a1, int a2, short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __pixel a1, int a2, __vector __pixel *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __pixel a1, int a2, unsigned short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __pixel a1, int a2, short *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector signed char a1, int a2, __vector signed char *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector signed char a1, int a2, signed char *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector unsigned char a1, int a2, __vector unsigned char *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector unsigned char a1, int a2, unsigned char *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __bool char a1, int a2, __vector __bool char *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __bool char a1, int a2, unsigned char *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); +} + +inline void +vec_stl (__vector __bool char a1, int a2, signed char *a3) +{ + __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3); } /* vec_sub */ -inline vector signed char -vec_sub (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_sub (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_sub (__vector signed char a1, __vector __bool char a2) { - return (vector signed char) __builtin_altivec_vsububm ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_sub (vector signed char a1, vector unsigned char a2) +inline __vector signed char +vec_sub (__vector signed char a1, __vector signed char a2) { - return (vector unsigned char) __builtin_altivec_vsububm ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_sub (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_sub (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsububm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_sub (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_sub (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vsububm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed short -vec_sub (vector signed short a1, vector signed short a2) +inline __vector unsigned char +vec_sub (__vector unsigned char a1, __vector unsigned char a2) { - return (vector signed short) __builtin_altivec_vsubuhm ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_sub (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_sub (__vector __bool short a1, __vector signed short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_sub (vector unsigned short a1, vector signed short a2) +inline __vector signed short +vec_sub (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_sub (vector unsigned short a1, vector unsigned short a2) +inline __vector signed short +vec_sub (__vector signed short a1, __vector signed short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_sub (vector signed int a1, vector signed int a2) +inline __vector unsigned short +vec_sub (__vector __bool short a1, __vector unsigned short a2) { - return (vector signed int) __builtin_altivec_vsubuwm ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_sub (vector signed int a1, vector unsigned int a2) +inline __vector unsigned short +vec_sub (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_sub (vector unsigned int a1, vector signed int a2) +inline __vector unsigned short +vec_sub (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_sub (vector unsigned int a1, vector unsigned int a2) +inline __vector signed int +vec_sub (__vector __bool int a1, __vector signed int a2) { - return (vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_sub (vector float a1, vector float a2) +inline __vector signed int +vec_sub (__vector signed int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vsubfp ((vector float) a1, (vector float) a2); + return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_sub (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_sub (__vector __bool int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_sub (__vector unsigned int a1, __vector __bool int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_sub (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_sub (__vector float a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vsubfp ((__vector float) a1, (__vector float) a2); } /* vec_vsubfp */ -inline vector float -vec_vsubfp (vector float a1, vector float a2) +inline __vector float +vec_vsubfp (__vector float a1, __vector float a2) { - return (vector float) __builtin_altivec_vsubfp ((vector float) a1, (vector float) a2); + return (__vector float) __builtin_altivec_vsubfp ((__vector float) a1, (__vector float) a2); } /* vec_vsubuwm */ -inline vector signed int -vec_vsubuwm (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_vsubuwm (__vector __bool int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vsubuwm ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vsubuwm (vector signed int a1, vector unsigned int a2) +inline __vector signed int +vec_vsubuwm (__vector signed int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vsubuwm (vector unsigned int a1, vector signed int a2) +inline __vector signed int +vec_vsubuwm (__vector signed int a1, __vector signed int a2) { - return (vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vsubuwm (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vsubuwm (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsubuwm ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_vsubuwm (__vector unsigned int a1, __vector __bool int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_vsubuwm (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vsubuhm */ -inline vector signed short -vec_vsubuhm (vector signed short a1, vector signed short a2) +inline __vector signed short +vec_vsubuhm (__vector __bool short a1, __vector signed short a2) +{ + return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vsubuhm (__vector signed short a1, __vector __bool short a2) +{ + return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vsubuhm (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vsubuhm ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vsubuhm (vector signed short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vsubuhm (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vsubuhm (vector unsigned short a1, vector signed short a2) +inline __vector unsigned short +vec_vsubuhm (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vsubuhm (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vsubuhm (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhm ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vsububm */ -inline vector signed char -vec_vsububm (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_vsububm (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vsububm (__vector signed char a1, __vector __bool char a2) +{ + return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vsububm (__vector signed char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vsububm ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vsububm (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vsububm (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsububm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vsububm (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_vsububm (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vsububm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vsububm (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vsububm (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsububm ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2); } /* vec_subc */ -inline vector unsigned int -vec_subc (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_subc (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsubcuw ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsubcuw ((__vector signed int) a1, (__vector signed int) a2); } /* vec_subs */ -inline vector unsigned char -vec_subs (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_subs (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsububs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_subs (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_subs (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vsububs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_subs (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_subs (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsububs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector signed char -vec_subs (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_subs (__vector __bool char a1, __vector signed char a2) { - return (vector signed char) __builtin_altivec_vsubsbs ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_subs (vector signed short a1, vector unsigned short a2) +inline __vector signed char +vec_subs (__vector signed char a1, __vector __bool char a2) { - return (vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) a1, (vector signed short) a2); + return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_subs (vector unsigned short a1, vector signed short a2) +inline __vector signed char +vec_subs (__vector signed char a1, __vector signed char a2) { - return (vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) a1, (vector signed short) a2); + return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned short -vec_subs (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_subs (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed short -vec_subs (vector signed short a1, vector signed short a2) +inline __vector unsigned short +vec_subs (__vector unsigned short a1, __vector __bool short a2) { - return (vector signed short) __builtin_altivec_vsubshs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_subs (vector signed int a1, vector unsigned int a2) +inline __vector unsigned short +vec_subs (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_subs (vector unsigned int a1, vector signed int a2) +inline __vector signed short +vec_subs (__vector __bool short a1, __vector signed short a2) { - return (vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned int -vec_subs (vector unsigned int a1, vector unsigned int a2) +inline __vector signed short +vec_subs (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector signed int -vec_subs (vector signed int a1, vector signed int a2) +inline __vector signed short +vec_subs (__vector signed short a1, __vector signed short a2) { - return (vector signed int) __builtin_altivec_vsubsws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector unsigned int +vec_subs (__vector __bool int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_subs (__vector unsigned int a1, __vector __bool int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned int +vec_subs (__vector unsigned int a1, __vector unsigned int a2) +{ + return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_subs (__vector __bool int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_subs (__vector signed int a1, __vector __bool int a2) +{ + return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_subs (__vector signed int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vsubsws */ -inline vector signed int -vec_vsubsws (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_vsubsws (__vector __bool int a1, __vector signed int a2) +{ + return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vsubsws (__vector signed int a1, __vector __bool int a2) +{ + return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed int +vec_vsubsws (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vsubsws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vsubuws */ -inline vector unsigned int -vec_vsubuws (vector signed int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vsubuws (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vsubuws (vector unsigned int a1, vector signed int a2) +inline __vector unsigned int +vec_vsubuws (__vector unsigned int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_vsubuws (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_vsubuws (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsubuws ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2); } /* vec_vsubshs */ -inline vector signed short -vec_vsubshs (vector signed short a1, vector signed short a2) +inline __vector signed short +vec_vsubshs (__vector __bool short a1, __vector signed short a2) +{ + return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vsubshs (__vector signed short a1, __vector __bool short a2) +{ + return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2); +} + +inline __vector signed short +vec_vsubshs (__vector signed short a1, __vector signed short a2) { - return (vector signed short) __builtin_altivec_vsubshs ((vector signed short) a1, (vector signed short) a2); + return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vsubuhs */ -inline vector unsigned short -vec_vsubuhs (vector signed short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vsubuhs (__vector __bool short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vsubuhs (vector unsigned short a1, vector signed short a2) +inline __vector unsigned short +vec_vsubuhs (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2); } -inline vector unsigned short -vec_vsubuhs (vector unsigned short a1, vector unsigned short a2) +inline __vector unsigned short +vec_vsubuhs (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned short) __builtin_altivec_vsubuhs ((vector signed short) a1, (vector signed short) a2); + return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2); } /* vec_vsubsbs */ -inline vector signed char -vec_vsubsbs (vector signed char a1, vector signed char a2) +inline __vector signed char +vec_vsubsbs (__vector __bool char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vsubsbs (__vector signed char a1, __vector __bool char a2) { - return (vector signed char) __builtin_altivec_vsubsbs ((vector signed char) a1, (vector signed char) a2); + return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2); +} + +inline __vector signed char +vec_vsubsbs (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2); } /* vec_vsububs */ -inline vector unsigned char -vec_vsububs (vector signed char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vsububs (__vector __bool char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsububs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vsububs (vector unsigned char a1, vector signed char a2) +inline __vector unsigned char +vec_vsububs (__vector unsigned char a1, __vector __bool char a2) { - return (vector unsigned char) __builtin_altivec_vsububs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2); } -inline vector unsigned char -vec_vsububs (vector unsigned char a1, vector unsigned char a2) +inline __vector unsigned char +vec_vsububs (__vector unsigned char a1, __vector unsigned char a2) { - return (vector unsigned char) __builtin_altivec_vsububs ((vector signed char) a1, (vector signed char) a2); + return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2); } /* vec_sum4s */ -inline vector unsigned int -vec_sum4s (vector unsigned char a1, vector unsigned int a2) +inline __vector unsigned int +vec_sum4s (__vector unsigned char a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsum4ubs ((vector signed char) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) a1, (__vector signed int) a2); } -inline vector signed int -vec_sum4s (vector signed char a1, vector signed int a2) +inline __vector signed int +vec_sum4s (__vector signed char a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vsum4sbs ((vector signed char) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) a1, (__vector signed int) a2); } -inline vector signed int -vec_sum4s (vector signed short a1, vector signed int a2) +inline __vector signed int +vec_sum4s (__vector signed short a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vsum4shs ((vector signed short) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) a1, (__vector signed int) a2); } /* vec_vsum4shs */ -inline vector signed int -vec_vsum4shss (vector signed short a1, vector signed int a2) +inline __vector signed int +vec_vsum4shs (__vector signed short a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vsum4shs ((vector signed short) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) a1, (__vector signed int) a2); } /* vec_vsum4sbs */ -inline vector signed int -vec_vsum4sbs (vector signed char a1, vector signed int a2) +inline __vector signed int +vec_vsum4sbs (__vector signed char a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vsum4sbs ((vector signed char) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) a1, (__vector signed int) a2); } /* vec_vsum4ubs */ -inline vector unsigned int -vec_vsum4ubs (vector unsigned char a1, vector unsigned int a2) +inline __vector unsigned int +vec_vsum4ubs (__vector unsigned char a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vsum4ubs ((vector signed char) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) a1, (__vector signed int) a2); } /* vec_sum2s */ -inline vector signed int -vec_sum2s (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_sum2s (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vsum2sws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsum2sws ((__vector signed int) a1, (__vector signed int) a2); } /* vec_sums */ -inline vector signed int -vec_sums (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_sums (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vsumsws ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vsumsws ((__vector signed int) a1, (__vector signed int) a2); } /* vec_trunc */ -inline vector float -vec_trunc (vector float a1) +inline __vector float +vec_trunc (__vector float a1) { - return (vector float) __builtin_altivec_vrfiz ((vector float) a1); + return (__vector float) __builtin_altivec_vrfiz ((__vector float) a1); } /* vec_unpackh */ -inline vector signed short -vec_unpackh (vector signed char a1) +inline __vector signed short +vec_unpackh (__vector signed char a1) +{ + return (__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) a1); +} + +inline __vector __bool short +vec_unpackh (__vector __bool char a1) { - return (vector signed short) __builtin_altivec_vupkhsb ((vector signed char) a1); + return (__vector __bool short) __builtin_altivec_vupkhsb ((__vector signed char) a1); } -inline vector signed int -vec_unpackh (vector signed short a1) +inline __vector signed int +vec_unpackh (__vector signed short a1) { - return (vector signed int) __builtin_altivec_vupkhsh ((vector signed short) a1); + return (__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) a1); } -inline vector unsigned int -vec_unpackh (vector unsigned short a1) +inline __vector __bool int +vec_unpackh (__vector __bool short a1) { - return (vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) a1); + return (__vector __bool int) __builtin_altivec_vupkhsh ((__vector signed short) a1); +} + +inline __vector unsigned int +vec_unpackh (__vector __pixel a1) +{ + return (__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) a1); } /* vec_vupkhsh */ -inline vector signed int -vec_vupkhsh (vector signed short a1) +inline __vector __bool int +vec_vupkhsh (__vector __bool short a1) { - return (vector signed int) __builtin_altivec_vupkhsh ((vector signed short) a1); + return (__vector __bool int) __builtin_altivec_vupkhsh ((__vector signed short) a1); +} + +inline __vector signed int +vec_vupkhsh (__vector signed short a1) +{ + return (__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) a1); } /* vec_vupkhpx */ -inline vector unsigned int -vec_vupkhpx (vector unsigned short a1) +inline __vector unsigned int +vec_vupkhpx (__vector __pixel a1) { - return (vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) a1); + return (__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) a1); } /* vec_vupkhsb */ -inline vector signed short -vec_vupkhsb (vector signed char a1) +inline __vector __bool short +vec_vupkhsb (__vector __bool char a1) { - return (vector signed short) __builtin_altivec_vupkhsb ((vector signed char) a1); + return (__vector __bool short) __builtin_altivec_vupkhsb ((__vector signed char) a1); +} + +inline __vector signed short +vec_vupkhsb (__vector signed char a1) +{ + return (__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) a1); } /* vec_unpackl */ -inline vector signed short -vec_unpackl (vector signed char a1) +inline __vector signed short +vec_unpackl (__vector signed char a1) +{ + return (__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) a1); +} + +inline __vector __bool short +vec_unpackl (__vector __bool char a1) +{ + return (__vector __bool short) __builtin_altivec_vupklsb ((__vector signed char) a1); +} + +inline __vector unsigned int +vec_unpackl (__vector __pixel a1) { - return (vector signed short) __builtin_altivec_vupklsb ((vector signed char) a1); + return (__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) a1); } -inline vector unsigned int -vec_unpackl (vector unsigned short a1) +inline __vector signed int +vec_unpackl (__vector signed short a1) { - return (vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) a1); + return (__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) a1); } -inline vector signed int -vec_unpackl (vector signed short a1) +inline __vector __bool int +vec_unpackl (__vector __bool short a1) { - return (vector signed int) __builtin_altivec_vupklsh ((vector signed short) a1); + return (__vector __bool int) __builtin_altivec_vupklsh ((__vector signed short) a1); } /* vec_vupklpx */ -inline vector unsigned int -vec_vupklpx (vector unsigned short a1) +inline __vector unsigned int +vec_vupklpx (__vector __pixel a1) { - return (vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) a1); + return (__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) a1); } /* vec_upklsh */ -inline vector signed int -vec_vupklsh (vector signed short a1) +inline __vector __bool int +vec_vupklsh (__vector __bool short a1) +{ + return (__vector __bool int) __builtin_altivec_vupklsh ((__vector signed short) a1); +} + +inline __vector signed int +vec_vupklsh (__vector signed short a1) { - return (vector signed int) __builtin_altivec_vupklsh ((vector signed short) a1); + return (__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) a1); } /* vec_vupklsb */ -inline vector signed short -vec_vupklsb (vector signed char a1) +inline __vector __bool short +vec_vupklsb (__vector __bool char a1) { - return (vector signed short) __builtin_altivec_vupklsb ((vector signed char) a1); + return (__vector __bool short) __builtin_altivec_vupklsb ((__vector signed char) a1); +} + +inline __vector signed short +vec_vupklsb (__vector signed char a1) +{ + return (__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) a1); } /* vec_xor */ -inline vector float -vec_xor (vector float a1, vector float a2) +inline __vector float +vec_xor (__vector float a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_xor (__vector float a1, __vector __bool int a2) +{ + return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector float +vec_xor (__vector __bool int a1, __vector float a2) +{ + return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool int +vec_xor (__vector __bool int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_xor (vector float a1, vector signed int a2) +inline __vector signed int +vec_xor (__vector __bool int a1, __vector signed int a2) { - return (vector float) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector float -vec_xor (vector signed int a1, vector float a2) +inline __vector signed int +vec_xor (__vector signed int a1, __vector __bool int a2) { - return (vector float) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed int -vec_xor (vector signed int a1, vector signed int a2) +inline __vector signed int +vec_xor (__vector signed int a1, __vector signed int a2) { - return (vector signed int) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_xor (vector signed int a1, vector unsigned int a2) +inline __vector unsigned int +vec_xor (__vector __bool int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_xor (vector unsigned int a1, vector signed int a2) +inline __vector unsigned int +vec_xor (__vector unsigned int a1, __vector __bool int a2) { - return (vector unsigned int) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned int -vec_xor (vector unsigned int a1, vector unsigned int a2) +inline __vector unsigned int +vec_xor (__vector unsigned int a1, __vector unsigned int a2) { - return (vector unsigned int) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed short -vec_xor (vector signed short a1, vector signed short a2) +inline __vector __bool short +vec_xor (__vector __bool short a1, __vector __bool short a2) { - return (vector signed short) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector __bool short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_xor (vector signed short a1, vector unsigned short a2) +inline __vector signed short +vec_xor (__vector __bool short a1, __vector signed short a2) { - return (vector unsigned short) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_xor (vector unsigned short a1, vector signed short a2) +inline __vector signed short +vec_xor (__vector signed short a1, __vector __bool short a2) { - return (vector unsigned short) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned short -vec_xor (vector unsigned short a1, vector unsigned short a2) +inline __vector signed short +vec_xor (__vector signed short a1, __vector signed short a2) { - return (vector unsigned short) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector signed char -vec_xor (vector signed char a1, vector signed char a2) +inline __vector unsigned short +vec_xor (__vector __bool short a1, __vector unsigned short a2) { - return (vector signed char) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_xor (vector signed char a1, vector unsigned char a2) +inline __vector unsigned short +vec_xor (__vector unsigned short a1, __vector __bool short a2) { - return (vector unsigned char) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_xor (vector unsigned char a1, vector signed char a2) +inline __vector unsigned short +vec_xor (__vector unsigned short a1, __vector unsigned short a2) { - return (vector unsigned char) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } -inline vector unsigned char -vec_xor (vector unsigned char a1, vector unsigned char a2) +inline __vector signed char +vec_xor (__vector __bool char a1, __vector signed char a2) { - return (vector unsigned char) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector __bool char +vec_xor (__vector __bool char a1, __vector __bool char a2) +{ + return (__vector __bool char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_xor (__vector signed char a1, __vector __bool char a2) +{ + return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector signed char +vec_xor (__vector signed char a1, __vector signed char a2) +{ + return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_xor (__vector __bool char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_xor (__vector unsigned char a1, __vector __bool char a2) +{ + return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); +} + +inline __vector unsigned char +vec_xor (__vector unsigned char a1, __vector unsigned char a2) +{ + return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2); } /* vec_all_eq */ inline int -vec_all_eq (vector signed char a1, vector unsigned char a2) +vec_all_eq (__vector signed char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_LT, a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT, a1, (__vector signed char) a2); } inline int -vec_all_eq (vector signed char a1, vector signed char a2) +vec_all_eq (__vector signed char a1, __vector signed char a2) { return __builtin_altivec_vcmpequb_p (__CR6_LT, a1, a2); } inline int -vec_all_eq (vector unsigned char a1, vector signed char a2) +vec_all_eq (__vector unsigned char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_all_eq (__vector unsigned char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_eq (vector unsigned char a1, vector unsigned char a2) +vec_all_eq (__vector __bool char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_LT, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_eq (vector signed short a1, vector unsigned short a2) +vec_all_eq (__vector __bool char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_eq (vector signed short a1, vector signed short a2) +vec_all_eq (__vector __bool char a1, __vector signed char a2) { - return __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_eq (vector unsigned short a1, vector signed short a2) +vec_all_eq (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_eq (vector unsigned short a1, vector unsigned short a2) +vec_all_eq (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpequh_p (__CR6_LT, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_eq (vector signed int a1, vector unsigned int a2) +vec_all_eq (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_eq (vector signed int a1, vector signed int a2) +vec_all_eq (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_eq (vector unsigned int a1, vector signed int a2) +vec_all_eq (__vector __bool short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_eq (vector unsigned int a1, vector unsigned int a2) +vec_all_eq (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_LT, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_eq (vector float a1, vector float a2) +vec_all_eq (__vector __bool short a1, __vector signed short a2) +{ + return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); +} + +inline int +vec_all_eq (__vector __pixel a1, __vector __pixel a2) +{ + return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); +} + +inline int +vec_all_eq (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_eq (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_eq (__vector unsigned int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_eq (__vector unsigned int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_eq (__vector __bool int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_eq (__vector __bool int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_eq (__vector __bool int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_eq (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpeqfp_p (__CR6_LT, a1, a2); } @@ -5064,79 +6846,115 @@ vec_all_eq (vector float a1, vector float a2) /* vec_all_ge */ inline int -vec_all_ge (vector signed char a1, vector unsigned char a2) +vec_all_ge (__vector __bool char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_ge (__vector unsigned char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_ge (__vector unsigned char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_ge (__vector __bool char a1, __vector signed char a2) +{ + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_ge (__vector signed char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_ge (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1); } inline int -vec_all_ge (vector unsigned char a1, vector signed char a2) +vec_all_ge (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_ge (vector unsigned char a1, vector unsigned char a2) +vec_all_ge (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_ge (vector signed char a1, vector signed char a2) +vec_all_ge (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_ge (vector signed short a1, vector unsigned short a2) +vec_all_ge (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_ge (vector unsigned short a1, vector signed short a2) +vec_all_ge (__vector __bool short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_ge (vector unsigned short a1, vector unsigned short a2) +vec_all_ge (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_ge (vector signed short a1, vector signed short a2) +vec_all_ge (__vector __bool int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_ge (vector signed int a1, vector unsigned int a2) +vec_all_ge (__vector unsigned int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_ge (vector unsigned int a1, vector signed int a2) +vec_all_ge (__vector unsigned int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_ge (vector unsigned int a1, vector unsigned int a2) +vec_all_ge (__vector __bool int a1, __vector signed int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_ge (vector signed int a1, vector signed int a2) +vec_all_ge (__vector signed int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_ge (vector float a1, vector float a2) +vec_all_ge (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1); +} + +inline int +vec_all_ge (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgefp_p (__CR6_LT, a1, a2); } @@ -5144,79 +6962,115 @@ vec_all_ge (vector float a1, vector float a2) /* vec_all_gt */ inline int -vec_all_gt (vector signed char a1, vector unsigned char a2) +vec_all_gt (__vector __bool char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_all_gt (__vector unsigned char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_all_gt (__vector unsigned char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_gt (vector unsigned char a1, vector signed char a2) +vec_all_gt (__vector __bool char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_gt (vector unsigned char a1, vector unsigned char a2) +vec_all_gt (__vector signed char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_gt (vector signed char a1, vector signed char a2) +vec_all_gt (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_gt (vector signed short a1, vector unsigned short a2) +vec_all_gt (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_gt (vector unsigned short a1, vector signed short a2) +vec_all_gt (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_gt (vector unsigned short a1, vector unsigned short a2) +vec_all_gt (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_gt (vector signed short a1, vector signed short a2) +vec_all_gt (__vector __bool short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_gt (vector signed int a1, vector unsigned int a2) +vec_all_gt (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_gt (vector unsigned int a1, vector signed int a2) +vec_all_gt (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_gt (vector unsigned int a1, vector unsigned int a2) +vec_all_gt (__vector __bool int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_all_gt (vector signed int a1, vector signed int a2) +vec_all_gt (__vector unsigned int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_all_gt (vector float a1, vector float a2) +vec_all_gt (__vector unsigned int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_gt (__vector __bool int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_gt (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_gt (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_gt (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgtfp_p (__CR6_LT, a1, a2); } @@ -5224,7 +7078,7 @@ vec_all_gt (vector float a1, vector float a2) /* vec_all_in */ inline int -vec_all_in (vector float a1, vector float a2) +vec_all_in (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpbfp_p (__CR6_EQ, a1, a2); } @@ -5232,79 +7086,115 @@ vec_all_in (vector float a1, vector float a2) /* vec_all_le */ inline int -vec_all_le (vector signed char a1, vector unsigned char a2) +vec_all_le (__vector __bool char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_all_le (__vector unsigned char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_all_le (__vector unsigned char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_all_le (__vector __bool char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_le (vector unsigned char a1, vector signed char a2) +vec_all_le (__vector signed char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_le (vector unsigned char a1, vector unsigned char a2) +vec_all_le (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_le (vector signed char a1, vector signed char a2) +vec_all_le (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_le (vector signed short a1, vector unsigned short a2) +vec_all_le (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_le (vector unsigned short a1, vector signed short a2) +vec_all_le (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_le (vector unsigned short a1, vector unsigned short a2) +vec_all_le (__vector __bool short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_le (vector signed short a1, vector signed short a2) +vec_all_le (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_le (vector signed int a1, vector unsigned int a2) +vec_all_le (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_le (vector unsigned int a1, vector signed int a2) +vec_all_le (__vector __bool int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_all_le (vector unsigned int a1, vector unsigned int a2) +vec_all_le (__vector unsigned int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_all_le (vector signed int a1, vector signed int a2) +vec_all_le (__vector unsigned int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_all_le (vector float a1, vector float a2) +vec_all_le (__vector __bool int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_le (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_le (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_le (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgefp_p (__CR6_LT, a2, a1); } @@ -5312,79 +7202,115 @@ vec_all_le (vector float a1, vector float a2) /* vec_all_lt */ inline int -vec_all_lt (vector signed char a1, vector unsigned char a2) +vec_all_lt (__vector __bool char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_lt (__vector unsigned char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_lt (__vector unsigned char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_lt (__vector __bool char a1, __vector signed char a2) +{ + return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_all_lt (__vector signed char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1); } inline int -vec_all_lt (vector unsigned char a1, vector signed char a2) +vec_all_lt (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1); } inline int -vec_all_lt (vector unsigned char a1, vector unsigned char a2) +vec_all_lt (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_lt (vector signed char a1, vector signed char a2) +vec_all_lt (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_lt (vector signed short a1, vector unsigned short a2) +vec_all_lt (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_lt (vector unsigned short a1, vector signed short a2) +vec_all_lt (__vector __bool short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_lt (vector unsigned short a1, vector unsigned short a2) +vec_all_lt (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_lt (vector signed short a1, vector signed short a2) +vec_all_lt (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_all_lt (vector signed int a1, vector unsigned int a2) +vec_all_lt (__vector __bool int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_lt (vector unsigned int a1, vector signed int a2) +vec_all_lt (__vector unsigned int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_lt (vector unsigned int a1, vector unsigned int a2) +vec_all_lt (__vector unsigned int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_lt (vector signed int a1, vector signed int a2) +vec_all_lt (__vector __bool int a1, __vector signed int a2) { - return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_all_lt (vector float a1, vector float a2) +vec_all_lt (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1); +} + +inline int +vec_all_lt (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1); +} + +inline int +vec_all_lt (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgtfp_p (__CR6_LT, a2, a1); } @@ -5392,7 +7318,7 @@ vec_all_lt (vector float a1, vector float a2) /* vec_all_nan */ inline int -vec_all_nan (vector float a1) +vec_all_nan (__vector float a1) { return __builtin_altivec_vcmpeqfp_p (__CR6_EQ, a1, a1); } @@ -5400,79 +7326,139 @@ vec_all_nan (vector float a1) /* vec_all_ne */ inline int -vec_all_ne (vector signed char a1, vector unsigned char a2) +vec_all_ne (__vector signed char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_all_ne (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_ne (vector signed char a1, vector signed char a2) +vec_all_ne (__vector unsigned char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_ne (vector unsigned char a1, vector signed char a2) +vec_all_ne (__vector unsigned char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_ne (vector unsigned char a1, vector unsigned char a2) +vec_all_ne (__vector __bool char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_ne (vector signed short a1, vector unsigned short a2) +vec_all_ne (__vector __bool char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_ne (vector signed short a1, vector signed short a2) +vec_all_ne (__vector __bool char a1, __vector signed char a2) { - return __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_all_ne (vector unsigned short a1, vector signed short a2) +vec_all_ne (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_ne (vector unsigned short a1, vector unsigned short a2) +vec_all_ne (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_ne (vector signed int a1, vector unsigned int a2) +vec_all_ne (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_ne (vector signed int a1, vector signed int a2) +vec_all_ne (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_ne (vector unsigned int a1, vector signed int a2) +vec_all_ne (__vector __bool short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_ne (vector unsigned int a1, vector unsigned int a2) +vec_all_ne (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_EQ, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_all_ne (vector float a1, vector float a2) +vec_all_ne (__vector __bool short a1, __vector signed short a2) +{ + return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); +} + +inline int +vec_all_ne (__vector __pixel a1, __vector __pixel a2) +{ + return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2); +} + +inline int +vec_all_ne (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_ne (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_ne (__vector unsigned int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_ne (__vector unsigned int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_ne (__vector __bool int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_ne (__vector __bool int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_ne (__vector __bool int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_all_ne (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpeqfp_p (__CR6_EQ, a1, a2); } @@ -5480,7 +7466,7 @@ vec_all_ne (vector float a1, vector float a2) /* vec_all_nge */ inline int -vec_all_nge (vector float a1, vector float a2) +vec_all_nge (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgefp_p (__CR6_EQ, a1, a2); } @@ -5488,7 +7474,7 @@ vec_all_nge (vector float a1, vector float a2) /* vec_all_ngt */ inline int -vec_all_ngt (vector float a1, vector float a2) +vec_all_ngt (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgtfp_p (__CR6_EQ, a1, a2); } @@ -5496,7 +7482,7 @@ vec_all_ngt (vector float a1, vector float a2) /* vec_all_nle */ inline int -vec_all_nle (vector float a1, vector float a2) +vec_all_nle (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgefp_p (__CR6_EQ, a2, a1); } @@ -5504,7 +7490,7 @@ vec_all_nle (vector float a1, vector float a2) /* vec_all_nlt */ inline int -vec_all_nlt (vector float a1, vector float a2) +vec_all_nlt (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgtfp_p (__CR6_EQ, a2, a1); } @@ -5512,7 +7498,7 @@ vec_all_nlt (vector float a1, vector float a2) /* vec_all_numeric */ inline int -vec_all_numeric (vector float a1) +vec_all_numeric (__vector float a1) { return __builtin_altivec_vcmpeqfp_p (__CR6_LT, a1, a1); } @@ -5520,79 +7506,139 @@ vec_all_numeric (vector float a1) /* vec_any_eq */ inline int -vec_any_eq (vector signed char a1, vector unsigned char a2) +vec_any_eq (__vector signed char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_any_eq (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_eq (vector signed char a1, vector signed char a2) +vec_any_eq (__vector unsigned char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_eq (vector unsigned char a1, vector signed char a2) +vec_any_eq (__vector unsigned char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_eq (vector unsigned char a1, vector unsigned char a2) +vec_any_eq (__vector __bool char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_eq (vector signed short a1, vector unsigned short a2) +vec_any_eq (__vector __bool char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_eq (vector signed short a1, vector signed short a2) +vec_any_eq (__vector __bool char a1, __vector signed char a2) { - return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_eq (vector unsigned short a1, vector signed short a2) +vec_any_eq (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_eq (vector unsigned short a1, vector unsigned short a2) +vec_any_eq (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_eq (vector signed int a1, vector unsigned int a2) +vec_any_eq (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_eq (vector signed int a1, vector signed int a2) +vec_any_eq (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_eq (vector unsigned int a1, vector signed int a2) +vec_any_eq (__vector __bool short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_eq (vector unsigned int a1, vector unsigned int a2) +vec_any_eq (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_eq (vector float a1, vector float a2) +vec_any_eq (__vector __bool short a1, __vector signed short a2) +{ + return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); +} + +inline int +vec_any_eq (__vector __pixel a1, __vector __pixel a2) +{ + return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); +} + +inline int +vec_any_eq (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_eq (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_eq (__vector unsigned int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_eq (__vector unsigned int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_eq (__vector __bool int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_eq (__vector __bool int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_eq (__vector __bool int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_eq (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, a1, a2); } @@ -5600,79 +7646,115 @@ vec_any_eq (vector float a1, vector float a2) /* vec_any_ge */ inline int -vec_any_ge (vector signed char a1, vector unsigned char a2) +vec_any_ge (__vector signed char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_ge (__vector unsigned char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_ge (__vector unsigned char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_ge (__vector signed char a1, __vector signed char a2) +{ + return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_ge (__vector __bool char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_ge (__vector __bool char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1); } inline int -vec_any_ge (vector unsigned char a1, vector signed char a2) +vec_any_ge (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_ge (vector unsigned char a1, vector unsigned char a2) +vec_any_ge (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_ge (vector signed char a1, vector signed char a2) +vec_any_ge (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_ge (vector signed short a1, vector unsigned short a2) +vec_any_ge (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_ge (vector unsigned short a1, vector signed short a2) +vec_any_ge (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_ge (vector unsigned short a1, vector unsigned short a2) +vec_any_ge (__vector __bool short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_ge (vector signed short a1, vector signed short a2) +vec_any_ge (__vector signed int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_ge (vector signed int a1, vector unsigned int a2) +vec_any_ge (__vector unsigned int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_ge (vector unsigned int a1, vector signed int a2) +vec_any_ge (__vector unsigned int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_ge (vector unsigned int a1, vector unsigned int a2) +vec_any_ge (__vector signed int a1, __vector signed int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_ge (vector signed int a1, vector signed int a2) +vec_any_ge (__vector __bool int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_ge (vector float a1, vector float a2) +vec_any_ge (__vector __bool int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1); +} + +inline int +vec_any_ge (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, a1, a2); } @@ -5680,79 +7762,115 @@ vec_any_ge (vector float a1, vector float a2) /* vec_any_gt */ inline int -vec_any_gt (vector signed char a1, vector unsigned char a2) +vec_any_gt (__vector __bool char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_gt (vector unsigned char a1, vector signed char a2) +vec_any_gt (__vector unsigned char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_gt (vector unsigned char a1, vector unsigned char a2) +vec_any_gt (__vector unsigned char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_gt (vector signed char a1, vector signed char a2) +vec_any_gt (__vector __bool char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_gt (vector signed short a1, vector unsigned short a2) +vec_any_gt (__vector signed char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_gt (vector unsigned short a1, vector signed short a2) +vec_any_gt (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_gt (vector unsigned short a1, vector unsigned short a2) +vec_any_gt (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_gt (vector signed short a1, vector signed short a2) +vec_any_gt (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_gt (vector signed int a1, vector unsigned int a2) +vec_any_gt (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_gt (vector unsigned int a1, vector signed int a2) +vec_any_gt (__vector __bool short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_gt (vector unsigned int a1, vector unsigned int a2) +vec_any_gt (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_gt (vector signed int a1, vector signed int a2) +vec_any_gt (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_gt (vector float a1, vector float a2) +vec_any_gt (__vector __bool int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_gt (__vector unsigned int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_gt (__vector unsigned int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_gt (__vector __bool int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_gt (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_gt (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_gt (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, a1, a2); } @@ -5760,79 +7878,115 @@ vec_any_gt (vector float a1, vector float a2) /* vec_any_le */ inline int -vec_any_le (vector signed char a1, vector unsigned char a2) +vec_any_le (__vector __bool char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_any_le (__vector unsigned char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_any_le (__vector unsigned char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_any_le (__vector __bool char a1, __vector signed char a2) +{ + return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_any_le (__vector signed char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_any_le (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_le (vector unsigned char a1, vector signed char a2) +vec_any_le (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_le (vector unsigned char a1, vector unsigned char a2) +vec_any_le (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_le (vector signed char a1, vector signed char a2) +vec_any_le (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_le (vector signed short a1, vector unsigned short a2) +vec_any_le (__vector __bool short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_le (vector unsigned short a1, vector signed short a2) +vec_any_le (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_le (vector unsigned short a1, vector unsigned short a2) +vec_any_le (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_le (vector signed short a1, vector signed short a2) +vec_any_le (__vector __bool int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_any_le (vector signed int a1, vector unsigned int a2) +vec_any_le (__vector unsigned int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_any_le (vector unsigned int a1, vector signed int a2) +vec_any_le (__vector unsigned int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_any_le (vector unsigned int a1, vector unsigned int a2) +vec_any_le (__vector __bool int a1, __vector signed int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_any_le (vector signed int a1, vector signed int a2) +vec_any_le (__vector signed int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); } inline int -vec_any_le (vector float a1, vector float a2) +vec_any_le (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_le (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, a2, a1); } @@ -5840,79 +7994,115 @@ vec_any_le (vector float a1, vector float a2) /* vec_any_lt */ inline int -vec_any_lt (vector signed char a1, vector unsigned char a2) +vec_any_lt (__vector __bool char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_lt (__vector unsigned char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_lt (__vector unsigned char a1, __vector unsigned char a2) +{ + return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_lt (__vector __bool char a1, __vector signed char a2) +{ + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1); +} + +inline int +vec_any_lt (__vector signed char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1); } inline int -vec_any_lt (vector unsigned char a1, vector signed char a2) +vec_any_lt (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1); } inline int -vec_any_lt (vector unsigned char a1, vector unsigned char a2) +vec_any_lt (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_lt (vector signed char a1, vector signed char a2) +vec_any_lt (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (vector signed char) a2, (vector signed char) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_lt (vector signed short a1, vector unsigned short a2) +vec_any_lt (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_lt (vector unsigned short a1, vector signed short a2) +vec_any_lt (__vector __bool short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_lt (vector unsigned short a1, vector unsigned short a2) +vec_any_lt (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_lt (vector signed short a1, vector signed short a2) +vec_any_lt (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (vector signed short) a2, (vector signed short) a1); + return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1); } inline int -vec_any_lt (vector signed int a1, vector unsigned int a2) +vec_any_lt (__vector __bool int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_lt (vector unsigned int a1, vector signed int a2) +vec_any_lt (__vector unsigned int a1, __vector __bool int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_lt (vector unsigned int a1, vector unsigned int a2) +vec_any_lt (__vector unsigned int a1, __vector unsigned int a2) { - return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_lt (vector signed int a1, vector signed int a2) +vec_any_lt (__vector __bool int a1, __vector signed int a2) { - return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (vector signed int) a2, (vector signed int) a1); + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1); } inline int -vec_any_lt (vector float a1, vector float a2) +vec_any_lt (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1); +} + +inline int +vec_any_lt (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1); +} + +inline int +vec_any_lt (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, a2, a1); } @@ -5920,7 +8110,7 @@ vec_any_lt (vector float a1, vector float a2) /* vec_any_nan */ inline int -vec_any_nan (vector float a1) +vec_any_nan (__vector float a1) { return __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, a1, a1); } @@ -5928,79 +8118,139 @@ vec_any_nan (vector float a1) /* vec_any_ne */ inline int -vec_any_ne (vector signed char a1, vector unsigned char a2) +vec_any_ne (__vector signed char a1, __vector __bool char a2) +{ + return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); +} + +inline int +vec_any_ne (__vector signed char a1, __vector signed char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_ne (vector signed char a1, vector signed char a2) +vec_any_ne (__vector unsigned char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_ne (vector unsigned char a1, vector signed char a2) +vec_any_ne (__vector unsigned char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_ne (vector unsigned char a1, vector unsigned char a2) +vec_any_ne (__vector __bool char a1, __vector __bool char a2) { - return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) a1, (vector signed char) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_ne (vector signed short a1, vector unsigned short a2) +vec_any_ne (__vector __bool char a1, __vector unsigned char a2) { - return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_ne (vector signed short a1, vector signed short a2) +vec_any_ne (__vector __bool char a1, __vector signed char a2) { - return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2); } inline int -vec_any_ne (vector unsigned short a1, vector signed short a2) +vec_any_ne (__vector signed short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_ne (vector unsigned short a1, vector unsigned short a2) +vec_any_ne (__vector signed short a1, __vector signed short a2) { - return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) a1, (vector signed short) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_ne (vector signed int a1, vector unsigned int a2) +vec_any_ne (__vector unsigned short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_ne (vector signed int a1, vector signed int a2) +vec_any_ne (__vector unsigned short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_ne (vector unsigned int a1, vector signed int a2) +vec_any_ne (__vector __bool short a1, __vector __bool short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_ne (vector unsigned int a1, vector unsigned int a2) +vec_any_ne (__vector __bool short a1, __vector unsigned short a2) { - return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (vector signed int) a1, (vector signed int) a2); + return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); } inline int -vec_any_ne (vector float a1, vector float a2) +vec_any_ne (__vector __bool short a1, __vector signed short a2) +{ + return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); +} + +inline int +vec_any_ne (__vector __pixel a1, __vector __pixel a2) +{ + return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2); +} + +inline int +vec_any_ne (__vector signed int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_ne (__vector signed int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_ne (__vector unsigned int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_ne (__vector unsigned int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_ne (__vector __bool int a1, __vector __bool int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_ne (__vector __bool int a1, __vector unsigned int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_ne (__vector __bool int a1, __vector signed int a2) +{ + return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2); +} + +inline int +vec_any_ne (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, a1, a2); } @@ -6008,7 +8258,7 @@ vec_any_ne (vector float a1, vector float a2) /* vec_any_nge */ inline int -vec_any_nge (vector float a1, vector float a2) +vec_any_nge (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, a1, a2); } @@ -6016,7 +8266,7 @@ vec_any_nge (vector float a1, vector float a2) /* vec_any_ngt */ inline int -vec_any_ngt (vector float a1, vector float a2) +vec_any_ngt (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, a1, a2); } @@ -6024,7 +8274,7 @@ vec_any_ngt (vector float a1, vector float a2) /* vec_any_nle */ inline int -vec_any_nle (vector float a1, vector float a2) +vec_any_nle (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, a2, a1); } @@ -6032,7 +8282,7 @@ vec_any_nle (vector float a1, vector float a2) /* vec_any_nlt */ inline int -vec_any_nlt (vector float a1, vector float a2) +vec_any_nlt (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, a2, a1); } @@ -6040,7 +8290,7 @@ vec_any_nlt (vector float a1, vector float a2) /* vec_any_numeric */ inline int -vec_any_numeric (vector float a1) +vec_any_numeric (__vector float a1) { return __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, a1, a1); } @@ -6048,2480 +8298,3208 @@ vec_any_numeric (vector float a1) /* vec_any_out */ inline int -vec_any_out (vector float a1, vector float a2) +vec_any_out (__vector float a1, __vector float a2) { return __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, a1, a2); } -/* vec_step */ - -template<typename _Tp> -struct __vec_step_help -{ - // All proper vector types will specialize _S_elem. -}; - -template<> -struct __vec_step_help<vector signed short> -{ - static const int _S_elem = 8; -}; +} /* extern "C++" */ -template<> -struct __vec_step_help<vector unsigned short> -{ - static const int _S_elem = 8; -}; - -template<> -struct __vec_step_help<vector signed int> -{ - static const int _S_elem = 4; -}; - -template<> -struct __vec_step_help<vector unsigned int> -{ - static const int _S_elem = 4; -}; +#else /* not C++ */ -template<> -struct __vec_step_help<vector unsigned char> -{ - static const int _S_elem = 16; -}; +/* "... and so I think no man in a century will suffer as greatly as + you will." */ -template<> -struct __vec_step_help<vector signed char> -{ - static const int _S_elem = 16; -}; +/* Helper macros. */ -template<> -struct __vec_step_help<vector float> -{ - static const int _S_elem = 4; -}; +#define __un_args_eq(xtype, x) \ + __builtin_types_compatible_p (xtype, typeof (x)) -#define vec_step(t) __vec_step_help<typeof(t)>::_S_elem +#define __bin_args_eq(xtype, x, ytype, y) \ + (__builtin_types_compatible_p (xtype, typeof (x)) \ + && __builtin_types_compatible_p (ytype, typeof (y))) -}//extern "C++" +#define __tern_args_eq(xtype, x, ytype, y, ztype, z) \ + (__builtin_types_compatible_p (xtype, typeof (x)) \ + && __builtin_types_compatible_p (ytype, typeof (y)) \ + && __builtin_types_compatible_p (ztype, typeof (z))) -#else /* not C++ */ +#define __ch(x, y, z) __builtin_choose_expr (x, y, z) -/* "... and so I think no man in a century will suffer as greatly as - you will." */ +#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, \ + __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))), \ - __altivec_link_error_invalid_argument ())))) + __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))), \ - __altivec_link_error_invalid_argument ()))) - -#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 signed short), 8, \ - __ch (__builtin_types_compatible_p (typeof (t), vector unsigned short), 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 float), 4, \ - __altivec_link_error_invalid_argument ()))))))) + __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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ()) +__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 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 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 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 float, (a1), vector float, (a2)), \ - ((vector float) __builtin_altivec_vaddfp ((vector float) (a1), (vector float) (a2))), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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 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 signed char, (a2)), \ - ((vector signed char) __builtin_altivec_vaddsbs ((vector signed char) (a1), (vector signed char) (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 signed short, (a2)), \ - ((vector signed short) __builtin_altivec_vaddshs ((vector signed short) (a1), (vector signed short) (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 signed int, (a2)), \ - ((vector signed int) __builtin_altivec_vaddsws ((vector signed int) (a1), (vector signed int) (a2))), \ - __altivec_link_error_invalid_argument ())))))))))))) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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_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))), \ - __altivec_link_error_invalid_argument ()))) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ()) +__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 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))), \ + __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))), \ - __altivec_link_error_invalid_argument ()))) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ()))) +__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))), \ + __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 signed int, (a2)), \ - ((vector float) __builtin_altivec_vand ((vector signed int) (a1), (vector signed int) (a2))), \ -__ch (__bin_args_eq (vector signed int, (a1), vector float, (a2)), \ - ((vector float) __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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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))), \ - __altivec_link_error_invalid_argument ()))))))))))))))) +__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 unsigned int, (a2)), \ - ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ -__ch (__bin_args_eq (vector unsigned int, (a1), vector float, (a2)), \ - ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ -__ch (__bin_args_eq (vector signed int, (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 signed int, (a2)), \ - ((vector float) __builtin_altivec_vandc ((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_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 unsigned int, (a1), vector signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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 unsigned char, (a1), vector signed char, (a2)), \ - ((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \ - __altivec_link_error_invalid_argument ()))))))))))))))))))))))) +__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))), \ - __altivec_link_error_invalid_argument ())))))) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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) __builtin_altivec_vrfip ((a1)) +#define vec_ceil(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) __builtin_altivec_vcmpbfp ((a1), (a2)) +#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))), \ + __builtin_altivec_compiletime_error ("vec_cmpb")) #define vec_cmpeq(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 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 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 float, (a1), vector float, (a2)), \ - ((vector signed int) __builtin_altivec_vcmpeqfp ((vector float) (a1), (vector float) (a2))), \ - __altivec_link_error_invalid_argument ()))))))) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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_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))), \ - __altivec_link_error_invalid_argument ())) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ())) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ())) +__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))), \ + __builtin_altivec_compiletime_error ("vec_vcmpequb"))) -#define vec_cmpge(a1, a2) (vector signed int) __builtin_altivec_vcmpgefp ((a1), (a2)) +#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))), \ + __builtin_altivec_compiletime_error ("vec_cmpge")) #define vec_cmpgt(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 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 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 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 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 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 float, (a1), vector float, (a2)), \ - ((vector signed int) __builtin_altivec_vcmpgtfp ((vector float) (a1), (vector float) (a2))), \ - __altivec_link_error_invalid_argument ()))))))) +__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))), \ - __altivec_link_error_invalid_argument ()) +__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_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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ + __builtin_altivec_compiletime_error ("vec_vcmpgtsw")) #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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ + __builtin_altivec_compiletime_error ("vec_vcmpgtuw")) #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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ + __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))), \ - __altivec_link_error_invalid_argument ()) +__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))), \ + __builtin_altivec_compiletime_error ("vec_vcmpgtub")) -#define vec_cmple(a1, a2) __builtin_altivec_vcmpgefp ((a2), (a1)) +#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))), \ + __builtin_altivec_compiletime_error ("vec_cmple")) #define vec_cmplt(a2, a1) \ -__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 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 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 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 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 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 float, (a1), vector float, (a2)), \ - ((vector signed int) __builtin_altivec_vcmpgtfp ((vector float) (a1), (vector float) (a2))), \ - __altivec_link_error_invalid_argument ()))))))) +__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 (__bin_args_eq (vector unsigned int, (a1), int, (a2)), \ - ((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const char) (a2))), \ -__ch (__bin_args_eq (vector signed int, (a1), int, (a2)), \ - ((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const char) (a2))), \ -__ch (__bin_args_eq (vector unsigned int, (a1), unsigned int, (a2)), \ - ((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const char) (a2))), \ -__ch (__bin_args_eq (vector signed int, (a1), unsigned int, (a2)), \ - ((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const char) (a2))), \ - __altivec_link_error_invalid_argument ())))) +__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 (__bin_args_eq (vector signed int, (a1), int, (a2)), \ - ((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const char) (a2))), \ -__ch (__bin_args_eq (vector signed int, (a1), unsigned int, (a2)), \ - ((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const char) (a2))), \ - __altivec_link_error_invalid_argument ())) +__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 (__bin_args_eq (vector unsigned int, (a1), int, (a2)), \ - ((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const char) (a2))), \ -__ch (__bin_args_eq (vector unsigned int, (a1), unsigned int, (a2)), \ - ((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const char) (a2))), \ - __altivec_link_error_invalid_argument ())) +__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) __builtin_altivec_vctsxs ((a1), (a2)) +#define vec_cts(a1, 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) (vector unsigned int) __builtin_altivec_vctuxs ((a1), (a2)) +#define vec_ctu(a1, 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 ((a1)) +#define vec_dss(a1) __builtin_altivec_dss ((const int) (a1)); #define vec_dssall() __builtin_altivec_dssall () #define vec_dst(a1, a2, a3) \ -__ch (__un_args_eq (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)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed char, *(a1)), \ +__ch (__un_args_eq (const __vector __bool char, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector unsigned short, *(a1)), \ +__ch (__un_args_eq (const __vector unsigned short, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed short, *(a1)), \ +__ch (__un_args_eq (const __vector signed short, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector unsigned int, *(a1)), \ +__ch (__un_args_eq (const __vector __bool short, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed int, *(a1)), \ +__ch (__un_args_eq (const __vector __pixel, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector float, *(a1)), \ +__ch (__un_args_eq (const __vector unsigned int, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned char, *(a1)), \ +__ch (__un_args_eq (const __vector signed int, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed char, *(a1)), \ +__ch (__un_args_eq (const __vector __bool int, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned short, *(a1)), \ +__ch (__un_args_eq (const __vector float, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed short, *(a1)), \ +__ch (__un_args_eq (const unsigned char, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned int, *(a1)), \ +__ch (__un_args_eq (const signed char, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed int, *(a1)), \ +__ch (__un_args_eq (const unsigned short, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned long, *(a1)), \ +__ch (__un_args_eq (const short, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed long, *(a1)), \ +__ch (__un_args_eq (const unsigned int, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (float, *(a1)), \ +__ch (__un_args_eq (const int, *(a1)), \ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ - __altivec_link_error_invalid_argument ())))))))))))))))) +__ch (__un_args_eq (const unsigned long, *(a1)), \ + __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ +__ch (__un_args_eq (const long, *(a1)), \ + __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ +__ch (__un_args_eq (const float, *(a1)), \ + __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \ + __builtin_altivec_compiletime_error ("vec_dst"))))))))))))))))))))) #define vec_dstst(a1, a2, a3) \ -__ch (__un_args_eq (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)), \ + __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ +__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)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed char, *(a1)), \ +__ch (__un_args_eq (const __vector signed short, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector unsigned short, *(a1)), \ +__ch (__un_args_eq (const __vector __bool short, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed short, *(a1)), \ +__ch (__un_args_eq (const __vector __pixel, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector unsigned int, *(a1)), \ +__ch (__un_args_eq (const __vector unsigned int, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed int, *(a1)), \ +__ch (__un_args_eq (const __vector signed int, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector float, *(a1)), \ +__ch (__un_args_eq (const __vector __bool int, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned char, *(a1)), \ +__ch (__un_args_eq (const __vector float, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed char, *(a1)), \ +__ch (__un_args_eq (const unsigned char, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned short, *(a1)), \ +__ch (__un_args_eq (const signed char, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed short, *(a1)), \ +__ch (__un_args_eq (const unsigned short, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned int, *(a1)), \ +__ch (__un_args_eq (const short, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed int, *(a1)), \ +__ch (__un_args_eq (const unsigned int, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned long, *(a1)), \ +__ch (__un_args_eq (const int, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed long, *(a1)), \ +__ch (__un_args_eq (const unsigned long, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (float, *(a1)), \ +__ch (__un_args_eq (const long, *(a1)), \ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ - __altivec_link_error_invalid_argument ())))))))))))))))) +__ch (__un_args_eq (const float, *(a1)), \ + __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \ + __builtin_altivec_compiletime_error ("vec_dstst"))))))))))))))))))))) #define vec_dststt(a1, a2, a3) \ -__ch (__un_args_eq (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)), \ + __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ +__ch (__un_args_eq (const __vector __bool char, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed char, *(a1)), \ +__ch (__un_args_eq (const __vector unsigned short, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector unsigned short, *(a1)), \ +__ch (__un_args_eq (const __vector signed short, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed short, *(a1)), \ +__ch (__un_args_eq (const __vector __bool short, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector unsigned int, *(a1)), \ +__ch (__un_args_eq (const __vector __pixel, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed int, *(a1)), \ +__ch (__un_args_eq (const __vector unsigned int, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector float, *(a1)), \ +__ch (__un_args_eq (const __vector signed int, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned char, *(a1)), \ +__ch (__un_args_eq (const __vector __bool int, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed char, *(a1)), \ +__ch (__un_args_eq (const __vector float, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned short, *(a1)), \ +__ch (__un_args_eq (const unsigned char, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed short, *(a1)), \ +__ch (__un_args_eq (const signed char, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned int, *(a1)), \ +__ch (__un_args_eq (const unsigned short, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed int, *(a1)), \ +__ch (__un_args_eq (const short, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned long, *(a1)), \ +__ch (__un_args_eq (const unsigned int, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed long, *(a1)), \ +__ch (__un_args_eq (const int, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (float, *(a1)), \ +__ch (__un_args_eq (const unsigned long, *(a1)), \ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ - __altivec_link_error_invalid_argument ())))))))))))))))) +__ch (__un_args_eq (const long, *(a1)), \ + __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ +__ch (__un_args_eq (const float, *(a1)), \ + __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \ + __builtin_altivec_compiletime_error ("vec_dststt"))))))))))))))))))))) #define vec_dstt(a1, a2, a3) \ -__ch (__un_args_eq (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)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed char, *(a1)), \ +__ch (__un_args_eq (const __vector __bool char, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector unsigned short, *(a1)), \ +__ch (__un_args_eq (const __vector unsigned short, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed short, *(a1)), \ +__ch (__un_args_eq (const __vector signed short, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector unsigned int, *(a1)), \ +__ch (__un_args_eq (const __vector __bool short, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector signed int, *(a1)), \ +__ch (__un_args_eq (const __vector __pixel, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (vector float, *(a1)), \ +__ch (__un_args_eq (const __vector unsigned int, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned char, *(a1)), \ +__ch (__un_args_eq (const __vector signed int, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed char, *(a1)), \ +__ch (__un_args_eq (const __vector __bool int, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned short, *(a1)), \ +__ch (__un_args_eq (const __vector float, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed short, *(a1)), \ +__ch (__un_args_eq (const unsigned char, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned int, *(a1)), \ +__ch (__un_args_eq (const signed char, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed int, *(a1)), \ +__ch (__un_args_eq (const unsigned short, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (unsigned long, *(a1)), \ +__ch (__un_args_eq (const short, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (signed long, *(a1)), \ +__ch (__un_args_eq (const unsigned int, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ -__ch (__un_args_eq (float, *(a1)), \ +__ch (__un_args_eq (const int, *(a1)), \ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ - __altivec_link_error_invalid_argument ())))))))))))))))) +__ch (__un_args_eq (const unsigned long, *(a1)), \ + __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ +__ch (__un_args_eq (const long, *(a1)), \ + __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ +__ch (__un_args_eq (const float, *(a1)), \ + __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \ + __builtin_altivec_compiletime_error ("vec_dstt"))))))))))))))))))))) -#define vec_expte(a1) __builtin_altivec_vexptefp ((a1)) +#define vec_expte(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) __builtin_altivec_vrfim (a1) +#define vec_floor(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 (vector unsigned char, *(b)), \ - ((vector unsigned char) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (unsigned char, *(b)), \ - ((vector unsigned char) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (vector signed char, *(b)), \ - ((vector signed char) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (signed char, *(b)), \ - ((vector signed char) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (vector unsigned short, *(b)), \ - ((vector unsigned short) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (unsigned short, *(b)), \ - ((vector unsigned short) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (vector signed short, *(b)), \ - ((vector signed short) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (signed short, *(b)), \ - ((vector signed short) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (vector unsigned int, *(b)), \ - ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (unsigned int, *(b)), \ - ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (unsigned long, *(b)), \ - ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (vector signed int, *(b)), \ - ((vector signed int) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (signed int, *(b)), \ - ((vector signed int) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (signed long, *(b)), \ - ((vector signed int) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (vector float, *(b)), \ - ((vector float) __builtin_altivec_lvx ((a), (b))), \ -__ch (__un_args_eq (float, *(b)), \ - ((vector float) __builtin_altivec_lvx ((a), (b))), \ -__altivec_link_error_invalid_argument ())))))))))))))))) +__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))), \ +__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))), \ +__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))), \ +__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))), \ +__ch (__un_args_eq (const unsigned int, *(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))), \ +__ch (__un_args_eq (const int, *(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))), \ +__ch (__un_args_eq (const float, *(b)), \ + ((__vector float) __builtin_altivec_lvx ((a), (b))), \ +__builtin_altivec_compiletime_error ("vec_ld"))))))))))))))))))))) #define vec_lde(a, b) \ -__ch (__un_args_eq (unsigned char, *(b)), \ - ((vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \ -__ch (__un_args_eq (signed char, *(b)), \ - ((vector signed char) __builtin_altivec_lvebx ((a), (b))), \ -__ch (__un_args_eq (unsigned short, *(b)), \ - ((vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \ -__ch (__un_args_eq (signed short, *(b)), \ - ((vector signed short) __builtin_altivec_lvehx ((a), (b))), \ -__ch (__un_args_eq (unsigned long, *(b)), \ - ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ -__ch (__un_args_eq (signed long, *(b)), \ - ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \ -__ch (__un_args_eq (unsigned int, *(b)), \ - ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \ -__ch (__un_args_eq (signed int, *(b)), \ - ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \ -__ch (__un_args_eq (float, *(b)), \ - ((vector float) __builtin_altivec_lvewx ((a), (b))), \ -__altivec_link_error_invalid_argument ()))))))))) +__ch (__un_args_eq (const unsigned char, *(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))), \ +__ch (__un_args_eq (const unsigned short, *(b)), \ + ((__vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \ +__ch (__un_args_eq (const short, *(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))), \ +__ch (__un_args_eq (const long, *(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))), \ +__ch (__un_args_eq (const int, *(b)), \ + ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \ +__ch (__un_args_eq (const float, *(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))), \ -__altivec_link_error_invalid_argument ()))))) + ((__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))), \ -__altivec_link_error_invalid_argument ())) + ((__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))), \ -__altivec_link_error_invalid_argument ())) + ((__vector signed char) __builtin_altivec_lvebx ((a), (b))), \ +__builtin_altivec_compiletime_error ("vec_lvebx"))) #define vec_ldl(a, b) \ -__ch (__un_args_eq (vector unsigned char, *(b)), \ - ((vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (unsigned char, *(b)), \ - ((vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (vector signed char, *(b)), \ - ((vector signed char) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (signed char, *(b)), \ - ((vector signed char) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (vector unsigned short, *(b)), \ - ((vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (unsigned short, *(b)), \ - ((vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (vector signed short, *(b)), \ - ((vector signed short) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (signed short, *(b)), \ - ((vector signed short) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (vector unsigned int, *(b)), \ - ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (unsigned int, *(b)), \ - ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (unsigned long, *(b)), \ - ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (vector signed int, *(b)), \ - ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (signed int, *(b)), \ - ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (signed long, *(b)), \ - ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (vector float, *(b)), \ - ((vector float) __builtin_altivec_lvxl ((a), (b))), \ -__ch (__un_args_eq (float, *(b)), \ - ((vector float) __builtin_altivec_lvxl ((a), (b))), \ -__altivec_link_error_invalid_argument ())))))))))))))))) - -#define vec_loge(a1) __builtin_altivec_vlogefp ((a1)) +__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))), \ +__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))), \ +__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))), \ +__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))), \ +__ch (__un_args_eq (const unsigned int, *(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))), \ +__ch (__un_args_eq (const int, *(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))), \ +__ch (__un_args_eq (const float, *(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))), \ + __builtin_altivec_compiletime_error ("vec_loge")) #define vec_lvsl(a1, a2) \ -__ch (__un_args_eq (unsigned char, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__ch (__un_args_eq (signed char, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__ch (__un_args_eq (unsigned short, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__ch (__un_args_eq (signed short, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__ch (__un_args_eq (unsigned int, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__ch (__un_args_eq (signed int, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__ch (__un_args_eq (unsigned long, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__ch (__un_args_eq (signed long, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__ch (__un_args_eq (float, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \ -__altivec_link_error_invalid_argument ()))))))))) +__ch (__un_args_eq (const volatile unsigned char, *(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))), \ +__ch (__un_args_eq (const volatile unsigned short, *(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))), \ +__ch (__un_args_eq (const volatile unsigned int, *(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))), \ +__ch (__un_args_eq (const volatile unsigned long, *(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))), \ +__ch (__un_args_eq (const volatile float, *(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 (unsigned char, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__ch (__un_args_eq (signed char, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__ch (__un_args_eq (unsigned short, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__ch (__un_args_eq (signed short, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__ch (__un_args_eq (unsigned int, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__ch (__un_args_eq (signed int, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__ch (__un_args_eq (unsigned long, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__ch (__un_args_eq (signed long, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__ch (__un_args_eq (float, *(a2)), \ - ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \ -__altivec_link_error_invalid_argument ()))))))))) - -#define vec_madd(a1, a2, a3) (__builtin_altivec_vmaddfp ((a1), (a2), (a3))) - -#define vec_madds(a1, a2, a3) __builtin_altivec_vmhaddshs ((a1), (a2), (a3)) +__ch (__un_args_eq (const volatile unsigned char, *(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))), \ +__ch (__un_args_eq (const volatile unsigned short, *(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))), \ +__ch (__un_args_eq (const volatile unsigned int, *(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))), \ +__ch (__un_args_eq (const volatile unsigned long, *(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))), \ +__ch (__un_args_eq (const volatile float, *(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))), \ +__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))), \ +__builtin_altivec_compiletime_error ("vec_madds")) #define vec_max(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 signed char, (a2)), \ - ((vector signed char) __builtin_altivec_vmaxsb ((vector signed char) (a1), (vector signed char) (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 signed short, (a2)), \ - ((vector signed short) __builtin_altivec_vmaxsh ((vector signed short) (a1), (vector signed short) (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 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))), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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 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 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))), \ - __altivec_link_error_invalid_argument ()))))))) +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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 __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 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))), \ -__altivec_link_error_invalid_argument ())) +__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 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 __pixel, (a1), __vector __pixel, (a2)), \ + ((__vector __pixel) __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))), \ -__altivec_link_error_invalid_argument ())) +__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 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 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 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))), \ - __altivec_link_error_invalid_argument ()))))))) +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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_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))), \ -__altivec_link_error_invalid_argument ())) +__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 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 __pixel, (a1), __vector __pixel, (a2)), \ + ((__vector __pixel) __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))), \ -__altivec_link_error_invalid_argument ())) +__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 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 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 signed char, (a2)), \ - ((vector signed char) __builtin_altivec_vminsb ((vector signed char) (a1), (vector signed char) (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 signed short, (a2)), \ - ((vector signed short) __builtin_altivec_vminsh ((vector signed short) (a1), (vector signed short) (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 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))), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ +__builtin_altivec_compiletime_error ("vec_minsb")))) #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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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))), \ - __altivec_link_error_invalid_argument ())))) - -#define vec_mradds(a1, a2, a3) __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_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))), \ +__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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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_vmsummbm")) #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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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 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 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)), \ - __altivec_link_error_invalid_argument ())))))) +__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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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)))), \ - __altivec_link_error_invalid_argument ()) +__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 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 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))), \ - __altivec_link_error_invalid_argument ()))))))) +__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 signed int, (a2)), \ - ((vector float) __builtin_altivec_vor ((vector signed int) (a1), (vector signed int) (a2))), \ -__ch (__bin_args_eq (vector signed int, (a1), vector float, (a2)), \ - ((vector float) __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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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))), \ - __altivec_link_error_invalid_argument ()))))))))))))))) +__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 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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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 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))), \ -__altivec_link_error_invalid_argument ())) +__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 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 unsigned short) __builtin_altivec_vpkpx ((vector signed int) (a1), (vector signed int) (a2)), \ -__altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ - __altivec_link_error_invalid_argument ())))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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 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 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))), \ - __altivec_link_error_invalid_argument ()))))))) - -#define vec_re(a1) __builtin_altivec_vrefp ((a1)) +__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))), \ +__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))), \ - __altivec_link_error_invalid_argument ())))))) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ())) - -#define vec_round(a1) __builtin_altivec_vrfin ((a1)) - -#define vec_rsqrte(a1) __builtin_altivec_vrsqrtefp ((a1)) +__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))), \ +__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))), \ +__builtin_altivec_compiletime_error ("vec_rsqrte")) #define vec_sel(a1, a2, a3) \ -__ch (__tern_args_eq (vector float, (a1), vector float, (a2), vector signed 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 signed int, (a1), vector signed int, (a2), vector signed 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 signed 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 signed short, (a1), vector signed short, (a2), vector signed 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 signed 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 signed char, (a1), vector signed char, (a2), vector signed 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 signed 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))), \ - __altivec_link_error_invalid_argument ())))))))))))))) +__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))), \ - __altivec_link_error_invalid_argument ())))))) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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 (__tern_args_eq (vector float, (a1), vector float, (a2), int, (a3)), \ - ((vector float) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector float, (a1), vector float, (a2), unsigned int, (a3)), \ - ((vector float) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector signed int, (a1), vector signed int, (a2), int, (a3)), \ - ((vector signed int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector signed int, (a1), vector signed int, (a2), unsigned int, (a3)), \ - ((vector signed int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector unsigned int, (a1), vector unsigned int, (a2), int, (a3)), \ - ((vector unsigned int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector unsigned int, (a1), vector unsigned int, (a2), unsigned int, (a3)), \ - ((vector unsigned int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), int, (a3)), \ - ((vector signed short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), unsigned int, (a3)), \ - ((vector signed short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), int, (a3)), \ - ((vector unsigned short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), unsigned int, (a3)), \ - ((vector unsigned short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector signed char, (a1), vector signed char, (a2), int, (a3)), \ - ((vector signed char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector signed char, (a1), vector signed char, (a2), unsigned int, (a3)), \ - ((vector signed char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), int, (a3)), \ - ((vector unsigned char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ -__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), unsigned int, (a3)), \ - ((vector unsigned char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \ - __altivec_link_error_invalid_argument ())))))))))))))) +__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 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 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))), \ - __altivec_link_error_invalid_argument ())))))))))))))))))) +__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 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))), \ - __altivec_link_error_invalid_argument ())))))))))))))) +__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 (__bin_args_eq (vector signed char, ((a1)), int, ((a2))), \ - ((vector signed char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed char, ((a1)), unsigned int, ((a2))), \ - ((vector signed char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned char, ((a1)), int, ((a2))), \ - ((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned char, ((a1)), unsigned int, ((a2))), \ - ((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed short, ((a1)), int, ((a2))), \ - ((vector signed short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed short, ((a1)), unsigned int, ((a2))), \ - ((vector signed short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned short, ((a1)), int, ((a2))), \ - ((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned short, ((a1)), unsigned int, ((a2))), \ - ((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector float, ((a1)), int, ((a2))), \ - ((vector float) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector float, ((a1)), unsigned int, ((a2))), \ - ((vector float) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed int, ((a1)), int, ((a2))), \ - ((vector signed int) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed int, ((a1)), unsigned int, ((a2))), \ - ((vector signed int) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned int, ((a1)), int, ((a2))), \ - ((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned int, ((a1)), unsigned int, ((a2))), \ - ((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const char) ((a2)))), \ - __altivec_link_error_invalid_argument ())))))))))))))) +__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 (__bin_args_eq (vector float, ((a1)), int, ((a2))), \ - ((vector float) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector float, ((a1)), unsigned int, ((a2))), \ - ((vector float) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed int, ((a1)), int, ((a2))), \ - ((vector signed int) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed int, ((a1)), unsigned int, ((a2))), \ - ((vector signed int) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned int, ((a1)), int, ((a2))), \ - ((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned int, ((a1)), unsigned int, ((a2))), \ - ((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const char) ((a2)))), \ -__altivec_link_error_invalid_argument ())))))) +__ch (__un_args_eq (__vector float, (a1)), \ + ((__vector float) __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 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 (__bin_args_eq (vector signed short, ((a1)), int, ((a2))), \ - ((vector signed short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed short, ((a1)), unsigned int, ((a2))), \ - ((vector signed short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned short, ((a1)), int, ((a2))), \ - ((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned short, ((a1)), unsigned int, ((a2))), \ - ((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \ -__altivec_link_error_invalid_argument ())))) +__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 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 __pixel, (a1)), \ + ((__vector __pixel) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \ +__builtin_altivec_compiletime_error ("vec_vsplth"))))) #define vec_vspltb(a1, a2) \ -__ch (__bin_args_eq (vector signed char, ((a1)), int, ((a2))), \ - ((vector signed char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector signed char, ((a1)), unsigned int, ((a2))), \ - ((vector signed char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned char, ((a1)), int, ((a2))), \ - ((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned char, ((a1)), unsigned int, ((a2))), \ - ((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \ -__altivec_link_error_invalid_argument ())))) +__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 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) __builtin_altivec_vspltisb ((a1)) +#define vec_splat_s8(a1) ((__vector signed char) __builtin_altivec_vspltisb (a1)) -#define vec_splat_s16(a1) __builtin_altivec_vspltish ((a1)) +#define vec_splat_s16(a1) ((__vector signed short) __builtin_altivec_vspltish (a1)) -#define vec_splat_s32(a1) __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))), \ - __altivec_link_error_invalid_argument ())))))) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ - __altivec_link_error_invalid_argument ())))))) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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))), \ -__altivec_link_error_invalid_argument ())) +__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 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 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))), \ - __altivec_link_error_invalid_argument ())))))))))))))))))) +__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 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))), \ - __altivec_link_error_invalid_argument ())))))))))))))) +__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) \ - __builtin_altivec_stvx ((vector signed int) (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)), \ +__builtin_altivec_compiletime_error ("vec_st"))))))))))))))))))))))))))) #define vec_stl(a1, a2, a3) \ - __builtin_altivec_stvxl ((vector signed int) (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)), \ +__builtin_altivec_compiletime_error ("vec_stl"))))))))))))))))))))))))))) #define vec_ste(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 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 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)), \ - __altivec_link_error_invalid_argument ()))))))) +__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)), \ -__altivec_link_error_invalid_argument ()))) +__ch (__bin_args_eq (__vector unsigned int, (a), unsigned int, *(c)), \ + __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector signed int, (a), int, *(c)), \ + __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector __bool int, (a), unsigned int, *(c)), \ + __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector __bool int, (a), int, *(c)), \ + __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector float, (a), float, *(c)), \ + __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)), \ -__altivec_link_error_invalid_argument ())) +__ch (__bin_args_eq (__vector unsigned short, (a), unsigned short, *(c)), \ + __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector signed short, (a), short, *(c)), \ + __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector __bool short, (a), unsigned short, *(c)), \ + __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector __bool short, (a), short, *(c)), \ + __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector __pixel, (a), unsigned short, *(c)), \ + __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector __pixel, (a), short, *(c)), \ + __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)), \ -__altivec_link_error_invalid_argument ())) +__ch (__bin_args_eq (__vector unsigned char, (a), unsigned char, *(c)), \ + __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector signed char, (a), signed char, *(c)), \ + __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector __bool char, (a), unsigned char, *(c)), \ + __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \ +__ch (__bin_args_eq (__vector __bool char, (a), signed char, *(c)), \ + __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 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 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 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 float, (a1), vector float, (a2)), \ - ((vector float) __builtin_altivec_vsubfp ((vector float) (a1), (vector float) (a2))), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ())))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ())))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ())))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()) +__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 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 signed char, (a2)), \ - ((vector signed char) __builtin_altivec_vsubsbs ((vector signed char) (a1), (vector signed char) (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 signed short, (a2)), \ - ((vector signed short) __builtin_altivec_vsubshs ((vector signed short) (a1), (vector signed short) (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 signed int, (a2)), \ - ((vector signed int) __builtin_altivec_vsubsws ((vector signed int) (a1), (vector signed int) (a2))), \ - __altivec_link_error_invalid_argument ())))))))))))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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_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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ +__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))), \ -__altivec_link_error_invalid_argument ()))) +__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))), \ +__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))), \ - __altivec_link_error_invalid_argument ()))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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))), \ -__altivec_link_error_invalid_argument ()) +__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) __builtin_altivec_vsum2sws ((a1), (a2)) +#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))), \ +__builtin_altivec_compiletime_error ("vec_sum2s")) -#define vec_sums(a1, a2) __builtin_altivec_vsumsws ((a1), (a2)) +#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))), \ +__builtin_altivec_compiletime_error ("vec_sums")) -#define vec_trunc(a1) __builtin_altivec_vrfiz ((a1)) +#define vec_trunc(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 unsigned short, (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))), \ - __altivec_link_error_invalid_argument ()))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__ch (__un_args_eq (__vector __bool short, (a1)), \ + ((__vector __bool 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))), \ -__altivec_link_error_invalid_argument ()) +__ch (__un_args_eq (__vector __pixel, (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))), \ -__altivec_link_error_invalid_argument ()) +__ch (__un_args_eq (__vector __bool char, (a1)), \ + ((__vector __bool 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 unsigned short, (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))), \ - __altivec_link_error_invalid_argument ()))) +__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))), \ -__altivec_link_error_invalid_argument ()) +__ch (__un_args_eq (__vector __bool short, (a1)), \ + ((__vector __bool 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))), \ -__altivec_link_error_invalid_argument ()) +__ch (__un_args_eq (__vector __pixel, (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))), \ -__altivec_link_error_invalid_argument ()) +__ch (__un_args_eq (__vector __bool char, (a1)), \ + ((__vector __bool 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 unsigned int, ((a2))), \ - ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \ -__ch (__bin_args_eq (vector unsigned int, ((a1)), vector float, ((a2))), \ - ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \ -__ch (__bin_args_eq (vector signed int, ((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 signed int, ((a2))), \ - ((vector float) __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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 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 unsigned char, ((a1)), vector unsigned 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 unsigned char, ((a2))), \ - ((vector signed char) __builtin_altivec_vxor ((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_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \ - __altivec_link_error_invalid_argument ()))))))))))))))))))))))) +__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 signed 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 unsigned 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 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 signed 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 unsigned 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 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 signed 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 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 unsigned 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 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 float, (a1), vector float, (a2)), \ - __builtin_altivec_vcmpeqfp_p (__CR6_LT, (vector float) (a1), (vector float) (a2)), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) - -#define vec_all_in(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ, (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)), \ + __builtin_altivec_compiletime_error ("vec_all_gt")))))))))))))))))))) + +#define vec_all_in(a1, 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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) - -#define vec_all_nan(a1) __builtin_altivec_vcmpeqfp_p (__CR6_EQ, (a1), (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)), \ + __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 signed 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 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 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 unsigned char, (a2)), \ - __builtin_altivec_vcmpequb_p (__CR6_EQ, (vector signed char) (a1), (vector signed char) (a2)), \ -__ch (__bin_args_eq (vector signed 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 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 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 unsigned short, (a2)), \ - __builtin_altivec_vcmpequh_p (__CR6_EQ, (vector signed short) (a1), (vector signed short) (a2)), \ -__ch (__bin_args_eq (vector signed 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 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 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 unsigned 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) - -#define vec_all_nge(a1, a2) __builtin_altivec_vcmpgefp_p (__CR6_EQ, (a1), (a2)) - -#define vec_all_ngt(a1, a2) __builtin_altivec_vcmpgtfp_p (__CR6_EQ, (a1), (a2)) - -#define vec_all_nle(a1, a2) __builtin_altivec_vcmpgefp_p (__CR6_EQ, (a2), (a1)) - -#define vec_all_nlt(a1, a2) __builtin_altivec_vcmpgtfp_p (__CR6_EQ, (a2), (a1)) - -#define vec_all_numeric(a1) __builtin_altivec_vcmpeqfp_p (__CR6_LT, (a1), (a1)) +__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)), \ + __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)), \ + __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)), \ + __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)), \ + __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)), \ + __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 signed 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 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 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 unsigned char, (a2)), \ - __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (vector signed char) (a1), (vector signed char) (a2)), \ -__ch (__bin_args_eq (vector signed 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 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 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 unsigned short, (a2)), \ - __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (vector signed short) (a1), (vector signed short) (a2)), \ -__ch (__bin_args_eq (vector signed 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 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 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 unsigned 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) +__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 signed 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 signed 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 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 signed 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 signed 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 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 signed 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 signed 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 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) - -#define vec_any_nan(a1) __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, a1, 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)), \ + __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 signed 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 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 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 unsigned char, (a2)), \ - __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (vector signed char) (a1), (vector signed char) (a2)), \ -__ch (__bin_args_eq (vector signed 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 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 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 unsigned short, (a2)), \ - __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (vector signed short) (a1), (vector signed short) (a2)), \ -__ch (__bin_args_eq (vector signed 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 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 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 unsigned 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)), \ - __altivec_link_error_invalid_argument ()))))))))))))) - -#define vec_any_nge(a1, a2) __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, (a1), (a2)) - -#define vec_any_ngt(a1, a2) __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, (a1), (a2)) - -#define vec_any_nle(a1, a2) __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, (a2), (a1)) - -#define vec_any_nlt(a1, a2) __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, (a2), (a1)) - -#define vec_any_numeric(a1) __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, (a1), (a1)) - -#define vec_any_out(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, (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)), \ + __builtin_altivec_compiletime_error ("vec_any_ne")))))))))))))))))))))))) + +#define vec_any_nge(a1, 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)), \ + __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)), \ + __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)), \ + __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)), \ + __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)), \ + __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, (a1), (a2)), \ + __builtin_altivec_compiletime_error ("vec_any_out")) #endif /* __cplusplus */ diff --git a/contrib/gcc/config/rs6000/altivec.md b/contrib/gcc/config/rs6000/altivec.md index db341cb..505a573 100644 --- a/contrib/gcc/config/rs6000/altivec.md +++ b/contrib/gcc/config/rs6000/altivec.md @@ -594,9 +594,9 @@ ;; Fused multiply subtract (define_insn "altivec_vnmsubfp" [(set (match_operand:V4SF 0 "register_operand" "=v") - (minus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v") + (neg:V4SF (minus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v") (match_operand:V4SF 2 "register_operand" "v")) - (match_operand:V4SF 3 "register_operand" "v")))] + (match_operand:V4SF 3 "register_operand" "v"))))] "TARGET_ALTIVEC" "vnmsubfp %0,%1,%2,%3" [(set_attr "type" "vecfloat")]) diff --git a/contrib/gcc/config/rs6000/beos.h b/contrib/gcc/config/rs6000/beos.h index 1ce36bf..a9e88ac 100644 --- a/contrib/gcc/config/rs6000/beos.h +++ b/contrib/gcc/config/rs6000/beos.h @@ -23,18 +23,6 @@ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (BeOS/PowerPC)"); -/* Enable AIX XL compiler calling convention breakage compatibility. */ -#define MASK_XL_CALL 0x40000000 -#define TARGET_XL_CALL (target_flags & MASK_XL_CALL) -#undef SUBTARGET_SWITCHES -#define SUBTARGET_SWITCHES \ - {"xl-call", MASK_XL_CALL, \ - N_("Always pass floating-point arguments in memory") }, \ - {"no-xl-call", - MASK_XL_CALL, \ - N_("Don't always pass floating-point arguments in memory") }, \ - {"threads", 0}, \ - {"pe", 0}, - #undef ASM_SPEC #define ASM_SPEC "-u %(asm_cpu)" diff --git a/contrib/gcc/config/rs6000/darwin-ldouble-shared.c b/contrib/gcc/config/rs6000/darwin-ldouble-shared.c new file mode 100644 index 0000000..8ceea0a --- /dev/null +++ b/contrib/gcc/config/rs6000/darwin-ldouble-shared.c @@ -0,0 +1,2 @@ +#define IN_LIBGCC2_S 1 +#include "darwin-ldouble.c" diff --git a/contrib/gcc/config/rs6000/darwin-ldouble.c b/contrib/gcc/config/rs6000/darwin-ldouble.c index 3174ebb..210f2d6 100644 --- a/contrib/gcc/config/rs6000/darwin-ldouble.c +++ b/contrib/gcc/config/rs6000/darwin-ldouble.c @@ -1,5 +1,5 @@ /* 128-bit long double support routines for Darwin. - Copyright (C) 1993, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1993, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -48,7 +48,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA This code currently assumes big-endian. */ -#if !_SOFT_FLOAT && (defined (__MACH__) || defined (__powerpc64__)) +#if !_SOFT_FLOAT && (defined (__MACH__) || defined (__powerpc64__) || defined (_AIX)) #define fabs(x) __builtin_fabs(x) @@ -58,10 +58,27 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA but GCC currently generates poor code when a union is used to turn a long double into a pair of doubles. */ -extern long double _xlqadd (double, double, double, double); -extern long double _xlqsub (double, double, double, double); -extern long double _xlqmul (double, double, double, double); -extern long double _xlqdiv (double, double, double, double); +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 IN_LIBGCC2_S +/* Provide definitions of the old symbol names to statisfy 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 { @@ -73,7 +90,7 @@ static const double FPKINF = 1.0/0.0; /* Add two 'long double' values and return the result. */ long double -_xlqadd (double a, double b, double c, double d) +__gcc_qadd (double a, double b, double c, double d) { longDblUnion z; double t, tau, u, FPR_zero, FPR_PosInf; @@ -132,13 +149,13 @@ _xlqadd (double a, double b, double c, double d) } long double -_xlqsub (double a, double b, double c, double d) +__gcc_qsub (double a, double b, double c, double d) { - return _xlqadd (a, b, -c, -d); + return __gcc_qadd (a, b, -c, -d); } long double -_xlqmul (double a, double b, double c, double d) +__gcc_qmul (double a, double b, double c, double d) { longDblUnion z; double t, tau, u, v, w, FPR_zero, FPR_PosInf; @@ -169,7 +186,7 @@ _xlqmul (double a, double b, double c, double d) } long double -_xlqdiv (double a, double b, double c, double d) +__gcc_qdiv (double a, double b, double c, double d) { longDblUnion z; double s, sigma, t, tau, u, v, w, FPR_zero, FPR_PosInf; diff --git a/contrib/gcc/config/rs6000/darwin.h b/contrib/gcc/config/rs6000/darwin.h index 62ed74c..cae8bac 100644 --- a/contrib/gcc/config/rs6000/darwin.h +++ b/contrib/gcc/config/rs6000/darwin.h @@ -111,6 +111,13 @@ do { \ #define SUBTARGET_EXTRA_SPECS \ { "darwin_arch", "ppc" }, +/* The "-faltivec" option should have been called "-maltivec" all along. */ +#define SUBTARGET_OPTION_TRANSLATE_TABLE \ + { "-faltivec", "-maltivec -include altivec.h" }, \ + { "-fno-altivec", "-mno-altivec" }, \ + { "-Waltivec-long-deprecated", "-mwarn-altivec-long" }, \ + { "-Wno-altivec-long-deprecated", "-mno-warn-altivec-long" } + /* Make both r2 and r3 available for allocation. */ #define FIXED_R2 0 #define FIXED_R13 0 diff --git a/contrib/gcc/config/rs6000/eabi.asm b/contrib/gcc/config/rs6000/eabi.asm index 058f9b9..c7876bc 100644 --- a/contrib/gcc/config/rs6000/eabi.asm +++ b/contrib/gcc/config/rs6000/eabi.asm @@ -252,7 +252,7 @@ FUNC_START(__eabi_convert) .Lcvt: lwzu 6,4(3) /* pointer to convert */ - cmpi 0,6,0 + cmpwi 0,6,0 beq- .Lcvt2 /* if pointer is null, don't convert */ add 6,6,12 /* convert pointer */ diff --git a/contrib/gcc/config/rs6000/libgcc-ppc64.ver b/contrib/gcc/config/rs6000/libgcc-ppc64.ver index 116d5e7..b27b4b4 100644 --- a/contrib/gcc/config/rs6000/libgcc-ppc64.ver +++ b/contrib/gcc/config/rs6000/libgcc-ppc64.ver @@ -1,7 +1,7 @@ -GCC_3.4 { +GCC_3.4.4 { # long double support - _xlqadd - _xlqsub - _xlqmul - _xlqdiv + __gcc_qadd + __gcc_qsub + __gcc_qmul + __gcc_qdiv } diff --git a/contrib/gcc/config/rs6000/linux-unwind.h b/contrib/gcc/config/rs6000/linux-unwind.h new file mode 100644 index 0000000..842fd10 --- /dev/null +++ b/contrib/gcc/config/rs6000/linux-unwind.h @@ -0,0 +1,322 @@ +/* DWARF2 EH unwinding support for PowerPC and PowerPC64 Linux. + Copyright (C) 2004, 2005 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 with other programs, and to + distribute those programs 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 another program.) + + 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, 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA. */ + +/* This file defines our own versions of various kernel and user + structs, so that system headers are not needed, which otherwise + can make bootstrapping a new toolchain difficult. Do not use + these structs elsewhere; Many fields are missing, particularly + from the end of the structures. */ + +struct gcc_vregs +{ + __attribute__ ((vector_size (16))) int vr[32]; +#ifdef __powerpc64__ + unsigned int pad1[3]; + unsigned int vscr; + unsigned int vsave; + unsigned int pad2[3]; +#else + unsigned int vsave; + unsigned int pad[2]; + unsigned int vscr; +#endif +}; + +struct gcc_regs +{ + unsigned long gpr[32]; + unsigned long nip; + unsigned long msr; + unsigned long orig_gpr3; + unsigned long ctr; + unsigned long link; + unsigned long xer; + unsigned long ccr; + unsigned long softe; + unsigned long trap; + unsigned long dar; + unsigned long dsisr; + unsigned long result; + unsigned long pad1[4]; + double fpr[32]; + unsigned int pad2; + unsigned int fpscr; +#ifdef __powerpc64__ + struct gcc_vregs *vp; +#else + unsigned int pad3[2]; +#endif + struct gcc_vregs vregs; +}; + +struct gcc_ucontext +{ +#ifdef __powerpc64__ + unsigned long pad[28]; +#else + unsigned long pad[12]; +#endif + struct gcc_regs *regs; + struct gcc_regs rsave; +}; + +#ifdef __powerpc64__ + +enum { SIGNAL_FRAMESIZE = 128 }; + +/* If the current unwind info (FS) does not contain explicit info + saving R2, then we have to do a minor amount of code reading to + figure out if it was saved. The big problem here is that the + code that does the save/restore is generated by the linker, so + we have no good way to determine at compile time what to do. */ + +#define MD_FROB_UPDATE_CONTEXT(CTX, FS) \ + do { \ + if ((FS)->regs.reg[2].how == REG_UNSAVED) \ + { \ + unsigned int *insn \ + = (unsigned int *) \ + _Unwind_GetGR ((CTX), LINK_REGISTER_REGNUM); \ + if (*insn == 0xE8410028) \ + _Unwind_SetGRPtr ((CTX), 2, (CTX)->cfa + 40); \ + } \ + } while (0) + +/* If PC is at a sigreturn trampoline, return a pointer to the + regs. Otherwise return NULL. */ + +#define PPC_LINUX_GET_REGS(CONTEXT) \ +({ \ + const unsigned char *pc = (CONTEXT)->ra; \ + struct gcc_regs *regs = NULL; \ + \ + /* addi r1, r1, 128; li r0, 0x0077; sc (sigreturn) */ \ + /* addi r1, r1, 128; li r0, 0x00AC; sc (rt_sigreturn) */ \ + if (*(unsigned int *) (pc + 0) != 0x38210000 + SIGNAL_FRAMESIZE \ + || *(unsigned int *) (pc + 8) != 0x44000002) \ + ; \ + else if (*(unsigned int *) (pc + 4) == 0x38000077) \ + { \ + struct sigframe { \ + char gap[SIGNAL_FRAMESIZE]; \ + unsigned long pad[7]; \ + struct gcc_regs *regs; \ + } *frame = (struct sigframe *) (CONTEXT)->cfa; \ + regs = frame->regs; \ + } \ + else if (*(unsigned int *) (pc + 4) == 0x380000AC) \ + { \ + /* This works for 2.4 kernels, but not for 2.6 kernels with vdso \ + because pc isn't pointing into the stack. Can be removed when \ + no one is running 2.4.19 or 2.4.20, the first two ppc64 \ + kernels released. */ \ + struct rt_sigframe_24 { \ + int tramp[6]; \ + void *pinfo; \ + struct gcc_ucontext *puc; \ + } *frame24 = (struct rt_sigframe_24 *) pc; \ + \ + /* Test for magic value in *puc of vdso. */ \ + if ((long) frame24->puc != -21 * 8) \ + regs = frame24->puc->regs; \ + else \ + { \ + /* This works for 2.4.21 and later kernels. */ \ + struct rt_sigframe { \ + char gap[SIGNAL_FRAMESIZE]; \ + struct gcc_ucontext uc; \ + unsigned long pad[2]; \ + int tramp[6]; \ + void *pinfo; \ + struct gcc_ucontext *puc; \ + } *frame = (struct rt_sigframe *) (CONTEXT)->cfa; \ + regs = frame->uc.regs; \ + } \ + } \ + regs; \ +}) + +#define LINUX_HWCAP_DEFAULT 0xc0000000 + +#define PPC_LINUX_VREGS(REGS) (REGS)->vp + +#else /* !__powerpc64__ */ + +enum { SIGNAL_FRAMESIZE = 64 }; + +#define PPC_LINUX_GET_REGS(CONTEXT) \ +({ \ + const unsigned char *pc = (CONTEXT)->ra; \ + struct gcc_regs *regs = NULL; \ + \ + /* li r0, 0x7777; sc (sigreturn old) */ \ + /* li r0, 0x0077; sc (sigreturn new) */ \ + /* li r0, 0x6666; sc (rt_sigreturn old) */ \ + /* li r0, 0x00AC; sc (rt_sigreturn new) */ \ + if (*(unsigned int *) (pc + 4) != 0x44000002) \ + ; \ + else if (*(unsigned int *) (pc + 0) == 0x38007777 \ + || *(unsigned int *) (pc + 0) == 0x38000077) \ + { \ + struct sigframe { \ + char gap[SIGNAL_FRAMESIZE]; \ + unsigned long pad[7]; \ + struct gcc_regs *regs; \ + } *frame = (struct sigframe *) (CONTEXT)->cfa; \ + regs = frame->regs; \ + } \ + else if (*(unsigned int *) (pc + 0) == 0x38006666 \ + || *(unsigned int *) (pc + 0) == 0x380000AC) \ + { \ + struct rt_sigframe { \ + char gap[SIGNAL_FRAMESIZE + 16]; \ + char siginfo[128]; \ + struct gcc_ucontext uc; \ + } *frame = (struct rt_sigframe *) (CONTEXT)->cfa; \ + regs = frame->uc.regs; \ + } \ + regs; \ +}) + +#define LINUX_HWCAP_DEFAULT 0x80000000 + +#define PPC_LINUX_VREGS(REGS) &(REGS)->vregs + +#endif + +/* Do code reading to identify a signal frame, and set the frame + state data appropriately. See unwind-dw2.c for the structs. */ + +#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ + do { \ + static long hwcap = 0; \ + struct gcc_regs *regs = PPC_LINUX_GET_REGS (CONTEXT); \ + long new_cfa; \ + int i; \ + \ + if (regs == NULL) \ + break; \ + \ + new_cfa = regs->gpr[STACK_POINTER_REGNUM]; \ + (FS)->cfa_how = CFA_REG_OFFSET; \ + (FS)->cfa_reg = STACK_POINTER_REGNUM; \ + (FS)->cfa_offset = new_cfa - (long) (CONTEXT)->cfa; \ + \ + for (i = 0; i < 32; i++) \ + if (i != STACK_POINTER_REGNUM) \ + { \ + (FS)->regs.reg[i].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[i].loc.offset \ + = (long) ®s->gpr[i] - new_cfa; \ + } \ + \ + (FS)->regs.reg[CR2_REGNO].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[CR2_REGNO].loc.offset \ + = (long) ®s->ccr - new_cfa; \ + \ + (FS)->regs.reg[LINK_REGISTER_REGNUM].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[LINK_REGISTER_REGNUM].loc.offset \ + = (long) ®s->link - new_cfa; \ + \ + (FS)->regs.reg[ARG_POINTER_REGNUM].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[ARG_POINTER_REGNUM].loc.offset \ + = (long) ®s->nip - new_cfa; \ + (FS)->retaddr_column = ARG_POINTER_REGNUM; \ + \ + if (hwcap == 0) \ + { \ + /* __libc_stack_end holds the original stack passed to a \ + process. */ \ + extern long *__libc_stack_end; \ + long argc; \ + char **argv; \ + char **envp; \ + struct auxv \ + { \ + long a_type; \ + long a_val; \ + } *auxp; \ + \ + /* The Linux kernel puts argc first on the stack. */ \ + argc = __libc_stack_end[0]; \ + /* Followed by argv, NULL terminated. */ \ + argv = (char **) __libc_stack_end + 1; \ + /* Followed by environment string pointers, NULL terminated. */ \ + envp = argv + argc + 1; \ + while (*envp++) \ + continue; \ + /* Followed by the aux vector, zero terminated. */ \ + for (auxp = (struct auxv *) envp; auxp->a_type != 0; ++auxp) \ + if (auxp->a_type == 16) \ + { \ + hwcap = auxp->a_val; \ + break; \ + } \ + \ + /* These will already be set if we found AT_HWCAP. A non-zero \ + value stops us looking again if for some reason we couldn't \ + find AT_HWCAP. */ \ + hwcap |= LINUX_HWCAP_DEFAULT; \ + } \ + \ + /* If we have a FPU... */ \ + if (hwcap & 0x08000000) \ + for (i = 0; i < 32; i++) \ + { \ + (FS)->regs.reg[i + 32].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[i + 32].loc.offset \ + = (long) ®s->fpr[i] - new_cfa; \ + } \ + \ + /* If we have a VMX unit... */ \ + if (hwcap & 0x10000000) \ + { \ + struct gcc_vregs *vregs; \ + vregs = PPC_LINUX_VREGS (regs); \ + if (regs->msr & (1 << 25)) \ + { \ + for (i = 0; i < 32; i++) \ + { \ + (FS)->regs.reg[i + FIRST_ALTIVEC_REGNO].how \ + = REG_SAVED_OFFSET; \ + (FS)->regs.reg[i + FIRST_ALTIVEC_REGNO].loc.offset \ + = (long) &vregs[i] - new_cfa; \ + } \ + \ + (FS)->regs.reg[VSCR_REGNO].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[VSCR_REGNO].loc.offset \ + = (long) &vregs->vscr - new_cfa; \ + } \ + \ + (FS)->regs.reg[VRSAVE_REGNO].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[VRSAVE_REGNO].loc.offset \ + = (long) &vregs->vsave - new_cfa; \ + } \ + \ + goto SUCCESS; \ + } while (0) diff --git a/contrib/gcc/config/rs6000/linux.h b/contrib/gcc/config/rs6000/linux.h index 009ac66..84cdeed 100644 --- a/contrib/gcc/config/rs6000/linux.h +++ b/contrib/gcc/config/rs6000/linux.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for PowerPC machines running Linux. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Michael Meissner (meissner@cygnus.com). @@ -24,6 +24,14 @@ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX +/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit + process. */ +#define OS_MISSING_POWERPC64 1 + +/* glibc has float and long double forms of math functions. */ +#undef TARGET_C99_FUNCTIONS +#define TARGET_C99_FUNCTIONS 1 + #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() \ do \ @@ -86,94 +94,16 @@ #undef TARGET_64BIT #define TARGET_64BIT 0 -/* We don't need to generate entries in .fixup. */ +/* We don't need to generate entries in .fixup, except when + -mrelocatable or -mrelocatable-lib is given. */ #undef RELOCATABLE_NEEDS_FIXUP +#define RELOCATABLE_NEEDS_FIXUP \ + (target_flags & target_flags_explicit & MASK_RELOCATABLE) #define TARGET_ASM_FILE_END file_end_indicate_exec_stack #define TARGET_HAS_F_SETLKW -/* Do code reading to identify a signal frame, and set the frame - state data appropriately. See unwind-dw2.c for the structs. */ - #ifdef IN_LIBGCC2 -#include <signal.h> - -/* During the 2.5 kernel series the kernel ucontext was changed, but - the new layout is compatible with the old one, so we just define - and use the old one here for simplicity and compatibility. */ - -struct kernel_old_ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - struct sigcontext_struct uc_mcontext; - sigset_t uc_sigmask; -}; - -enum { SIGNAL_FRAMESIZE = 64 }; +#include "config/rs6000/linux-unwind.h" #endif - -#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ - do { \ - unsigned char *pc_ = (CONTEXT)->ra; \ - struct sigcontext *sc_; \ - long new_cfa_; \ - int i_; \ - \ - /* li r0, 0x7777; sc (sigreturn old) */ \ - /* li r0, 0x0077; sc (sigreturn new) */ \ - /* li r0, 0x6666; sc (rt_sigreturn old) */ \ - /* li r0, 0x00AC; sc (rt_sigreturn new) */ \ - if (*(unsigned int *) (pc_+4) != 0x44000002) \ - break; \ - if (*(unsigned int *) (pc_+0) == 0x38007777 \ - || *(unsigned int *) (pc_+0) == 0x38000077) \ - { \ - struct sigframe { \ - char gap[SIGNAL_FRAMESIZE]; \ - struct sigcontext sigctx; \ - } *rt_ = (CONTEXT)->cfa; \ - sc_ = &rt_->sigctx; \ - } \ - else if (*(unsigned int *) (pc_+0) == 0x38006666 \ - || *(unsigned int *) (pc_+0) == 0x380000AC) \ - { \ - struct rt_sigframe { \ - char gap[SIGNAL_FRAMESIZE]; \ - unsigned long _unused[2]; \ - struct siginfo *pinfo; \ - void *puc; \ - struct siginfo info; \ - struct kernel_old_ucontext uc; \ - } *rt_ = (CONTEXT)->cfa; \ - sc_ = &rt_->uc.uc_mcontext; \ - } \ - else \ - break; \ - \ - new_cfa_ = sc_->regs->gpr[STACK_POINTER_REGNUM]; \ - (FS)->cfa_how = CFA_REG_OFFSET; \ - (FS)->cfa_reg = STACK_POINTER_REGNUM; \ - (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \ - \ - for (i_ = 0; i_ < 32; i_++) \ - if (i_ != STACK_POINTER_REGNUM) \ - { \ - (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[i_].loc.offset \ - = (long)&(sc_->regs->gpr[i_]) - new_cfa_; \ - } \ - \ - (FS)->regs.reg[LINK_REGISTER_REGNUM].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[LINK_REGISTER_REGNUM].loc.offset \ - = (long)&(sc_->regs->link) - new_cfa_; \ - \ - (FS)->regs.reg[CR0_REGNO].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[CR0_REGNO].loc.offset \ - = (long)&(sc_->regs->nip) - new_cfa_; \ - (FS)->retaddr_column = CR0_REGNO; \ - goto SUCCESS; \ - } while (0) - -#define OS_MISSING_POWERPC64 1 diff --git a/contrib/gcc/config/rs6000/linux64.h b/contrib/gcc/config/rs6000/linux64.h index 4fe4199..013e23a 100644 --- a/contrib/gcc/config/rs6000/linux64.h +++ b/contrib/gcc/config/rs6000/linux64.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for 64 bit PowerPC linux. - Copyright (C) 2000, 2001, 2002, 2003, 2004 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -53,8 +53,11 @@ #undef PROCESSOR_DEFAULT64 #define PROCESSOR_DEFAULT64 PROCESSOR_PPC630 -#undef TARGET_RELOCATABLE -#define TARGET_RELOCATABLE (!TARGET_64BIT && (target_flags & MASK_RELOCATABLE)) +/* We don't need to generate entries in .fixup, except when + -mrelocatable or -mrelocatable-lib is given. */ +#undef RELOCATABLE_NEEDS_FIXUP +#define RELOCATABLE_NEEDS_FIXUP \ + (target_flags & target_flags_explicit & MASK_RELOCATABLE) #undef RS6000_ABI_NAME #define RS6000_ABI_NAME (TARGET_64BIT ? "aixdesc" : "sysv") @@ -188,6 +191,8 @@ #define TARGET_EABI 0 #undef TARGET_PROTOTYPE #define TARGET_PROTOTYPE 0 +#undef RELOCATABLE_NEEDS_FIXUP +#define RELOCATABLE_NEEDS_FIXUP 0 #endif @@ -212,9 +217,6 @@ #define PROFILE_HOOK(LABEL) \ do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0) -/* We don't need to generate entries in .fixup. */ -#undef RELOCATABLE_NEEDS_FIXUP - /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */ #undef ADJUST_FIELD_ALIGN #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ @@ -287,6 +289,14 @@ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX +/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit + process. */ +#define OS_MISSING_POWERPC64 !TARGET_64BIT + +/* glibc has float and long double forms of math functions. */ +#undef TARGET_C99_FUNCTIONS +#define TARGET_C99_FUNCTIONS 1 + #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() \ do \ @@ -541,182 +551,13 @@ while (0) #undef DRAFT_V4_STRUCT_RET #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT) -#define TARGET_ASM_FILE_END file_end_indicate_exec_stack +#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack #define TARGET_HAS_F_SETLKW #define LINK_GCC_C_SEQUENCE_SPEC \ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" -/* Do code reading to identify a signal frame, and set the frame - state data appropriately. See unwind-dw2.c for the structs. */ - #ifdef IN_LIBGCC2 -#include <signal.h> -#ifdef __powerpc64__ -#include <sys/ucontext.h> - -enum { SIGNAL_FRAMESIZE = 128 }; - -#else - -/* During the 2.5 kernel series the kernel ucontext was changed, but - the new layout is compatible with the old one, so we just define - and use the old one here for simplicity and compatibility. */ - -struct kernel_old_ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - struct sigcontext_struct uc_mcontext; - sigset_t uc_sigmask; -}; -enum { SIGNAL_FRAMESIZE = 64 }; +#include "config/rs6000/linux-unwind.h" #endif - -#endif - -#ifdef __powerpc64__ - -/* If the current unwind info (FS) does not contain explicit info - saving R2, then we have to do a minor amount of code reading to - figure out if it was saved. The big problem here is that the - code that does the save/restore is generated by the linker, so - we have no good way to determine at compile time what to do. */ - -#define MD_FROB_UPDATE_CONTEXT(CTX, FS) \ - do { \ - if ((FS)->regs.reg[2].how == REG_UNSAVED) \ - { \ - unsigned int *insn \ - = (unsigned int *) \ - _Unwind_GetGR ((CTX), LINK_REGISTER_REGNUM); \ - if (*insn == 0xE8410028) \ - _Unwind_SetGRPtr ((CTX), 2, (CTX)->cfa + 40); \ - } \ - } while (0) - -#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ - do { \ - unsigned char *pc_ = (CONTEXT)->ra; \ - struct sigcontext *sc_; \ - long new_cfa_; \ - int i_; \ - \ - /* addi r1, r1, 128; li r0, 0x0077; sc (sigreturn) */ \ - /* addi r1, r1, 128; li r0, 0x00AC; sc (rt_sigreturn) */ \ - if (*(unsigned int *) (pc_+0) != 0x38210000 + SIGNAL_FRAMESIZE \ - || *(unsigned int *) (pc_+8) != 0x44000002) \ - break; \ - if (*(unsigned int *) (pc_+4) == 0x38000077) \ - { \ - struct sigframe { \ - char gap[SIGNAL_FRAMESIZE]; \ - struct sigcontext sigctx; \ - } *rt_ = (CONTEXT)->cfa; \ - sc_ = &rt_->sigctx; \ - } \ - else if (*(unsigned int *) (pc_+4) == 0x380000AC) \ - { \ - struct rt_sigframe { \ - int tramp[6]; \ - struct siginfo *pinfo; \ - struct ucontext *puc; \ - } *rt_ = (struct rt_sigframe *) pc_; \ - sc_ = &rt_->puc->uc_mcontext; \ - } \ - else \ - break; \ - \ - new_cfa_ = sc_->regs->gpr[STACK_POINTER_REGNUM]; \ - (FS)->cfa_how = CFA_REG_OFFSET; \ - (FS)->cfa_reg = STACK_POINTER_REGNUM; \ - (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \ - \ - for (i_ = 0; i_ < 32; i_++) \ - if (i_ != STACK_POINTER_REGNUM) \ - { \ - (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[i_].loc.offset \ - = (long)&(sc_->regs->gpr[i_]) - new_cfa_; \ - } \ - \ - (FS)->regs.reg[LINK_REGISTER_REGNUM].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[LINK_REGISTER_REGNUM].loc.offset \ - = (long)&(sc_->regs->link) - new_cfa_; \ - \ - (FS)->regs.reg[ARG_POINTER_REGNUM].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[ARG_POINTER_REGNUM].loc.offset \ - = (long)&(sc_->regs->nip) - new_cfa_; \ - (FS)->retaddr_column = ARG_POINTER_REGNUM; \ - goto SUCCESS; \ - } while (0) - -#else - -#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ - do { \ - unsigned char *pc_ = (CONTEXT)->ra; \ - struct sigcontext *sc_; \ - long new_cfa_; \ - int i_; \ - \ - /* li r0, 0x7777; sc (sigreturn old) */ \ - /* li r0, 0x0077; sc (sigreturn new) */ \ - /* li r0, 0x6666; sc (rt_sigreturn old) */ \ - /* li r0, 0x00AC; sc (rt_sigreturn new) */ \ - if (*(unsigned int *) (pc_+4) != 0x44000002) \ - break; \ - if (*(unsigned int *) (pc_+0) == 0x38007777 \ - || *(unsigned int *) (pc_+0) == 0x38000077) \ - { \ - struct sigframe { \ - char gap[SIGNAL_FRAMESIZE]; \ - struct sigcontext sigctx; \ - } *rt_ = (CONTEXT)->cfa; \ - sc_ = &rt_->sigctx; \ - } \ - else if (*(unsigned int *) (pc_+0) == 0x38006666 \ - || *(unsigned int *) (pc_+0) == 0x380000AC) \ - { \ - struct rt_sigframe { \ - char gap[SIGNAL_FRAMESIZE]; \ - unsigned long _unused[2]; \ - struct siginfo *pinfo; \ - void *puc; \ - struct siginfo info; \ - struct kernel_old_ucontext uc; \ - } *rt_ = (CONTEXT)->cfa; \ - sc_ = &rt_->uc.uc_mcontext; \ - } \ - else \ - break; \ - \ - new_cfa_ = sc_->regs->gpr[STACK_POINTER_REGNUM]; \ - (FS)->cfa_how = CFA_REG_OFFSET; \ - (FS)->cfa_reg = STACK_POINTER_REGNUM; \ - (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \ - \ - for (i_ = 0; i_ < 32; i_++) \ - if (i_ != STACK_POINTER_REGNUM) \ - { \ - (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[i_].loc.offset \ - = (long)&(sc_->regs->gpr[i_]) - new_cfa_; \ - } \ - \ - (FS)->regs.reg[LINK_REGISTER_REGNUM].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[LINK_REGISTER_REGNUM].loc.offset \ - = (long)&(sc_->regs->link) - new_cfa_; \ - \ - (FS)->regs.reg[CR0_REGNO].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[CR0_REGNO].loc.offset \ - = (long)&(sc_->regs->nip) - new_cfa_; \ - (FS)->retaddr_column = CR0_REGNO; \ - goto SUCCESS; \ - } while (0) - -#endif - - -#define OS_MISSING_POWERPC64 !TARGET_64BIT diff --git a/contrib/gcc/config/rs6000/rs6000-c.c b/contrib/gcc/config/rs6000/rs6000-c.c index a47afee..13d0ca6 100644 --- a/contrib/gcc/config/rs6000/rs6000-c.c +++ b/contrib/gcc/config/rs6000/rs6000-c.c @@ -62,13 +62,13 @@ rs6000_pragma_longcall (cpp_reader *pfile ATTRIBUTE_UNUSED) if (c_lex (&x) != CPP_CLOSE_PAREN) SYNTAX_ERROR ("missing close paren"); - if (n != integer_zero_node && n != integer_one_node) + if (!integer_zerop (n) && !integer_onep (n)) SYNTAX_ERROR ("number must be 0 or 1"); if (c_lex (&x) != CPP_EOF) warning ("junk at end of #pragma longcall"); - rs6000_default_long_calls = (n == integer_one_node); + rs6000_default_long_calls = integer_onep (n); } /* Handle defining many CPP flags based on TARGET_xxx. As a general @@ -92,7 +92,15 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile) if (! TARGET_POWER && ! TARGET_POWER2 && ! TARGET_POWERPC) builtin_define ("_ARCH_COM"); if (TARGET_ALTIVEC) - builtin_define ("__ALTIVEC__"); + { + builtin_define ("__ALTIVEC__"); + builtin_define ("__VEC__=10206"); + + /* Define the AltiVec syntactic elements. */ + builtin_define ("__vector=__attribute__((altivec(vector__)))"); + builtin_define ("__pixel=__attribute__((altivec(pixel__))) unsigned short"); + builtin_define ("__bool=__attribute__((altivec(bool__))) unsigned"); + } if (TARGET_SPE) builtin_define ("__SPE__"); if (TARGET_SOFT_FLOAT) diff --git a/contrib/gcc/config/rs6000/rs6000-protos.h b/contrib/gcc/config/rs6000/rs6000-protos.h index acac75a..3d17162 100644 --- a/contrib/gcc/config/rs6000/rs6000-protos.h +++ b/contrib/gcc/config/rs6000/rs6000-protos.h @@ -116,7 +116,7 @@ extern enum rtx_code rs6000_reverse_condition (enum machine_mode, extern void rs6000_emit_sCOND (enum rtx_code, rtx); extern void rs6000_emit_cbranch (enum rtx_code, rtx); extern char * output_cbranch (rtx, const char *, int, rtx); -extern char * output_e500_flip_gt_bit (rtx, rtx); +extern char * output_e500_flip_eq_bit (rtx, rtx); extern rtx rs6000_emit_set_const (rtx, enum machine_mode, rtx, int); extern int rs6000_emit_cmove (rtx, rtx, rtx, rtx); extern void rs6000_emit_minmax (rtx, enum rtx_code, rtx, rtx); diff --git a/contrib/gcc/config/rs6000/rs6000.c b/contrib/gcc/config/rs6000/rs6000.c index 33f47ce..1ffd4da 100644 --- a/contrib/gcc/config/rs6000/rs6000.c +++ b/contrib/gcc/config/rs6000/rs6000.c @@ -1,6 +1,6 @@ /* Subroutines used for code generation on IBM RS/6000. Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GCC. @@ -220,6 +220,20 @@ static GTY(()) tree opaque_V2SI_type_node; static GTY(()) tree opaque_V2SF_type_node; static GTY(()) tree opaque_p_V2SI_type_node; +/* AltiVec requires a few more basic types in addition to the vector + types already defined in tree.c. */ +static GTY(()) tree bool_char_type_node; /* __bool char */ +static GTY(()) tree bool_short_type_node; /* __bool short */ +static GTY(()) tree bool_int_type_node; /* __bool int */ +static GTY(()) tree pixel_type_node; /* __pixel */ +static GTY(()) tree bool_V16QI_type_node; /* __vector __bool char */ +static GTY(()) tree bool_V8HI_type_node; /* __vector __bool short */ +static GTY(()) tree bool_V4SI_type_node; /* __vector __bool int */ +static GTY(()) tree pixel_V8HI_type_node; /* __vector __pixel */ + +int rs6000_warn_altivec_long = 1; /* On by default. */ +const char *rs6000_warn_altivec_long_switch; + const char *rs6000_traceback_name; static enum { traceback_default = 0, @@ -238,7 +252,8 @@ static GTY(()) int rs6000_sr_alias_set; /* Call distance, overridden by -mlongcall and #pragma longcall(1). The only place that looks at this is rs6000_set_default_type_attributes; everywhere else should rely on the presence or absence of a longcall - attribute on the function declaration. */ + attribute on the function declaration. Exception: init_cumulative_args + looks at it too, for libcalls. */ int rs6000_default_long_calls; const char *rs6000_longcall_switch; @@ -290,6 +305,8 @@ static void rs6000_assemble_visibility (tree, int); #endif static int rs6000_ra_ever_killed (void); static tree rs6000_handle_longcall_attribute (tree *, tree, tree, int, bool *); +static tree rs6000_handle_altivec_attribute (tree *, tree, tree, int, bool *); +static const char *rs6000_mangle_fundamental_type (tree); extern const struct attribute_spec rs6000_attribute_table[]; static void rs6000_set_default_type_attributes (tree); static void rs6000_output_function_prologue (FILE *, HOST_WIDE_INT); @@ -303,6 +320,7 @@ static void rs6000_file_start (void); static unsigned int rs6000_elf_section_type_flags (tree, const char *, int); static void rs6000_elf_asm_out_constructor (rtx, int); static void rs6000_elf_asm_out_destructor (rtx, int); +static void rs6000_elf_end_indicate_exec_stack (void) ATTRIBUTE_UNUSED; static void rs6000_elf_select_section (tree, int, unsigned HOST_WIDE_INT); static void rs6000_elf_unique_section (tree, int); static void rs6000_elf_select_rtx_section (enum machine_mode, rtx, @@ -398,8 +416,7 @@ static int rs6000_get_some_local_dynamic_name_1 (rtx *, void *); static rtx rs6000_complex_function_value (enum machine_mode); static rtx rs6000_spe_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree); -static rtx rs6000_mixed_function_arg (CUMULATIVE_ARGS *, - enum machine_mode, tree, int); +static rtx rs6000_mixed_function_arg (enum machine_mode, tree, int); static void rs6000_move_block_from_reg (int regno, rtx x, int nregs); static void setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, @@ -565,6 +582,9 @@ static const char alt_reg_names[][8] = #undef TARGET_EXPAND_BUILTIN #define TARGET_EXPAND_BUILTIN rs6000_expand_builtin +#undef TARGET_MANGLE_FUNDAMENTAL_TYPE +#define TARGET_MANGLE_FUNDAMENTAL_TYPE rs6000_mangle_fundamental_type + #undef TARGET_INIT_LIBFUNCS #define TARGET_INIT_LIBFUNCS rs6000_init_libfuncs @@ -735,9 +755,8 @@ rs6000_override_options (const char *default_cpu) set_masks &= ~MASK_ALTIVEC; #endif - /* Don't override these by the processor default if given explicitly. */ - set_masks &= ~(target_flags_explicit - & (MASK_MULTIPLE | MASK_STRING | MASK_SOFT_FLOAT)); + /* Don't override by the processor default if given explicitly. */ + set_masks &= ~target_flags_explicit; /* Identify the processor type. */ rs6000_select[0].string = default_cpu; @@ -923,6 +942,17 @@ rs6000_override_options (const char *default_cpu) rs6000_default_long_calls = (base[0] != 'n'); } + /* Handle -m(no-)warn-altivec-long similarly. */ + if (rs6000_warn_altivec_long_switch) + { + const char *base = rs6000_warn_altivec_long_switch; + while (base[-1] != 'm') base--; + + if (*rs6000_warn_altivec_long_switch != '\0') + error ("invalid option `%s'", base); + rs6000_warn_altivec_long = (base[0] != 'n'); + } + /* Handle -mprioritize-restricted-insns option. */ rs6000_sched_restricted_insns_priority = (rs6000_sched_groups ? 1 : 0); @@ -2972,13 +3002,9 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model) rs6000_emit_move (got, gsym, Pmode); else { - char buf[30]; - static int tls_got_labelno = 0; - rtx tempLR, lab, tmp3, mem; + rtx tempLR, tmp3, mem; rtx first, last; - ASM_GENERATE_INTERNAL_LABEL (buf, "LTLS", tls_got_labelno++); - lab = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); tempLR = gen_reg_rtx (Pmode); tmp1 = gen_reg_rtx (Pmode); tmp2 = gen_reg_rtx (Pmode); @@ -2986,8 +3012,7 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model) mem = gen_rtx_MEM (Pmode, tmp1); RTX_UNCHANGING_P (mem) = 1; - first = emit_insn (gen_load_toc_v4_PIC_1b (tempLR, lab, - gsym)); + first = emit_insn (gen_load_toc_v4_PIC_1b (tempLR, gsym)); emit_move_insn (tmp1, tempLR); emit_move_insn (tmp2, mem); emit_insn (gen_addsi3 (tmp3, tmp1, tmp2)); @@ -3942,10 +3967,11 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, cum->nargs_prototype = n_named_args; /* Check for a longcall attribute. */ - if (fntype - && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype)) - && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))) - cum->call_cookie = CALL_LONG; + if ((!fntype && rs6000_default_long_calls) + || (fntype + && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype)) + && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype)))) + cum->call_cookie |= CALL_LONG; if (TARGET_DEBUG_ARG) { @@ -4258,105 +4284,49 @@ rs6000_spe_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, /* Determine where to place an argument in 64-bit mode with 32-bit ABI. */ static rtx -rs6000_mixed_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, - tree type, int align_words) -{ - if (mode == DFmode) - { - /* -mpowerpc64 with 32bit ABI splits up a DFmode argument - in vararg list into zero, one or two GPRs */ - if (align_words >= GP_ARG_NUM_REG) - return gen_rtx_PARALLEL (DFmode, - gen_rtvec (2, - gen_rtx_EXPR_LIST (VOIDmode, - NULL_RTX, const0_rtx), - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (mode, - cum->fregno), - const0_rtx))); - else if (align_words + rs6000_arg_size (mode, type) - > GP_ARG_NUM_REG) - /* If this is partially on the stack, then we only - include the portion actually in registers here. */ - return gen_rtx_PARALLEL (DFmode, - gen_rtvec (2, - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (SImode, - GP_ARG_MIN_REG - + align_words), - const0_rtx), - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (mode, - cum->fregno), - const0_rtx))); - - /* split a DFmode arg into two GPRs */ - return gen_rtx_PARALLEL (DFmode, - gen_rtvec (3, - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (SImode, - GP_ARG_MIN_REG - + align_words), - const0_rtx), - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (SImode, - GP_ARG_MIN_REG - + align_words + 1), - GEN_INT (4)), - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (mode, cum->fregno), - const0_rtx))); - } - /* -mpowerpc64 with 32bit ABI splits up a DImode argument into one - or two GPRs */ - else if (mode == DImode) +rs6000_mixed_function_arg (enum machine_mode mode, tree type, int align_words) +{ + int n_units; + int i, k; + rtx rvec[GP_ARG_NUM_REG + 1]; + + if (align_words >= GP_ARG_NUM_REG) + return NULL_RTX; + + n_units = rs6000_arg_size (mode, type); + + /* Optimize the simple case where the arg fits in one gpr, except in + the case of BLKmode due to assign_parms assuming that registers are + BITS_PER_WORD wide. */ + if (n_units == 0 + || (n_units == 1 && mode != BLKmode)) + return gen_rtx_REG (mode, GP_ARG_MIN_REG + align_words); + + k = 0; + if (align_words + n_units > GP_ARG_NUM_REG) + /* Not all of the arg fits in gprs. Say that it goes in memory too, + using a magic NULL_RTX component. + FIXME: This is not strictly correct. Only some of the arg + belongs in memory, not all of it. However, there isn't any way + to do this currently, apart from building rtx descriptions for + the pieces of memory we want stored. Due to bugs in the generic + code we can't use the normal function_arg_partial_nregs scheme + with the PARALLEL arg description we emit here. + In any case, the code to store the whole arg to memory is often + more efficient than code to store pieces, and we know that space + is available in the right place for the whole arg. */ + rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, NULL_RTX, const0_rtx); + + i = 0; + do { - if (align_words < GP_ARG_NUM_REG - 1) - return gen_rtx_PARALLEL (DImode, - gen_rtvec (2, - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (SImode, - GP_ARG_MIN_REG - + align_words), - const0_rtx), - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (SImode, - GP_ARG_MIN_REG - + align_words + 1), - GEN_INT (4)))); - else if (align_words == GP_ARG_NUM_REG - 1) - return gen_rtx_PARALLEL (DImode, - gen_rtvec (2, - gen_rtx_EXPR_LIST (VOIDmode, - NULL_RTX, const0_rtx), - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (SImode, - GP_ARG_MIN_REG - + align_words), - const0_rtx))); - } - else if (mode == BLKmode && align_words <= (GP_ARG_NUM_REG - 1)) - { - int k; - int size = int_size_in_bytes (type); - int no_units = ((size - 1) / 4) + 1; - int max_no_words = GP_ARG_NUM_REG - align_words; - int rtlvec_len = no_units < max_no_words ? no_units : max_no_words; - rtx *rtlvec = (rtx *) alloca (rtlvec_len * sizeof (rtx)); - - memset ((char *) rtlvec, 0, rtlvec_len * sizeof (rtx)); - - for (k=0; k < rtlvec_len; k++) - rtlvec[k] = gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (SImode, - GP_ARG_MIN_REG - + align_words + k), - k == 0 ? const0_rtx : GEN_INT (k*4)); - - return gen_rtx_PARALLEL (BLKmode, gen_rtvec_v (k, rtlvec)); - } + rtx r = gen_rtx_REG (SImode, GP_ARG_MIN_REG + align_words); + rtx off = GEN_INT (i++ * 4); + rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off); + } + while (++align_words < GP_ARG_NUM_REG && --n_units != 0); - return NULL_RTX; + return gen_rtx_PARALLEL (mode, gen_rtvec_v (k, rvec)); } /* Determine where to put an argument to a function. @@ -4451,8 +4421,8 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, { /* Vector parameters to varargs functions under AIX or Darwin get passed in memory and possibly also in GPRs. */ - int align, align_words; - enum machine_mode part_mode = mode; + int align, align_words, n_words; + enum machine_mode part_mode; /* Vector parameters must be 16-byte aligned. This places them at 2 mod 4 in terms of words in 32-bit mode, since the parameter @@ -4468,15 +4438,19 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, /* Out of registers? Memory, then. */ if (align_words >= GP_ARG_NUM_REG) return NULL_RTX; - + + if (TARGET_32BIT && TARGET_POWERPC64) + return rs6000_mixed_function_arg (mode, type, align_words); + /* The vector value goes in GPRs. Only the part of the value in GPRs is reported here. */ - if (align_words + CLASS_MAX_NREGS (mode, GENERAL_REGS) - > GP_ARG_NUM_REG) + part_mode = mode; + n_words = rs6000_arg_size (mode, type); + if (align_words + n_words > GP_ARG_NUM_REG) /* Fortunately, there are only two possibilities, the value is either wholly in GPRs or half in GPRs and half not. */ part_mode = DImode; - + return gen_rtx_REG (part_mode, GP_ARG_MIN_REG + align_words); } } @@ -4504,10 +4478,13 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, gregno += (1 - gregno) & 1; /* Multi-reg args are not split between registers and stack. */ - if (gregno + n_words - 1 <= GP_ARG_MAX_REG) - return gen_rtx_REG (mode, gregno); - else + if (gregno + n_words - 1 > GP_ARG_MAX_REG) return NULL_RTX; + + if (TARGET_32BIT && TARGET_POWERPC64) + return rs6000_mixed_function_arg (mode, type, + gregno - GP_ARG_MIN_REG); + return gen_rtx_REG (mode, gregno); } } else @@ -4517,75 +4494,82 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, if (USE_FP_FOR_ARG_P (cum, mode, type)) { - rtx fpr[2]; - rtx *r; + rtx rvec[GP_ARG_NUM_REG + 1]; + rtx r; + int k; bool needs_psave; enum machine_mode fmode = mode; - int n; unsigned long n_fpreg = (GET_MODE_SIZE (mode) + 7) >> 3; if (cum->fregno + n_fpreg > FP_ARG_MAX_REG + 1) { - /* Long double split over regs and memory. */ - if (fmode == TFmode) - fmode = DFmode; - /* Currently, we only ever need one reg here because complex doubles are split. */ - if (cum->fregno != FP_ARG_MAX_REG - 1) + if (cum->fregno != FP_ARG_MAX_REG || fmode != TFmode) abort (); + + /* Long double split over regs and memory. */ + fmode = DFmode; } - fpr[1] = gen_rtx_REG (fmode, cum->fregno); /* Do we also need to pass this arg in the parameter save area? */ needs_psave = (type && (cum->nargs_prototype <= 0 || (DEFAULT_ABI == ABI_AIX - && TARGET_XL_CALL + && TARGET_XL_COMPAT && align_words >= GP_ARG_NUM_REG))); if (!needs_psave && mode == fmode) - return fpr[1]; - - if (TARGET_32BIT && TARGET_POWERPC64 - && mode == DFmode && cum->stdarg) - return rs6000_mixed_function_arg (cum, mode, type, align_words); - - /* Describe where this piece goes. */ - r = fpr + 1; - *r = gen_rtx_EXPR_LIST (VOIDmode, *r, const0_rtx); - n = 1; + return gen_rtx_REG (fmode, cum->fregno); + k = 0; if (needs_psave) { - /* Now describe the part that goes in gprs or the stack. + /* Describe the part that goes in gprs or the stack. This piece must come first, before the fprs. */ - rtx reg = NULL_RTX; if (align_words < GP_ARG_NUM_REG) { unsigned long n_words = rs6000_arg_size (mode, type); - enum machine_mode rmode = mode; - - if (align_words + n_words > GP_ARG_NUM_REG) - /* If this is partially on the stack, then we only - include the portion actually in registers here. - We know this can only be one register because - complex doubles are splt. */ - rmode = Pmode; - reg = gen_rtx_REG (rmode, GP_ARG_MIN_REG + align_words); + + if (align_words + n_words > GP_ARG_NUM_REG + || (TARGET_32BIT && TARGET_POWERPC64)) + { + /* If this is partially on the stack, then we only + include the portion actually in registers here. */ + enum machine_mode rmode = TARGET_32BIT ? SImode : DImode; + rtx off; + do + { + r = gen_rtx_REG (rmode, + GP_ARG_MIN_REG + align_words); + off = GEN_INT (k * GET_MODE_SIZE (rmode)); + rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off); + } + while (++align_words < GP_ARG_NUM_REG && --n_words != 0); + } + else + { + /* The whole arg fits in gprs. */ + r = gen_rtx_REG (mode, GP_ARG_MIN_REG + align_words); + rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, const0_rtx); + } } - *--r = gen_rtx_EXPR_LIST (VOIDmode, reg, const0_rtx); - ++n; + else + /* It's entirely in memory. */ + rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, NULL_RTX, const0_rtx); } - return gen_rtx_PARALLEL (mode, gen_rtvec_v (n, r)); + /* Describe where this piece goes in the fprs. */ + r = gen_rtx_REG (fmode, cum->fregno); + rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, const0_rtx); + + return gen_rtx_PARALLEL (mode, gen_rtvec_v (k, rvec)); } else if (align_words < GP_ARG_NUM_REG) { - if (TARGET_32BIT && TARGET_POWERPC64 - && (mode == DImode || mode == BLKmode)) - return rs6000_mixed_function_arg (cum, mode, type, align_words); + if (TARGET_32BIT && TARGET_POWERPC64) + return rs6000_mixed_function_arg (mode, type, align_words); return gen_rtx_REG (mode, GP_ARG_MIN_REG + align_words); } @@ -4594,15 +4578,20 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, } } -/* For an arg passed partly in registers and partly in memory, - this is the number of registers used. - For args passed entirely in registers or entirely in memory, zero. */ +/* For an arg passed partly in registers and partly in memory, this is + the number of registers used. For args passed entirely in registers + or entirely in memory, zero. When an arg is described by a PARALLEL, + perhaps using more than one register type, this function returns the + number of registers used by the first element of the PARALLEL. */ int function_arg_partial_nregs (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, int named) { int ret = 0; + int align; + int parm_offset; + int align_words; if (DEFAULT_ABI == ABI_V4) return 0; @@ -4611,17 +4600,29 @@ function_arg_partial_nregs (CUMULATIVE_ARGS *cum, enum machine_mode mode, && cum->nargs_prototype >= 0) return 0; - if (USE_FP_FOR_ARG_P (cum, mode, type)) + align = function_arg_boundary (mode, type) / PARM_BOUNDARY - 1; + parm_offset = TARGET_32BIT ? 2 : 0; + align_words = cum->words + ((parm_offset - cum->words) & align); + + if (USE_FP_FOR_ARG_P (cum, mode, type) + /* If we are passing this arg in gprs as well, then this function + should return the number of gprs (or memory) partially passed, + *not* the number of fprs. */ + && !(type + && (cum->nargs_prototype <= 0 + || (DEFAULT_ABI == ABI_AIX + && TARGET_XL_COMPAT + && align_words >= GP_ARG_NUM_REG)))) { if (cum->fregno + ((GET_MODE_SIZE (mode) + 7) >> 3) > FP_ARG_MAX_REG + 1) - ret = FP_ARG_MAX_REG - cum->fregno; + ret = FP_ARG_MAX_REG + 1 - cum->fregno; else if (cum->nargs_prototype >= 0) return 0; } - if (cum->words < GP_ARG_NUM_REG - && GP_ARG_NUM_REG < cum->words + rs6000_arg_size (mode, type)) - ret = GP_ARG_NUM_REG - cum->words; + if (align_words < GP_ARG_NUM_REG + && GP_ARG_NUM_REG < align_words + rs6000_arg_size (mode, type)) + ret = GP_ARG_NUM_REG - align_words; if (ret != 0 && TARGET_DEBUG_ARG) fprintf (stderr, "function_arg_partial_nregs: %d\n", ret); @@ -4776,6 +4777,7 @@ setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode, { mem = gen_rtx_MEM (DFmode, plus_constant (save_area, off)); set_mem_alias_set (mem, set); + set_mem_align (mem, GET_MODE_ALIGNMENT (DFmode)); emit_move_insn (mem, gen_rtx_REG (DFmode, fregno)); fregno++; off += 8; @@ -5695,6 +5697,7 @@ rs6000_expand_binop_builtin (enum insn_code icode, tree arglist, rtx target) || icode == CODE_FOR_spe_evsrwiu) { /* Only allow 5-bit unsigned literals. */ + STRIP_NOPS (arg1); if (TREE_CODE (arg1) != INTEGER_CST || TREE_INT_CST_LOW (arg1) & ~0x1f) { @@ -6120,6 +6123,8 @@ altivec_expand_dst_builtin (tree exp, rtx target ATTRIBUTE_UNUSED, || arg2 == error_mark_node) return const0_rtx; + *expandedp = true; + STRIP_NOPS (arg2); if (TREE_CODE (arg2) != INTEGER_CST || TREE_INT_CST_LOW (arg2) & ~0x3) { @@ -6136,7 +6141,6 @@ altivec_expand_dst_builtin (tree exp, rtx target ATTRIBUTE_UNUSED, if (pat != 0) emit_insn (pat); - *expandedp = true; return NULL_RTX; } @@ -6226,6 +6230,7 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp) case ALTIVEC_BUILTIN_DSS: icode = CODE_FOR_altivec_dss; arg0 = TREE_VALUE (arglist); + STRIP_NOPS (arg0); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); mode0 = insn_data[icode].operand[0].mode; @@ -6245,6 +6250,15 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp) emit_insn (gen_altivec_dss (op0)); return NULL_RTX; + + case ALTIVEC_BUILTIN_COMPILETIME_ERROR: + arg0 = TREE_VALUE (arglist); + while (TREE_CODE (arg0) == NOP_EXPR || TREE_CODE (arg0) == ADDR_EXPR) + arg0 = TREE_OPERAND (arg0, 0); + error ("invalid parameter combination for `%s' AltiVec intrinsic", + TREE_STRING_POINTER (arg0)); + + return const0_rtx; } /* Expand abs* operations. */ @@ -6684,6 +6698,73 @@ rs6000_init_builtins (void) opaque_V2SF_type_node = copy_node (V2SF_type_node); opaque_p_V2SI_type_node = build_pointer_type (opaque_V2SI_type_node); + /* The 'vector bool ...' types must be kept distinct from 'vector unsigned ...' + types, especially in C++ land. Similarly, 'vector pixel' is distinct from+ 'vector unsigned short'. */ + + bool_char_type_node = copy_node (unsigned_intQI_type_node); + TYPE_MAIN_VARIANT (bool_char_type_node) = bool_char_type_node; + bool_short_type_node = copy_node (unsigned_intHI_type_node); + TYPE_MAIN_VARIANT (bool_short_type_node) = bool_short_type_node; + bool_int_type_node = copy_node (unsigned_intSI_type_node); + TYPE_MAIN_VARIANT (bool_int_type_node) = bool_int_type_node; + pixel_type_node = copy_node (unsigned_intHI_type_node); + TYPE_MAIN_VARIANT (pixel_type_node) = pixel_type_node; + + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__bool char"), + bool_char_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__bool short"), + bool_short_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__bool int"), + bool_int_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__pixel"), + pixel_type_node)); + + bool_V16QI_type_node = make_vector (V16QImode, bool_char_type_node, 1); + bool_V8HI_type_node = make_vector (V8HImode, bool_short_type_node, 1); + bool_V4SI_type_node = make_vector (V4SImode, bool_int_type_node, 1); + pixel_V8HI_type_node = make_vector (V8HImode, pixel_type_node, 1); + + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector unsigned char"), + unsigned_V16QI_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector signed char"), + V16QI_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector __bool char"), + bool_V16QI_type_node)); + + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector unsigned short"), + unsigned_V8HI_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector signed short"), + V8HI_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector __bool short"), + bool_V8HI_type_node)); + + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector unsigned int"), + unsigned_V4SI_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector signed int"), + V4SI_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector __bool int"), + bool_V4SI_type_node)); + + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector float"), + V4SF_type_node)); + (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, + get_identifier ("__vector __pixel"), + pixel_V8HI_type_node)); + if (TARGET_SPE) spe_init_builtins (); if (TARGET_ALTIVEC) @@ -6989,8 +7070,8 @@ altivec_init_builtins (void) = build_function_type (V8HI_type_node, void_list_node); tree void_ftype_void = build_function_type (void_type_node, void_list_node); - tree void_ftype_qi - = build_function_type_list (void_type_node, char_type_node, NULL_TREE); + tree void_ftype_int + = build_function_type_list (void_type_node, integer_type_node, NULL_TREE); tree v16qi_ftype_long_pcvoid = build_function_type_list (V16QI_type_node, @@ -7034,10 +7115,13 @@ altivec_init_builtins (void) = build_function_type_list (V16QI_type_node, V16QI_type_node, NULL_TREE); tree v4sf_ftype_v4sf = build_function_type_list (V4SF_type_node, V4SF_type_node, NULL_TREE); - tree void_ftype_pcvoid_int_char + tree void_ftype_pcvoid_int_int = build_function_type_list (void_type_node, pcvoid_type_node, integer_type_node, - char_type_node, NULL_TREE); + integer_type_node, NULL_TREE); + tree int_ftype_pcchar + = build_function_type_list (integer_type_node, + pcchar_type_node, NULL_TREE); def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4sf", v4sf_ftype_pcfloat, ALTIVEC_BUILTIN_LD_INTERNAL_4sf); @@ -7058,7 +7142,7 @@ altivec_init_builtins (void) def_builtin (MASK_ALTIVEC, "__builtin_altivec_mtvscr", void_ftype_v4si, ALTIVEC_BUILTIN_MTVSCR); def_builtin (MASK_ALTIVEC, "__builtin_altivec_mfvscr", v8hi_ftype_void, ALTIVEC_BUILTIN_MFVSCR); def_builtin (MASK_ALTIVEC, "__builtin_altivec_dssall", void_ftype_void, ALTIVEC_BUILTIN_DSSALL); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_dss", void_ftype_qi, ALTIVEC_BUILTIN_DSS); + def_builtin (MASK_ALTIVEC, "__builtin_altivec_dss", void_ftype_int, ALTIVEC_BUILTIN_DSS); def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvsl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSL); def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvsr", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSR); def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvebx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEBX); @@ -7072,10 +7156,14 @@ altivec_init_builtins (void) def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvebx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVEBX); def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvehx", void_ftype_v8hi_long_pvoid, ALTIVEC_BUILTIN_STVEHX); + /* See altivec.h for usage of "__builtin_altivec_compiletime_error". */ + def_builtin (MASK_ALTIVEC, "__builtin_altivec_compiletime_error", int_ftype_pcchar, + ALTIVEC_BUILTIN_COMPILETIME_ERROR); + /* Add the DST variants. */ d = (struct builtin_description *) bdesc_dst; for (i = 0; i < ARRAY_SIZE (bdesc_dst); i++, d++) - def_builtin (d->mask, d->name, void_ftype_pcvoid_int_char, d->code); + def_builtin (d->mask, d->name, void_ftype_pcvoid_int_int, d->code); /* Initialize the predicates. */ dp = (struct builtin_description_predicates *) bdesc_altivec_preds; @@ -7160,12 +7248,12 @@ rs6000_common_init_builtins (void) = build_function_type_list (V16QI_type_node, V16QI_type_node, V16QI_type_node, V16QI_type_node, NULL_TREE); - tree v4si_ftype_char - = build_function_type_list (V4SI_type_node, char_type_node, NULL_TREE); - tree v8hi_ftype_char - = build_function_type_list (V8HI_type_node, char_type_node, NULL_TREE); - tree v16qi_ftype_char - = build_function_type_list (V16QI_type_node, char_type_node, NULL_TREE); + tree v4si_ftype_int + = build_function_type_list (V4SI_type_node, integer_type_node, NULL_TREE); + tree v8hi_ftype_int + = build_function_type_list (V8HI_type_node, integer_type_node, NULL_TREE); + tree v16qi_ftype_int + = build_function_type_list (V16QI_type_node, integer_type_node, NULL_TREE); tree v8hi_ftype_v16qi = build_function_type_list (V8HI_type_node, V16QI_type_node, NULL_TREE); tree v4sf_ftype_v4sf @@ -7223,37 +7311,37 @@ rs6000_common_init_builtins (void) tree v4si_ftype_v4si_v4si = build_function_type_list (V4SI_type_node, V4SI_type_node, V4SI_type_node, NULL_TREE); - tree v4sf_ftype_v4si_char + tree v4sf_ftype_v4si_int = build_function_type_list (V4SF_type_node, - V4SI_type_node, char_type_node, NULL_TREE); - tree v4si_ftype_v4sf_char + V4SI_type_node, integer_type_node, NULL_TREE); + tree v4si_ftype_v4sf_int = build_function_type_list (V4SI_type_node, - V4SF_type_node, char_type_node, NULL_TREE); - tree v4si_ftype_v4si_char + V4SF_type_node, integer_type_node, NULL_TREE); + tree v4si_ftype_v4si_int = build_function_type_list (V4SI_type_node, - V4SI_type_node, char_type_node, NULL_TREE); - tree v8hi_ftype_v8hi_char + V4SI_type_node, integer_type_node, NULL_TREE); + tree v8hi_ftype_v8hi_int = build_function_type_list (V8HI_type_node, - V8HI_type_node, char_type_node, NULL_TREE); - tree v16qi_ftype_v16qi_char + V8HI_type_node, integer_type_node, NULL_TREE); + tree v16qi_ftype_v16qi_int = build_function_type_list (V16QI_type_node, - V16QI_type_node, char_type_node, NULL_TREE); - tree v16qi_ftype_v16qi_v16qi_char + V16QI_type_node, integer_type_node, NULL_TREE); + tree v16qi_ftype_v16qi_v16qi_int = build_function_type_list (V16QI_type_node, V16QI_type_node, V16QI_type_node, - char_type_node, NULL_TREE); - tree v8hi_ftype_v8hi_v8hi_char + integer_type_node, NULL_TREE); + tree v8hi_ftype_v8hi_v8hi_int = build_function_type_list (V8HI_type_node, V8HI_type_node, V8HI_type_node, - char_type_node, NULL_TREE); - tree v4si_ftype_v4si_v4si_char + integer_type_node, NULL_TREE); + tree v4si_ftype_v4si_v4si_int = build_function_type_list (V4SI_type_node, V4SI_type_node, V4SI_type_node, - char_type_node, NULL_TREE); - tree v4sf_ftype_v4sf_v4sf_char + integer_type_node, NULL_TREE); + tree v4sf_ftype_v4sf_v4sf_int = build_function_type_list (V4SF_type_node, V4SF_type_node, V4SF_type_node, - char_type_node, NULL_TREE); + integer_type_node, NULL_TREE); tree v4sf_ftype_v4sf_v4sf = build_function_type_list (V4SF_type_node, V4SF_type_node, V4SF_type_node, NULL_TREE); @@ -7396,22 +7484,22 @@ rs6000_common_init_builtins (void) /* vchar, vchar, vchar, 4 bit literal. */ else if (mode0 == V16QImode && mode1 == mode0 && mode2 == mode0 && mode3 == QImode) - type = v16qi_ftype_v16qi_v16qi_char; + type = v16qi_ftype_v16qi_v16qi_int; /* vshort, vshort, vshort, 4 bit literal. */ else if (mode0 == V8HImode && mode1 == mode0 && mode2 == mode0 && mode3 == QImode) - type = v8hi_ftype_v8hi_v8hi_char; + type = v8hi_ftype_v8hi_v8hi_int; /* vint, vint, vint, 4 bit literal. */ else if (mode0 == V4SImode && mode1 == mode0 && mode2 == mode0 && mode3 == QImode) - type = v4si_ftype_v4si_v4si_char; + type = v4si_ftype_v4si_v4si_int; /* vfloat, vfloat, vfloat, 4 bit literal. */ else if (mode0 == V4SFmode && mode1 == mode0 && mode2 == mode0 && mode3 == QImode) - type = v4sf_ftype_v4sf_v4sf_char; + type = v4sf_ftype_v4sf_v4sf_int; else abort (); @@ -7500,23 +7588,23 @@ rs6000_common_init_builtins (void) /* vint, vint, 5 bit literal. */ else if (mode0 == V4SImode && mode1 == V4SImode && mode2 == QImode) - type = v4si_ftype_v4si_char; + type = v4si_ftype_v4si_int; /* vshort, vshort, 5 bit literal. */ else if (mode0 == V8HImode && mode1 == V8HImode && mode2 == QImode) - type = v8hi_ftype_v8hi_char; + type = v8hi_ftype_v8hi_int; /* vchar, vchar, 5 bit literal. */ else if (mode0 == V16QImode && mode1 == V16QImode && mode2 == QImode) - type = v16qi_ftype_v16qi_char; + type = v16qi_ftype_v16qi_int; /* vfloat, vint, 5 bit literal. */ else if (mode0 == V4SFmode && mode1 == V4SImode && mode2 == QImode) - type = v4sf_ftype_v4si_char; + type = v4sf_ftype_v4si_int; /* vint, vfloat, 5 bit literal. */ else if (mode0 == V4SImode && mode1 == V4SFmode && mode2 == QImode) - type = v4si_ftype_v4sf_char; + type = v4si_ftype_v4sf_int; else if (mode0 == V2SImode && mode1 == SImode && mode2 == SImode) type = v2si_ftype_int_int; @@ -7569,11 +7657,11 @@ rs6000_common_init_builtins (void) mode1 = insn_data[d->icode].operand[1].mode; if (mode0 == V4SImode && mode1 == QImode) - type = v4si_ftype_char; + type = v4si_ftype_int; else if (mode0 == V8HImode && mode1 == QImode) - type = v8hi_ftype_char; + type = v8hi_ftype_int; else if (mode0 == V16QImode && mode1 == QImode) - type = v16qi_ftype_char; + type = v16qi_ftype_int; else if (mode0 == V4SFmode && mode1 == V4SFmode) type = v4sf_ftype_v4sf; else if (mode0 == V8HImode && mode1 == V16QImode) @@ -7614,11 +7702,21 @@ rs6000_init_libfuncs (void) set_conv_libfunc (ufix_optab, SImode, TFmode, "_quitrunc"); } - /* Standard AIX/Darwin/64-bit SVR4 quad floating point routines. */ - set_optab_libfunc (add_optab, TFmode, "_xlqadd"); - set_optab_libfunc (sub_optab, TFmode, "_xlqsub"); - set_optab_libfunc (smul_optab, TFmode, "_xlqmul"); - set_optab_libfunc (sdiv_optab, TFmode, "_xlqdiv"); + /* AIX/Darwin/64-bit Linux quad floating point routines. */ + if (!TARGET_XL_COMPAT) + { + set_optab_libfunc (add_optab, TFmode, "__gcc_qadd"); + set_optab_libfunc (sub_optab, TFmode, "__gcc_qsub"); + set_optab_libfunc (smul_optab, TFmode, "__gcc_qmul"); + set_optab_libfunc (sdiv_optab, TFmode, "__gcc_qdiv"); + } + else + { + set_optab_libfunc (add_optab, TFmode, "_xlqadd"); + set_optab_libfunc (sub_optab, TFmode, "_xlqsub"); + set_optab_libfunc (smul_optab, TFmode, "_xlqmul"); + set_optab_libfunc (sdiv_optab, TFmode, "_xlqdiv"); + } } else { @@ -8982,12 +9080,12 @@ print_operand (FILE *file, rtx x, int code) return; case 'D': - /* Like 'J' but get to the GT bit. */ + /* Like 'J' but get to the EQ bit. */ if (GET_CODE (x) != REG) abort (); - /* Bit 1 is GT bit. */ - i = 4 * (REGNO (x) - CR0_REGNO) + 1; + /* Bit 1 is EQ bit. */ + i = 4 * (REGNO (x) - CR0_REGNO) + 2; /* If we want bit 31, write a shift count of zero, not 32. */ fprintf (file, "%d", i == 31 ? 0 : i + 1); @@ -9182,12 +9280,12 @@ print_operand (FILE *file, rtx x, int code) case 'P': /* The operand must be an indirect memory reference. The result - is the register number. */ + is the register name. */ if (GET_CODE (x) != MEM || GET_CODE (XEXP (x, 0)) != REG || REGNO (XEXP (x, 0)) >= 32) output_operand_lossage ("invalid %%P value"); else - fprintf (file, "%d", REGNO (XEXP (x, 0))); + fprintf (file, "%s", reg_names[REGNO (XEXP (x, 0))]); return; case 'q': @@ -9659,7 +9757,7 @@ rs6000_assemble_integer (rtx x, unsigned int size, int aligned_p) { #ifdef RELOCATABLE_NEEDS_FIXUP /* Special handling for SI values. */ - if (size == 4 && aligned_p) + if (RELOCATABLE_NEEDS_FIXUP && size == 4 && aligned_p) { extern int in_toc_section (void); static int recurse = 0; @@ -9858,10 +9956,34 @@ rs6000_generate_compare (enum rtx_code code) emit_insn (cmp); } else - emit_insn (gen_rtx_SET (VOIDmode, compare_result, - gen_rtx_COMPARE (comp_mode, - rs6000_compare_op0, - rs6000_compare_op1))); + { + /* Generate XLC-compatible TFmode compare as PARALLEL with extra + CLOBBERs to match cmptf_internal2 pattern. */ + if (comp_mode == CCFPmode && TARGET_XL_COMPAT + && GET_MODE (rs6000_compare_op0) == TFmode + && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128) + emit_insn (gen_rtx_PARALLEL (VOIDmode, + gen_rtvec (9, + gen_rtx_SET (VOIDmode, + compare_result, + gen_rtx_COMPARE (comp_mode, + rs6000_compare_op0, + rs6000_compare_op1)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode))))); + else + emit_insn (gen_rtx_SET (VOIDmode, compare_result, + gen_rtx_COMPARE (comp_mode, + rs6000_compare_op0, + rs6000_compare_op1))); + } /* Some kinds of FP comparisons need an OR operation; under flag_finite_math_only we don't bother. */ @@ -9929,9 +10051,9 @@ rs6000_emit_sCOND (enum rtx_code code, rtx result) abort (); if (cond_code == NE) - emit_insn (gen_e500_flip_gt_bit (t, t)); + emit_insn (gen_e500_flip_eq_bit (t, t)); - emit_insn (gen_move_from_CR_gt_bit (result, t)); + emit_insn (gen_move_from_CR_eq_bit (result, t)); return; } @@ -10112,9 +10234,9 @@ output_cbranch (rtx op, const char *label, int reversed, rtx insn) return string; } -/* Return the string to flip the GT bit on a CR. */ +/* Return the string to flip the EQ bit on a CR. */ char * -output_e500_flip_gt_bit (rtx dst, rtx src) +output_e500_flip_eq_bit (rtx dst, rtx src) { static char string[64]; int a, b; @@ -10123,9 +10245,9 @@ output_e500_flip_gt_bit (rtx dst, rtx src) || GET_CODE (src) != REG || ! CR_REGNO_P (REGNO (src))) abort (); - /* GT bit. */ - a = 4 * (REGNO (dst) - CR0_REGNO) + 1; - b = 4 * (REGNO (src) - CR0_REGNO) + 1; + /* EQ bit. */ + a = 4 * (REGNO (dst) - CR0_REGNO) + 2; + b = 4 * (REGNO (src) - CR0_REGNO) + 2; sprintf (string, "crnot %d,%d", a, b); return string; @@ -10435,22 +10557,27 @@ rs6000_split_multireg_move (rtx dst, rtx src) : gen_adddi3 (breg, breg, delta_rtx)); src = gen_rtx_MEM (mode, breg); } + else if (! offsettable_memref_p (src)) + { + rtx newsrc, basereg; + basereg = gen_rtx_REG (Pmode, reg); + emit_insn (gen_rtx_SET (VOIDmode, basereg, XEXP (src, 0))); + newsrc = gen_rtx_MEM (GET_MODE (src), basereg); + MEM_COPY_ATTRIBUTES (newsrc, src); + src = newsrc; + } - /* We have now address involving an base register only. - If we use one of the registers to address memory, - we have change that register last. */ - - breg = (GET_CODE (XEXP (src, 0)) == PLUS - ? XEXP (XEXP (src, 0), 0) - : XEXP (src, 0)); - - if (!REG_P (breg)) - abort(); + breg = XEXP (src, 0); + if (GET_CODE (breg) == PLUS || GET_CODE (breg) == LO_SUM) + breg = XEXP (breg, 0); - if (REGNO (breg) >= REGNO (dst) + /* If the base register we are using to address memory is + also a destination reg, then change that register last. */ + if (REG_P (breg) + && REGNO (breg) >= REGNO (dst) && REGNO (breg) < REGNO (dst) + nregs) j = REGNO (breg) - REGNO (dst); - } + } if (GET_CODE (dst) == MEM && INT_REGNO_P (reg)) { @@ -10482,6 +10609,8 @@ rs6000_split_multireg_move (rtx dst, rtx src) : gen_adddi3 (breg, breg, delta_rtx)); dst = gen_rtx_MEM (mode, breg); } + else if (! offsettable_memref_p (dst)) + abort (); } for (i = 0; i < nregs; i++) @@ -10491,7 +10620,7 @@ rs6000_split_multireg_move (rtx dst, rtx src) if (j == nregs) j = 0; - /* If compiler already emited move of first word by + /* If compiler already emitted move of first word by store with update, no need to do anything. */ if (j == 0 && used_update) continue; @@ -10523,7 +10652,8 @@ first_reg_to_save (void) && (! call_used_regs[first_reg] || (first_reg == RS6000_PIC_OFFSET_TABLE_REGNUM && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0) - || (DEFAULT_ABI == ABI_DARWIN && flag_pic))))) + || (DEFAULT_ABI == ABI_DARWIN && flag_pic) + || (TARGET_TOC && TARGET_MINIMAL_TOC))))) break; #if TARGET_MACHO @@ -10719,6 +10849,7 @@ rs6000_stack_info (void) rs6000_stack_t *info_ptr = &info; int reg_size = TARGET_32BIT ? 4 : 8; int ehrd_size; + int save_align; HOST_WIDE_INT non_fixed_size; /* Zero all fields portably. */ @@ -10936,6 +11067,7 @@ rs6000_stack_info (void) break; } + save_align = (TARGET_ALTIVEC_ABI || DEFAULT_ABI == ABI_DARWIN) ? 16 : 8; info_ptr->save_size = RS6000_ALIGN (info_ptr->fp_size + info_ptr->gp_size + info_ptr->altivec_size @@ -10947,8 +11079,7 @@ rs6000_stack_info (void) + info_ptr->lr_size + info_ptr->vrsave_size + info_ptr->toc_size, - (TARGET_ALTIVEC_ABI || ABI_DARWIN) - ? 16 : 8); + save_align); non_fixed_size = (info_ptr->vars_size + info_ptr->parm_size @@ -11342,7 +11473,6 @@ rs6000_emit_load_toc_table (int fromprolog) rtx temp0 = (fromprolog ? gen_rtx_REG (Pmode, 0) : gen_reg_rtx (Pmode)); - rtx symF; /* possibly create the toc section */ if (! toc_initialized) @@ -11353,7 +11483,7 @@ rs6000_emit_load_toc_table (int fromprolog) if (fromprolog) { - rtx symL; + rtx symF, symL; ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); symF = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); @@ -11371,14 +11501,9 @@ rs6000_emit_load_toc_table (int fromprolog) else { rtx tocsym; - static int reload_toc_labelno = 0; tocsym = gen_rtx_SYMBOL_REF (Pmode, toc_label_name); - - ASM_GENERATE_INTERNAL_LABEL (buf, "LCG", reload_toc_labelno++); - symF = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); - - emit_insn (gen_load_toc_v4_PIC_1b (tempLR, symF, tocsym)); + emit_insn (gen_load_toc_v4_PIC_1b (tempLR, tocsym)); emit_move_insn (dest, tempLR); emit_move_insn (temp0, gen_rtx_MEM (Pmode, dest)); } @@ -12007,8 +12132,10 @@ rs6000_emit_prologue (void) rtx reg, mem, vrsave; int offset; - /* Get VRSAVE onto a GPR. */ - reg = gen_rtx_REG (SImode, 12); + /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12 + as frame_reg_rtx and r11 as the static chain pointer for + nested functions. */ + reg = gen_rtx_REG (SImode, 0); vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO); if (TARGET_MACHO) emit_insn (gen_get_vrsave_internal (reg)); @@ -12117,7 +12244,10 @@ rs6000_emit_prologue (void) int i; for (i = 0; i < 32 - info->first_gp_reg_save; i++) if ((regs_ever_live[info->first_gp_reg_save+i] - && ! call_used_regs[info->first_gp_reg_save+i]) + && (! call_used_regs[info->first_gp_reg_save+i] + || (i+info->first_gp_reg_save + == RS6000_PIC_OFFSET_TABLE_REGNUM + && TARGET_TOC && TARGET_MINIMAL_TOC))) || (i+info->first_gp_reg_save == RS6000_PIC_OFFSET_TABLE_REGNUM && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0) || (DEFAULT_ABI == ABI_DARWIN && flag_pic)))) @@ -12566,7 +12696,9 @@ rs6000_emit_epilogue (int sibcall) else for (i = 0; i < 32 - info->first_gp_reg_save; i++) if ((regs_ever_live[info->first_gp_reg_save+i] - && ! call_used_regs[info->first_gp_reg_save+i]) + && (! call_used_regs[info->first_gp_reg_save+i] + || (i+info->first_gp_reg_save == RS6000_PIC_OFFSET_TABLE_REGNUM + && TARGET_TOC && TARGET_MINIMAL_TOC))) || (i+info->first_gp_reg_save == RS6000_PIC_OFFSET_TABLE_REGNUM && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0) || (DEFAULT_ABI == ABI_DARWIN && flag_pic)))) @@ -14845,11 +14977,117 @@ rs6000_initialize_trampoline (rtx addr, rtx fnaddr, rtx cxt) const struct attribute_spec rs6000_attribute_table[] = { /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ + { "altivec", 1, 1, false, true, false, rs6000_handle_altivec_attribute }, { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute }, { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute }, { NULL, 0, 0, false, false, false, NULL } }; +/* Handle the "altivec" attribute. The attribute may have + arguments as follows: + + __attribute__((altivec(vector__))) + __attribute__((altivec(pixel__))) (always followed by 'unsigned short') + __attribute__((altivec(bool__))) (always followed by 'unsigned') + + and may appear more than once (e.g., 'vector bool char') in a + given declaration. */ + +static tree +rs6000_handle_altivec_attribute (tree *node, tree name, tree args, + int flags ATTRIBUTE_UNUSED, + bool *no_add_attrs) +{ + tree type = *node, result = NULL_TREE; + enum machine_mode mode; + int unsigned_p; + char altivec_type + = ((args && TREE_CODE (args) == TREE_LIST && TREE_VALUE (args) + && TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE) + ? *IDENTIFIER_POINTER (TREE_VALUE (args)) + : '?'); + + while (POINTER_TYPE_P (type) + || TREE_CODE (type) == FUNCTION_TYPE + || TREE_CODE (type) == METHOD_TYPE + || TREE_CODE (type) == ARRAY_TYPE) + type = TREE_TYPE (type); + + mode = TYPE_MODE (type); + + if (rs6000_warn_altivec_long + && (type == long_unsigned_type_node || type == long_integer_type_node)) + warning ("use of 'long' in AltiVec types is deprecated; use 'int'"); + + switch (altivec_type) + { + case 'v': + unsigned_p = TREE_UNSIGNED (type); + switch (mode) + { + case SImode: + result = (unsigned_p ? unsigned_V4SI_type_node : V4SI_type_node); + break; + case HImode: + result = (unsigned_p ? unsigned_V8HI_type_node : V8HI_type_node); + break; + case QImode: + result = (unsigned_p ? unsigned_V16QI_type_node : V16QI_type_node); + break; + case SFmode: result = V4SF_type_node; break; + /* If the user says 'vector int bool', we may be handed the 'bool' + attribute _before_ the 'vector' attribute, and so select the proper + type in the 'b' case below. */ + case V4SImode: case V8HImode: case V16QImode: result = type; + default: break; + } + break; + case 'b': + switch (mode) + { + case SImode: case V4SImode: result = bool_V4SI_type_node; break; + case HImode: case V8HImode: result = bool_V8HI_type_node; break; + case QImode: case V16QImode: result = bool_V16QI_type_node; + default: break; + } + break; + case 'p': + switch (mode) + { + case V8HImode: result = pixel_V8HI_type_node; + default: break; + } + default: break; + } + + if (result && result != type && TYPE_READONLY (type)) + result = build_qualified_type (result, TYPE_QUAL_CONST); + + *no_add_attrs = true; /* No need to hang on to the attribute. */ + + if (!result) + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + else + *node = reconstruct_complex_type (*node, result); + + return NULL_TREE; +} + +/* AltiVec defines four built-in scalar types that serve as vector + elements; we must teach the compiler how to mangle them. */ + +static const char * +rs6000_mangle_fundamental_type (tree type) +{ + if (type == bool_char_type_node) return "U6__boolc"; + if (type == bool_short_type_node) return "U6__bools"; + if (type == pixel_type_node) return "u7__pixel"; + if (type == bool_int_type_node) return "U6__booli"; + + /* For all other types, use normal C++ mangling. */ + return NULL; +} + /* Handle a "longcall" or "shortcall" attribute; arguments as in struct attribute_spec.handler. */ @@ -14998,6 +15236,18 @@ rs6000_elf_in_small_data_p (tree decl) if (rs6000_sdata == SDATA_NONE) return false; + /* We want to merge strings, so we never consider them small data. */ + if (TREE_CODE (decl) == STRING_CST) + return false; + + /* Functions are never in the small data area. */ + if (TREE_CODE (decl) == FUNCTION_DECL) + return false; + + /* Thread-local vars can't go in the small data area. */ + if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl)) + return false; + if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl)) { const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); @@ -15539,6 +15789,13 @@ rs6000_elf_declare_function_name (FILE *file, const char *name, tree decl) } ASM_OUTPUT_LABEL (file, name); } + +static void +rs6000_elf_end_indicate_exec_stack (void) +{ + if (TARGET_32BIT) + file_end_indicate_exec_stack (); +} #endif #if TARGET_XCOFF diff --git a/contrib/gcc/config/rs6000/rs6000.h b/contrib/gcc/config/rs6000/rs6000.h index d3a66dd..f1ad896 100644 --- a/contrib/gcc/config/rs6000/rs6000.h +++ b/contrib/gcc/config/rs6000/rs6000.h @@ -258,7 +258,7 @@ extern int target_flags; #define TARGET_POWERPC64 (target_flags & MASK_POWERPC64) #endif -#define TARGET_XL_CALL 0 +#define TARGET_XL_COMPAT 0 /* Run-time compilation parameters selecting different hardware subsets. @@ -464,6 +464,9 @@ enum group_termination {"longcall", &rs6000_longcall_switch, \ N_("Avoid all range limits on call instructions"), 0}, \ {"no-longcall", &rs6000_longcall_switch, "", 0}, \ + {"warn-altivec-long", &rs6000_warn_altivec_long_switch, \ + N_("Warn about deprecated 'vector long ...' AltiVec type usage"), 0}, \ + {"no-warn-altivec-long", &rs6000_warn_altivec_long_switch, "", 0}, \ {"sched-costly-dep=", &rs6000_sched_costly_dep_str, \ N_("Determine which dependences between insns are considered costly"), 0}, \ {"insert-sched-nops=", &rs6000_sched_insert_nops_str, \ @@ -532,6 +535,9 @@ extern enum rs6000_dependence_cost rs6000_sched_costly_dep; extern const char *rs6000_sched_insert_nops_str; extern enum rs6000_nop_insertion rs6000_sched_insert_nops; +extern int rs6000_warn_altivec_long; +extern const char *rs6000_warn_altivec_long_switch; + /* Alignment options for fields in structures for sub-targets following AIX-like ABI. ALIGN_POWER word-aligns FP doubles (default AIX ABI). @@ -1165,6 +1171,9 @@ extern enum rs6000_nop_insertion rs6000_sched_insert_nops; = fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \ = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \ = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1; \ + if (TARGET_TOC && TARGET_MINIMAL_TOC) \ + fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \ + = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1; \ if (TARGET_ALTIVEC) \ global_regs[VSCR_REGNO] = 1; \ if (TARGET_SPE) \ @@ -2918,9 +2927,10 @@ enum rs6000_builtins ALTIVEC_BUILTIN_ABS_V4SI, ALTIVEC_BUILTIN_ABS_V4SF, ALTIVEC_BUILTIN_ABS_V8HI, - ALTIVEC_BUILTIN_ABS_V16QI + ALTIVEC_BUILTIN_ABS_V16QI, + ALTIVEC_BUILTIN_COMPILETIME_ERROR, /* SPE builtins. */ - , SPE_BUILTIN_EVADDW, + SPE_BUILTIN_EVADDW, SPE_BUILTIN_EVAND, SPE_BUILTIN_EVANDC, SPE_BUILTIN_EVDIVWS, diff --git a/contrib/gcc/config/rs6000/rs6000.md b/contrib/gcc/config/rs6000/rs6000.md index 0fc4c04..3b062ce 100644 --- a/contrib/gcc/config/rs6000/rs6000.md +++ b/contrib/gcc/config/rs6000/rs6000.md @@ -1,6 +1,6 @@ ;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler ;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; This file is part of GCC. @@ -50,7 +50,7 @@ (UNSPEC_TLSGOTTPREL 28) (UNSPEC_TLSTLS 29) (UNSPEC_FIX_TRUNC_TF 30) ; fadd, rounding towards zero - (UNSPEC_MV_CR_GT 31) ; move_from_CR_gt_bit + (UNSPEC_MV_CR_EQ 31) ; move_from_CR_eq_bit ]) ;; @@ -2404,61 +2404,6 @@ }" [(set_attr "length" "8")]) -(define_insn_and_split "*andsi3_internal7" - [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y") - (compare:CC (and:SI (match_operand:SI 0 "gpc_reg_operand" "r,r") - (match_operand:SI 1 "mask_operand_wrap" "i,i")) - (const_int 0))) - (clobber (match_scratch:SI 3 "=r,r"))] - "TARGET_POWERPC64" - "#" - "TARGET_POWERPC64" - [(parallel [(set (match_dup 2) - (compare:CC (and:SI (rotate:SI (match_dup 0) (match_dup 4)) - (match_dup 5)) - (const_int 0))) - (clobber (match_dup 3))])] - " -{ - int mb = extract_MB (operands[1]); - int me = extract_ME (operands[1]); - operands[4] = GEN_INT (me + 1); - operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb))); -}" - [(set_attr "type" "delayed_compare,compare") - (set_attr "length" "4,8")]) - -(define_insn_and_split "*andsi3_internal8" - [(set (match_operand:CC 3 "cc_reg_operand" "=x,??y") - (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") - (match_operand:SI 2 "mask_operand_wrap" "i,i")) - (const_int 0))) - (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") - (and:SI (match_dup 1) - (match_dup 2)))] - "TARGET_POWERPC64" - "#" - "TARGET_POWERPC64" - [(parallel [(set (match_dup 3) - (compare:CC (and:SI (rotate:SI (match_dup 1) (match_dup 4)) - (match_dup 5)) - (const_int 0))) - (set (match_dup 0) - (and:SI (rotate:SI (match_dup 1) (match_dup 4)) - (match_dup 5)))]) - (set (match_dup 0) - (rotate:SI (match_dup 0) (match_dup 6)))] - " -{ - int mb = extract_MB (operands[2]); - int me = extract_ME (operands[2]); - operands[4] = GEN_INT (me + 1); - operands[6] = GEN_INT (32 - (me + 1)); - operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb))); -}" - [(set_attr "type" "delayed_compare,compare") - (set_attr "length" "8,12")]) - (define_expand "iorsi3" [(set (match_operand:SI 0 "gpc_reg_operand" "") (ior:SI (match_operand:SI 1 "gpc_reg_operand" "") @@ -5245,16 +5190,18 @@ (define_expand "floatdisf2" [(set (match_operand:SF 0 "gpc_reg_operand" "") (float:SF (match_operand:DI 1 "gpc_reg_operand" "")))] - "TARGET_64BIT && TARGET_HARD_FLOAT && TARGET_FPRS" + "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" " { + rtx val = operands[1]; if (!flag_unsafe_math_optimizations) { rtx label = gen_label_rtx (); - emit_insn (gen_floatdisf2_internal2 (operands[1], label)); + val = gen_reg_rtx (DImode); + emit_insn (gen_floatdisf2_internal2 (val, operands[1], label)); emit_label (label); } - emit_insn (gen_floatdisf2_internal1 (operands[0], operands[1])); + emit_insn (gen_floatdisf2_internal1 (operands[0], val)); DONE; }") @@ -5279,30 +5226,31 @@ ;; by a bit that won't be lost at that stage, but is below the SFmode ;; rounding position. (define_expand "floatdisf2_internal2" - [(parallel [(set (match_dup 4) - (compare:CC (and:DI (match_operand:DI 0 "" "") - (const_int 2047)) - (const_int 0))) - (set (match_dup 2) (and:DI (match_dup 0) (const_int 2047))) - (clobber (match_scratch:CC 7 ""))]) - (set (match_dup 3) (ashiftrt:DI (match_dup 0) (const_int 53))) - (set (match_dup 3) (plus:DI (match_dup 3) (const_int 1))) - (set (pc) (if_then_else (eq (match_dup 4) (const_int 0)) - (label_ref (match_operand:DI 1 "" "")) - (pc))) - (set (match_dup 5) (compare:CCUNS (match_dup 3) (const_int 2))) - (set (pc) (if_then_else (ltu (match_dup 5) (const_int 0)) - (label_ref (match_dup 1)) + [(set (match_dup 3) (ashiftrt:DI (match_operand:DI 1 "" "") + (const_int 53))) + (parallel [(set (match_operand:DI 0 "" "") (and:DI (match_dup 1) + (const_int 2047))) + (clobber (scratch:CC))]) + (set (match_dup 3) (plus:DI (match_dup 3) + (const_int 1))) + (set (match_dup 0) (plus:DI (match_dup 0) + (const_int 2047))) + (set (match_dup 4) (compare:CCUNS (match_dup 3) + (const_int 3))) + (set (match_dup 0) (ior:DI (match_dup 0) + (match_dup 1))) + (parallel [(set (match_dup 0) (and:DI (match_dup 0) + (const_int -2048))) + (clobber (scratch:CC))]) + (set (pc) (if_then_else (geu (match_dup 4) (const_int 0)) + (label_ref (match_operand:DI 2 "" "")) (pc))) - (set (match_dup 0) (xor:DI (match_dup 0) (match_dup 2))) - (set (match_dup 0) (ior:DI (match_dup 0) (const_int 2048)))] - "TARGET_64BIT && TARGET_HARD_FLOAT && TARGET_FPRS" + (set (match_dup 0) (match_dup 1))] + "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" " { - operands[2] = gen_reg_rtx (DImode); operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (CCmode); - operands[5] = gen_reg_rtx (CCUNSmode); + operands[4] = gen_reg_rtx (CCUNSmode); }") ;; Define the DImode operations that can be done in a small number @@ -8311,14 +8259,36 @@ DONE; }) -(define_insn "trunctfdf2" +(define_expand "trunctfdf2" + [(set (match_operand:DF 0 "gpc_reg_operand" "") + (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "")))] + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" + "") + +(define_insn_and_split "trunctfdf2_internal1" + [(set (match_operand:DF 0 "gpc_reg_operand" "=f,?f") + (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "0,f")))] + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && !TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" + "@ + # + fmr %0,%1" + "&& reload_completed && REGNO (operands[0]) == REGNO (operands[1])" + [(const_int 0)] +{ + emit_note (NOTE_INSN_DELETED); + DONE; +} + [(set_attr "type" "fp")]) + +(define_insn "trunctfdf2_internal2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "f")))] - "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && TARGET_XL_COMPAT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" "fadd %0,%1,%L1" - [(set_attr "type" "fp") - (set_attr "length" "4")]) + [(set_attr "type" "fp")]) (define_insn_and_split "trunctfsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") @@ -10081,11 +10051,10 @@ (define_insn "load_toc_v4_PIC_1b" [(set (match_operand:SI 0 "register_operand" "=l") - (match_operand:SI 1 "immediate_operand" "s")) - (use (unspec [(match_dup 1) (match_operand 2 "immediate_operand" "s")] + (unspec:SI [(match_operand:SI 1 "immediate_operand" "s")] UNSPEC_TOCPTR))] "TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2" - "bcl 20,31,%1+4\\n%1:\\n\\t.long %2-%1" + "bcl 20,31,$+8\\n\\t.long %1-$" [(set_attr "type" "branch") (set_attr "length" "8")]) @@ -11349,11 +11318,72 @@ [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f") (match_operand:TF 2 "gpc_reg_operand" "f")))] - "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && !TARGET_XL_COMPAT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" "fcmpu %0,%1,%2\;bne %0,$+8\;fcmpu %0,%L1,%L2" [(set_attr "type" "fpcompare") (set_attr "length" "12")]) + +(define_insn_and_split "*cmptf_internal2" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") + (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f") + (match_operand:TF 2 "gpc_reg_operand" "f"))) + (clobber (match_scratch:DF 3 "=f")) + (clobber (match_scratch:DF 4 "=f")) + (clobber (match_scratch:DF 5 "=f")) + (clobber (match_scratch:DF 6 "=f")) + (clobber (match_scratch:DF 7 "=f")) + (clobber (match_scratch:DF 8 "=f")) + (clobber (match_scratch:DF 9 "=f")) + (clobber (match_scratch:DF 10 "=f"))] + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" + "#" + "&& reload_completed" + [(set (match_dup 3) (match_dup 13)) + (set (match_dup 4) (match_dup 14)) + (set (match_dup 9) (abs:DF (match_dup 5))) + (set (match_dup 0) (compare:CCFP (match_dup 9) (match_dup 3))) + (set (pc) (if_then_else (ne (match_dup 0) (const_int 0)) + (label_ref (match_dup 11)) + (pc))) + (set (match_dup 0) (compare:CCFP (match_dup 5) (match_dup 7))) + (set (pc) (label_ref (match_dup 12))) + (match_dup 11) + (set (match_dup 10) (minus:DF (match_dup 5) (match_dup 7))) + (set (match_dup 9) (minus:DF (match_dup 6) (match_dup 8))) + (set (match_dup 9) (plus:DF (match_dup 10) (match_dup 9))) + (set (match_dup 0) (compare:CCFP (match_dup 7) (match_dup 4))) + (match_dup 12)] +{ + REAL_VALUE_TYPE rv; + const int lo_word = FLOAT_WORDS_BIG_ENDIAN ? GET_MODE_SIZE (DFmode) : 0; + const int hi_word = FLOAT_WORDS_BIG_ENDIAN ? 0 : GET_MODE_SIZE (DFmode); + + operands[5] = simplify_gen_subreg (DFmode, operands[1], TFmode, hi_word); + operands[6] = simplify_gen_subreg (DFmode, operands[1], TFmode, lo_word); + operands[7] = simplify_gen_subreg (DFmode, operands[2], TFmode, hi_word); + operands[8] = simplify_gen_subreg (DFmode, operands[2], TFmode, lo_word); + operands[11] = gen_label_rtx (); + operands[12] = gen_label_rtx (); + real_inf (&rv); + operands[13] = force_const_mem (DFmode, + CONST_DOUBLE_FROM_REAL_VALUE (rv, DFmode)); + operands[14] = force_const_mem (DFmode, + CONST_DOUBLE_FROM_REAL_VALUE (dconst0, + DFmode)); + if (TARGET_TOC) + { + operands[13] = gen_rtx_MEM (DFmode, + create_TOC_reference (XEXP (operands[13], 0))); + operands[14] = gen_rtx_MEM (DFmode, + create_TOC_reference (XEXP (operands[14], 0))); + set_mem_alias_set (operands[13], get_TOC_alias_set ()); + set_mem_alias_set (operands[14], get_TOC_alias_set ()); + RTX_UNCHANGING_P (operands[13]) = 1; + RTX_UNCHANGING_P (operands[14]) = 1; + } +}) ;; Now we have the scc insns. We can do some combinations because of the ;; way the machine works. @@ -11376,10 +11406,10 @@ (const_string "mfcr"))) (set_attr "length" "12")]) -;; Same as above, but get the GT bit. -(define_insn "move_from_CR_gt_bit" +;; Same as above, but get the EQ bit. +(define_insn "move_from_CR_eq_bit" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (unspec:SI [(match_operand 1 "cc_reg_operand" "y")] UNSPEC_MV_CR_GT))] + (unspec:SI [(match_operand 1 "cc_reg_operand" "y")] UNSPEC_MV_CR_EQ))] "TARGET_E500" "mfcr %0\;{rlinm|rlwinm} %0,%0,%D1,1" [(set_attr "type" "mfcr") diff --git a/contrib/gcc/config/rs6000/rtems.h b/contrib/gcc/config/rs6000/rtems.h index 0245269..d83e1eb 100644 --- a/contrib/gcc/config/rs6000/rtems.h +++ b/contrib/gcc/config/rs6000/rtems.h @@ -1,5 +1,6 @@ /* Definitions for rtems targeting a PowerPC using elf. - Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2005 + Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GCC. @@ -27,6 +28,7 @@ { \ builtin_define_std ("PPC"); \ builtin_define ("__rtems__"); \ + builtin_define ("__USE_INIT_FINI__"); \ builtin_assert ("system=rtems"); \ builtin_assert ("cpu=powerpc"); \ builtin_assert ("machine=powerpc"); \ @@ -36,3 +38,20 @@ #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)" + +#define CPP_OS_RTEMS_SPEC "\ +%{!mcpu*: %{!Dppc*: %{!Dmpc*: -Dmpc750} } }\ +%{mcpu=403: %{!Dppc*: %{!Dmpc*: -Dppc403} } } \ +%{mcpu=505: %{!Dppc*: %{!Dmpc*: -Dmpc505} } } \ +%{mcpu=601: %{!Dppc*: %{!Dmpc*: -Dppc601} } } \ +%{mcpu=602: %{!Dppc*: %{!Dmpc*: -Dppc602} } } \ +%{mcpu=603: %{!Dppc*: %{!Dmpc*: -Dppc603} } } \ +%{mcpu=603e: %{!Dppc*: %{!Dmpc*: -Dppc603e} } } \ +%{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \ +%{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \ +%{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \ +%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }" + +#undef SUBSUBTARGET_EXTRA_SPECS +#define SUBSUBTARGET_EXTRA_SPECS \ + { "cpp_os_rtems", CPP_OS_RTEMS_SPEC } diff --git a/contrib/gcc/config/rs6000/spe.h b/contrib/gcc/config/rs6000/spe.h index 1676516..878fc72 100644 --- a/contrib/gcc/config/rs6000/spe.h +++ b/contrib/gcc/config/rs6000/spe.h @@ -1088,4 +1088,23 @@ __ev_set_spefscr_frmc (int rnd) __builtin_spe_mtspefscr (i); } +/* The SPE PIM says these are declared in <spe.h>, although they are + not provided by GCC: they must be taken from a separate + library. */ +extern short int atosfix16 (const char *); +extern int atosfix32 (const char *); +extern long long atosfix64 (const char *); + +extern unsigned short atoufix16 (const char *); +extern unsigned int atoufix32 (const char *); +extern unsigned long long atoufix64 (const char *); + +extern short int strtosfix16 (const char *, char **); +extern int strtosfix32 (const char *, char **); +extern long long strtosfix64 (const char *, char **); + +extern unsigned short int strtoufix16 (const char *, char **); +extern unsigned int strtoufix32 (const char *, char **); +extern unsigned long long strtoufix64 (const char *, char **); + #endif /* _SPE_H */ diff --git a/contrib/gcc/config/rs6000/spe.md b/contrib/gcc/config/rs6000/spe.md index 5eb6302..306accd 100644 --- a/contrib/gcc/config/rs6000/spe.md +++ b/contrib/gcc/config/rs6000/spe.md @@ -2458,14 +2458,14 @@ ;; FP comparison stuff. ;; Flip the GT bit. -(define_insn "e500_flip_gt_bit" +(define_insn "e500_flip_eq_bit" [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (unspec:CCFP [(match_operand:CCFP 1 "cc_reg_operand" "y")] 999))] "!TARGET_FPRS && TARGET_HARD_FLOAT" "* { - return output_e500_flip_gt_bit (operands[0], operands[1]); + return output_e500_flip_eq_bit (operands[0], operands[1]); }" [(set_attr "type" "cr_logical")]) diff --git a/contrib/gcc/config/rs6000/sysv4.h b/contrib/gcc/config/rs6000/sysv4.h index ea149f0..57af869 100644 --- a/contrib/gcc/config/rs6000/sysv4.h +++ b/contrib/gcc/config/rs6000/sysv4.h @@ -1086,7 +1086,7 @@ extern int fixuplabelno; #define LINK_START_FREEBSD_SPEC "" #define LINK_OS_FREEBSD_SPEC "\ - %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ + %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ %{Wl,*:%*} \ %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ @@ -1115,8 +1115,9 @@ extern int fixuplabelno; %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" #endif -#define ENDFILE_LINUX_SPEC "%{!shared:crtend.o%s} %{shared:crtendS.o%s} \ -%{mnewlib: ecrtn.o%s} %{!mnewlib: crtn.o%s}" +#define ENDFILE_LINUX_SPEC "\ +%{shared|pie:crtendS.o%s;:crtend.o%s} \ +%{mnewlib:ecrtn.o%s;:crtn.o%s}" #define LINK_START_LINUX_SPEC "" @@ -1358,4 +1359,4 @@ ncrtn.o%s" #define DOUBLE_INT_ASM_OP "\t.quad\t" /* Generate entries in .fixup for relocatable addresses. */ -#define RELOCATABLE_NEEDS_FIXUP +#define RELOCATABLE_NEEDS_FIXUP 1 diff --git a/contrib/gcc/config/rs6000/t-aix43 b/contrib/gcc/config/rs6000/t-aix43 index a716209..8c2592f 100644 --- a/contrib/gcc/config/rs6000/t-aix43 +++ b/contrib/gcc/config/rs6000/t-aix43 @@ -58,9 +58,12 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(DESTDIR)$$(slibdir)/ SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac` SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk -SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver +SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver $(srcdir)/config/rs6000/libgcc-ppc64.ver SHLIB_NM_FLAGS = -Bpg -X32_64 +# GCC 128-bit long double support routines. +LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c + # Either 32-bit and 64-bit objects in archives. AR_FLAGS_FOR_TARGET = -X32_64 diff --git a/contrib/gcc/config/rs6000/t-aix52 b/contrib/gcc/config/rs6000/t-aix52 index bddcdb1..839bd0a 100644 --- a/contrib/gcc/config/rs6000/t-aix52 +++ b/contrib/gcc/config/rs6000/t-aix52 @@ -39,9 +39,12 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(DESTDIR)$$(slibdir)/ SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac` SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk -SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver +SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver $(srcdir)/config/rs6000/libgcc-ppc64.ver SHLIB_NM_FLAGS = -Bpg -X32_64 +# GCC 128-bit long double support routines. +LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c + # Either 32-bit and 64-bit objects in archives. AR_FLAGS_FOR_TARGET = -X32_64 diff --git a/contrib/gcc/config/rs6000/t-linux64 b/contrib/gcc/config/rs6000/t-linux64 index 77ba93e..6d1e6f4 100644 --- a/contrib/gcc/config/rs6000/t-linux64 +++ b/contrib/gcc/config/rs6000/t-linux64 @@ -1,8 +1,9 @@ #rs6000/t-linux64 -LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/ppc64-fp.c \ - $(srcdir)/config/rs6000/darwin-ldouble.c +LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/ppc64-fp.c +LIB2FUNCS_STATIC_EXTRA = eabi.S $(srcdir)/config/rs6000/darwin-ldouble.c +LIB2FUNCS_SHARED_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble-shared.c TARGET_LIBGCC2_CFLAGS = -mno-minimal-toc -fPIC -specs=bispecs diff --git a/contrib/gcc/config/rs6000/t-newas b/contrib/gcc/config/rs6000/t-newas index a26ce39..d5d03a1 100644 --- a/contrib/gcc/config/rs6000/t-newas +++ b/contrib/gcc/config/rs6000/t-newas @@ -27,6 +27,9 @@ MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT) \ mcpu?powerpc=mpowerpc-gpopt \ mcpu?powerpc=mpowerpc-gfxopt +# 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 diff --git a/contrib/gcc/config/rs6000/t-rtems b/contrib/gcc/config/rs6000/t-rtems index 364a22d..05d9a26 100644 --- a/contrib/gcc/config/rs6000/t-rtems +++ b/contrib/gcc/config/rs6000/t-rtems @@ -33,6 +33,7 @@ MULTILIB_MATCHES = ${MULTILIB_MATCHES_ENDIAN} \ # Cpu-variants supporting new exception processing only MULTILIB_NEW_EXCEPTIONS_ONLY = \ +*mcpu=505*/*D_OLD_EXCEPTIONS* \ *mcpu=604*/*D_OLD_EXCEPTIONS* \ *mcpu=750*/*D_OLD_EXCEPTIONS* \ *mcpu=821*/*D_OLD_EXCEPTIONS* \ diff --git a/contrib/gcc/config/s390/s390.md b/contrib/gcc/config/s390/s390.md index ebb8b57..345a36a 100644 --- a/contrib/gcc/config/s390/s390.md +++ b/contrib/gcc/config/s390/s390.md @@ -1039,11 +1039,13 @@ }) (define_expand "reload_outti" - [(parallel [(match_operand:TI 0 "memory_operand" "") + [(parallel [(match_operand:TI 0 "" "") (match_operand:TI 1 "register_operand" "d") (match_operand:DI 2 "register_operand" "=&a")])] "TARGET_64BIT" { + if (GET_CODE (operands[0]) != MEM) + abort (); s390_load_address (operands[2], XEXP (operands[0], 0)); operands[0] = replace_equiv_address (operands[0], operands[2]); emit_move_insn (operands[0], operands[1]); @@ -1167,11 +1169,13 @@ }) (define_expand "reload_outdi" - [(parallel [(match_operand:DI 0 "memory_operand" "") + [(parallel [(match_operand:DI 0 "" "") (match_operand:DI 1 "register_operand" "d") (match_operand:SI 2 "register_operand" "=&a")])] "!TARGET_64BIT" { + if (GET_CODE (operands[0]) != MEM) + abort (); s390_load_address (operands[2], XEXP (operands[0], 0)); operands[0] = replace_equiv_address (operands[0], operands[2]); emit_move_insn (operands[0], operands[1]); @@ -1647,11 +1651,13 @@ }) (define_expand "reload_outdf" - [(parallel [(match_operand:DF 0 "memory_operand" "") + [(parallel [(match_operand:DF 0 "" "") (match_operand:DF 1 "register_operand" "d") (match_operand:SI 2 "register_operand" "=&a")])] "!TARGET_64BIT" { + if (GET_CODE (operands[0]) != MEM) + abort (); s390_load_address (operands[2], XEXP (operands[0], 0)); operands[0] = replace_equiv_address (operands[0], operands[2]); emit_move_insn (operands[0], operands[1]); @@ -4117,7 +4123,7 @@ (match_operand:DF 2 "general_operand" "f,R")) (match_operand:DF 3 "const0_operand" ""))) (set (match_operand:DF 0 "register_operand" "=f,f") - (plus:DF (match_dup 1) (match_dup 2)))] + (minus:DF (match_dup 1) (match_dup 2)))] "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" "@ sdbr\t%0,%2 diff --git a/contrib/gcc/config/s390/tpf.h b/contrib/gcc/config/s390/tpf.h index ce984e6..3015827 100644 --- a/contrib/gcc/config/s390/tpf.h +++ b/contrib/gcc/config/s390/tpf.h @@ -92,6 +92,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #undef CPLUSPLUS_CPP_SPEC #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" +#undef ASM_SPEC +#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}" + #undef LIB_SPEC #define LIB_SPEC "%{pthread:-lpthread} -lc" diff --git a/contrib/gcc/config/sparc/sparc.c b/contrib/gcc/config/sparc/sparc.c index c959370..0b07e46 100644 --- a/contrib/gcc/config/sparc/sparc.c +++ b/contrib/gcc/config/sparc/sparc.c @@ -187,6 +187,8 @@ static bool sparc_function_ok_for_sibcall (tree, tree); static void sparc_init_libfuncs (void); static void sparc_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree); +static bool sparc_can_output_mi_thunk (tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree); static struct machine_function * sparc_init_machine_status (void); static bool sparc_cannot_force_const_mem (rtx); static rtx sparc_tls_get_addr (void); @@ -270,7 +272,7 @@ enum processor_type sparc_cpu; #undef TARGET_ASM_OUTPUT_MI_THUNK #define TARGET_ASM_OUTPUT_MI_THUNK sparc_output_mi_thunk #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK -#define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall +#define TARGET_ASM_CAN_OUTPUT_MI_THUNK sparc_can_output_mi_thunk #undef TARGET_RTX_COSTS #define TARGET_RTX_COSTS sparc_rtx_costs @@ -1315,23 +1317,7 @@ input_operand (rtx op, enum machine_mode mode) /* Check for valid MEM forms. */ if (GET_CODE (op) == MEM) - { - rtx inside = XEXP (op, 0); - - if (GET_CODE (inside) == LO_SUM) - { - /* We can't allow these because all of the splits - (eventually as they trickle down into DFmode - splits) require offsettable memory references. */ - if (! TARGET_V9 - && GET_MODE (op) == TFmode) - return 0; - - return (register_operand (XEXP (inside, 0), Pmode) - && CONSTANT_P (XEXP (inside, 1))); - } - return memory_address_p (mode, inside); - } + return memory_address_p (mode, XEXP (op, 0)); return 0; } @@ -3334,7 +3320,7 @@ legitimate_pic_operand_p (rtx x) int legitimate_address_p (enum machine_mode mode, rtx addr, int strict) { - rtx rs1 = NULL, rs2 = NULL, imm1 = NULL, imm2; + rtx rs1 = NULL, rs2 = NULL, imm1 = NULL; if (REG_P (addr) || GET_CODE (addr) == SUBREG) rs1 = addr; @@ -3374,15 +3360,14 @@ legitimate_address_p (enum machine_mode mode, rtx addr, int strict) else if ((REG_P (rs1) || GET_CODE (rs1) == SUBREG) && (REG_P (rs2) || GET_CODE (rs2) == SUBREG)) { - /* We prohibit REG + REG for TFmode when there are no instructions - which accept REG+REG instructions. We do this because REG+REG - is not an offsetable address. If we get the situation in reload + /* We prohibit REG + REG for TFmode when there are no quad move insns + and we consequently need to split. We do this because REG+REG + is not an offsettable address. If we get the situation in reload where source and destination of a movtf pattern are both MEMs with REG+REG address, then only one of them gets converted to an - offsetable address. */ + offsettable address. */ if (mode == TFmode - && !(TARGET_FPU && TARGET_ARCH64 && TARGET_V9 - && TARGET_HARD_QUAD)) + && ! (TARGET_FPU && TARGET_ARCH64 && TARGET_HARD_QUAD)) return 0; /* We prohibit REG + REG on ARCH32 if not optimizing for @@ -3399,7 +3384,6 @@ legitimate_address_p (enum machine_mode mode, rtx addr, int strict) && ! TARGET_CM_MEDMID && RTX_OK_FOR_OLO10_P (rs2)) { - imm2 = rs2; rs2 = NULL; imm1 = XEXP (rs1, 1); rs1 = XEXP (rs1, 0); @@ -3415,9 +3399,9 @@ legitimate_address_p (enum machine_mode mode, rtx addr, int strict) if (! CONSTANT_P (imm1) || tls_symbolic_operand (rs1)) return 0; - /* We can't allow TFmode, because an offset greater than or equal to the - alignment (8) may cause the LO_SUM to overflow if !v9. */ - if (mode == TFmode && !TARGET_V9) + /* We can't allow TFmode in 32-bit mode, because an offset greater + than the alignment (8) may cause the LO_SUM to overflow. */ + if (mode == TFmode && TARGET_ARCH32) return 0; } else if (GET_CODE (addr) == CONST_INT && SMALL_INT (addr)) @@ -5101,7 +5085,7 @@ static void function_arg_record_value_2 static void function_arg_record_value_1 (tree, HOST_WIDE_INT, struct function_arg_record_value_parms *, bool); static rtx function_arg_record_value (tree, enum machine_mode, int, int, int); -static rtx function_arg_union_value (int, enum machine_mode, int); +static rtx function_arg_union_value (int, enum machine_mode, int, int); /* A subroutine of function_arg_record_value. Traverse the structure recursively and determine how many registers will be required. */ @@ -5445,11 +5429,19 @@ function_arg_record_value (tree type, enum machine_mode mode, REGNO is the hard register the union will be passed in. */ static rtx -function_arg_union_value (int size, enum machine_mode mode, int regno) +function_arg_union_value (int size, enum machine_mode mode, int slotno, + int regno) { int nwords = ROUND_ADVANCE (size), i; rtx regs; + /* See comment in previous function for empty structures. */ + if (nwords == 0) + return gen_rtx_REG (mode, regno); + + if (slotno == SPARC_INT_ARG_MAX - 1) + nwords = 1; + /* Unions are passed left-justified. */ regs = gen_rtx_PARALLEL (mode, rtvec_alloc (nwords)); @@ -5516,7 +5508,7 @@ function_arg (const struct sparc_args *cum, enum machine_mode mode, if (size > 16) abort (); /* shouldn't get here */ - return function_arg_union_value (size, mode, regno); + return function_arg_union_value (size, mode, slotno, regno); } /* v9 fp args in reg slots beyond the int reg slots get passed in regs but also have the slot allocated for them. @@ -5796,7 +5788,7 @@ function_value (tree type, enum machine_mode mode, int incoming_p) if (size > 32) abort (); /* shouldn't get here */ - return function_arg_union_value (size, mode, regbase); + return function_arg_union_value (size, mode, 0, regbase); } else if (AGGREGATE_TYPE_P (type)) { @@ -5819,7 +5811,7 @@ function_value (tree type, enum machine_mode mode, int incoming_p) try to be unduly clever, and simply follow the ABI for unions in that case. */ if (mode == BLKmode) - return function_arg_union_value (bytes, mode, regbase); + return function_arg_union_value (bytes, mode, 0, regbase); } else if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_SIZE (mode) < UNITS_PER_WORD) @@ -9288,16 +9280,18 @@ sparc_rtx_costs (rtx x, int code, int outer_code, int *total) } } -/* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ +/* Output the assembler code for a thunk function. THUNK_DECL is the + declaration for the thunk function itself, FUNCTION is the decl for + the target function. DELTA is an immediate constant offset to be + added to THIS. If VCALL_OFFSET is nonzero, the word at address + (*THIS + VCALL_OFFSET) should be additionally added to THIS. */ static void sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, - HOST_WIDE_INT delta, - HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED, + HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset, tree function) { - rtx this, insn, funexp, delta_rtx, tmp; + rtx this, insn, funexp; reload_completed = 1; epilogue_completed = 1; @@ -9315,26 +9309,73 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, /* Add DELTA. When possible use a plain add, otherwise load it into a register first. */ - delta_rtx = GEN_INT (delta); - if (!SPARC_SIMM13_P (delta)) + if (delta) + { + rtx delta_rtx = GEN_INT (delta); + + if (! SPARC_SIMM13_P (delta)) + { + rtx scratch = gen_rtx_REG (Pmode, 1); + emit_move_insn (scratch, delta_rtx); + delta_rtx = scratch; + } + + /* THIS += DELTA. */ + emit_insn (gen_add2_insn (this, delta_rtx)); + } + + /* Add the word at address (*THIS + VCALL_OFFSET). */ + if (vcall_offset) { + rtx vcall_offset_rtx = GEN_INT (vcall_offset); rtx scratch = gen_rtx_REG (Pmode, 1); - if (input_operand (delta_rtx, GET_MODE (scratch))) - emit_insn (gen_rtx_SET (VOIDmode, scratch, delta_rtx)); + if (vcall_offset >= 0) + abort (); + + /* SCRATCH = *THIS. */ + emit_move_insn (scratch, gen_rtx_MEM (Pmode, this)); + + /* Prepare for adding VCALL_OFFSET. The difficulty is that we + may not have any available scratch register at this point. */ + if (SPARC_SIMM13_P (vcall_offset)) + ; + /* This is the case if ARCH64 (unless -ffixed-g5 is passed). */ + else if (! fixed_regs[5] + /* The below sequence is made up of at least 2 insns, + while the default method may need only one. */ + && vcall_offset < -8192) + { + rtx scratch2 = gen_rtx_REG (Pmode, 5); + emit_move_insn (scratch2, vcall_offset_rtx); + vcall_offset_rtx = scratch2; + } else { - if (TARGET_ARCH64) - sparc_emit_set_const64 (scratch, delta_rtx); - else - sparc_emit_set_const32 (scratch, delta_rtx); + rtx increment = GEN_INT (-4096); + + /* VCALL_OFFSET is a negative number whose typical range can be + estimated as -32768..0 in 32-bit mode. In almost all cases + it is therefore cheaper to emit multiple add insns than + spilling and loading the constant into a register (at least + 6 insns). */ + while (! SPARC_SIMM13_P (vcall_offset)) + { + emit_insn (gen_add2_insn (scratch, increment)); + vcall_offset += 4096; + } + vcall_offset_rtx = GEN_INT (vcall_offset); /* cannot be 0 */ } - delta_rtx = scratch; - } + /* SCRATCH = *(*THIS + VCALL_OFFSET). */ + emit_move_insn (scratch, gen_rtx_MEM (Pmode, + gen_rtx_PLUS (Pmode, + scratch, + vcall_offset_rtx))); - tmp = gen_rtx_PLUS (Pmode, this, delta_rtx); - emit_insn (gen_rtx_SET (VOIDmode, this, tmp)); + /* THIS += *(*THIS + VCALL_OFFSET). */ + emit_insn (gen_add2_insn (this, scratch)); + } /* Generate a tail call to the target function. */ if (! TREE_USED (function)) @@ -9364,6 +9405,19 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, no_new_pseudos = 0; } +/* Return true if sparc_output_mi_thunk would be able to output the + assembler code for the thunk function specified by the arguments + it is passed, and false otherwise. */ +static bool +sparc_can_output_mi_thunk (tree thunk_fndecl ATTRIBUTE_UNUSED, + HOST_WIDE_INT delta ATTRIBUTE_UNUSED, + HOST_WIDE_INT vcall_offset, + tree function ATTRIBUTE_UNUSED) +{ + /* Bound the loop used in the default method above. */ + return (vcall_offset >= -32768 || ! fixed_regs[5]); +} + /* How to allocate a 'struct machine_function'. */ static struct machine_function * diff --git a/contrib/gcc/config/sparc/sparc.md b/contrib/gcc/config/sparc/sparc.md index c7da780..b50d10a 100644 --- a/contrib/gcc/config/sparc/sparc.md +++ b/contrib/gcc/config/sparc/sparc.md @@ -2076,7 +2076,6 @@ if (! CONSTANT_P (operands[1]) || input_operand (operands[1], DImode)) ; else if (TARGET_ARCH64 - && CONSTANT_P (operands[1]) && GET_CODE (operands[1]) != HIGH && GET_CODE (operands[1]) != LO_SUM) { diff --git a/contrib/gcc/config/sparc/t-elf b/contrib/gcc/config/sparc/t-elf index 027940b..6868736 100644 --- a/contrib/gcc/config/sparc/t-elf +++ b/contrib/gcc/config/sparc/t-elf @@ -24,6 +24,6 @@ INSTALL_LIBGCC = install-multilib # Assemble startup files. crti.o: $(srcdir)/config/sparc/sol2-ci.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -o crti.o -x assembler $(srcdir)/config/sparc/sol2-ci.asm + $(GCC_FOR_TARGET) -c -o crti.o -x assembler-with-cpp $(srcdir)/config/sparc/sol2-ci.asm crtn.o: $(srcdir)/config/sparc/sol2-cn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -o crtn.o -x assembler $(srcdir)/config/sparc/sol2-cn.asm + $(GCC_FOR_TARGET) -c -o crtn.o -x assembler-with-cpp $(srcdir)/config/sparc/sol2-cn.asm diff --git a/contrib/gcc/config/t-libunwind b/contrib/gcc/config/t-libunwind index 2204ae3..121ce2e 100644 --- a/contrib/gcc/config/t-libunwind +++ b/contrib/gcc/config/t-libunwind @@ -1,5 +1,12 @@ +# Use the system libunwind library. +# # Override the default value from t-slibgcc-elf-ver and mention -lunwind # so that the resulting libgcc_s.so has the necessary DT_NEEDED entry for # libunwind. SHLIB_LC = -lunwind -lc -LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c +LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ + $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c +LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c + +T_CFLAGS += -DUSE_LIBUNWIND_EXCEPTIONS +TARGET_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER diff --git a/contrib/gcc/config/t-libunwind-elf b/contrib/gcc/config/t-libunwind-elf new file mode 100644 index 0000000..a9609e7 --- /dev/null +++ b/contrib/gcc/config/t-libunwind-elf @@ -0,0 +1,30 @@ +# Build libunwind for ELF with the GNU linker. + +# Use unwind-dw2-fde-glibc +LIBUNWIND = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c +LIBUNWINDDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c + +SHLIBUNWIND_SOVERSION = 7 +SHLIBUNWIND_SONAME = @shlib_so_name@.so.$(SHLIBUNWIND_SOVERSION) +SHLIBUNWIND_NAME = @shlib_dir@@shlib_so_name@.so.$(SHLIBUNWIND_SOVERSION) + +SHLIBUNWIND_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared \ + -nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \ + -Wl,-z,text -Wl,-z,defs -o $(SHLIBUNWIND_NAME).tmp \ + @multilib_flags@ $(SHLIB_OBJS) -lc && \ + rm -f $(SHLIB_SOLINK) && \ + if [ -f $(SHLIBUNWIND_NAME) ]; then \ + mv -f $(SHLIBUNWIND_NAME) $(SHLIBUNWIND_NAME).backup; \ + else true; fi && \ + mv $(SHLIBUNWIND_NAME).tmp $(SHLIBUNWIND_NAME) && \ + $(LN_S) $(SHLIBUNWIND_NAME) $(SHLIB_SOLINK) + +# $(slibdir) double quoted to protect it from expansion while building +# libgcc.mk. We want this delayed until actual install time. +SHLIBUNWIND_INSTALL = \ + $$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ + $(INSTALL_DATA) $(SHLIBUNWIND_NAME) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIBUNWIND_SONAME); \ + rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ + $(LN_S) $(SHLIBUNWIND_SONAME) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) diff --git a/contrib/gcc/config/t-slibgcc-darwin b/contrib/gcc/config/t-slibgcc-darwin index f27fae4..b820441 100644 --- a/contrib/gcc/config/t-slibgcc-darwin +++ b/contrib/gcc/config/t-slibgcc-darwin @@ -12,10 +12,14 @@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \ -Wl,-install_name,$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME) \ - -Wl,-flat_namespace -o $(SHLIB_NAME) \ + -Wl,-flat_namespace -o $(SHLIB_NAME).tmp \ $(SHLIB_VERSTRING) \ @multilib_flags@ $(SHLIB_OBJS) -lc && \ rm -f $(SHLIB_SOLINK) && \ + if [ -f $(SHLIB_NAME) ]; then \ + mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \ + else true; fi && \ + mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \ $(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK) # $(slibdir) double quoted to protect it from expansion while building # libgcc.mk. We want this delayed until actual install time. diff --git a/contrib/gcc/config/t-slibgcc-elf-ver b/contrib/gcc/config/t-slibgcc-elf-ver index a4f8ef0..5086500 100644 --- a/contrib/gcc/config/t-slibgcc-elf-ver +++ b/contrib/gcc/config/t-slibgcc-elf-ver @@ -14,8 +14,12 @@ SHLIB_LC = -lc SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ -Wl,--soname=$(SHLIB_SONAME) \ -Wl,--version-script=$(SHLIB_MAP) \ - -o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \ + -o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \ rm -f $(SHLIB_SOLINK) && \ + if [ -f $(SHLIB_NAME) ]; then \ + mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \ + else true; fi && \ + mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \ $(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK) # $(slibdir) double quoted to protect it from expansion while building # libgcc.mk. We want this delayed until actual install time. diff --git a/contrib/gcc/config/t-slibgcc-sld b/contrib/gcc/config/t-slibgcc-sld index 6bdd521..44e7f18 100644 --- a/contrib/gcc/config/t-slibgcc-sld +++ b/contrib/gcc/config/t-slibgcc-sld @@ -10,9 +10,13 @@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ -Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \ - -Wl,-M,$(SHLIB_MAP) -o $(SHLIB_NAME) \ + -Wl,-M,$(SHLIB_MAP) -o $(SHLIB_NAME).tmp \ @multilib_flags@ $(SHLIB_OBJS) -lc && \ rm -f $(SHLIB_SOLINK) && \ + if [ -f $(SHLIB_NAME) ]; then \ + mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \ + else true; fi && \ + mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \ $(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK) # $(slibdir) double quoted to protect it from expansion while building # libgcc.mk. We want this delayed until actual install time. diff --git a/contrib/gcc/configure b/contrib/gcc/configure index e9d75d9..bd8a927 100755 --- a/contrib/gcc/configure +++ b/contrib/gcc/configure @@ -1,9 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. +# Generated by GNU Autoconf 2.59. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -20,9 +19,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -41,7 +41,7 @@ for as_var in \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -218,16 +218,17 @@ rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -308,7 +309,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP GNATBIND ac_ct_GNATBIND strict1_warn warn_cflags WERROR nocommon_flag EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO libgcc_visibility gthread_flags GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines target_noncanonical c_target_objs cxx_target_objs target_cpu_default LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP GNATBIND ac_ct_GNATBIND strict1_warn warn_cflags WERROR nocommon_flag EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO libgcc_visibility gthread_flags GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines target_noncanonical c_target_objs cxx_target_objs target_cpu_default set_gcc_lib_path LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. @@ -667,7 +668,7 @@ done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -707,10 +708,10 @@ if test -z "$srcdir"; then # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -802,9 +803,9 @@ _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -877,7 +878,6 @@ Optional Features: --enable-initfini-array use .init_array/.fini_array sections --enable-sjlj-exceptions arrange to use setjmp/longjmp exception handling - --enable-libunwind-exceptions force use libunwind for exceptions --disable-win32-registry disable lookup of installation paths in the Registry on Windows hosts @@ -909,6 +909,7 @@ Optional Packages: --with-dwarf2 force the default debug format to be DWARF 2 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib + --with-system-libunwind use installed libunwind --with-gc={simple,page,zone} choose the garbage collection mechanism to use with the compiler --with-system-zlib use installed libz @@ -959,12 +960,45 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. @@ -975,7 +1009,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then + test -f $ac_srcdir/configure.in; then echo $ac_configure --help else @@ -989,8 +1023,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1002,7 +1035,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1079,19 +1112,19 @@ do 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. + ac_must_keep_next=false # Got value, back to normal. else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. @@ -1125,12 +1158,12 @@ _ASBOX case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } @@ -1159,7 +1192,7 @@ _ASBOX for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1178,7 +1211,7 @@ _ASBOX echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core core.* *.core && + rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -1258,7 +1291,7 @@ fi # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" @@ -1275,13 +1308,13 @@ echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. @@ -2085,7 +2118,6 @@ ac_compiler=`set X $ac_compile; echo $2` (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2105,8 +2137,8 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 @@ -2126,23 +2158,23 @@ do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; + ;; conftest.$ac_ext ) - # This is the source file. - ;; + # This is the source file. + ;; [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; + # We found the default executable, but exeext='' is most + # certainly right. + break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; * ) - break;; + break;; esac done else @@ -2216,8 +2248,8 @@ for ac_file in conftest.exe conftest conftest.*; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; + export ac_cv_exeext + break;; * ) break;; esac done @@ -2242,7 +2274,6 @@ if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2293,7 +2324,6 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2313,11 +2343,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2330,7 +2370,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi @@ -2346,7 +2386,6 @@ if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2363,11 +2402,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2380,7 +2429,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 @@ -2407,7 +2456,6 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2435,6 +2483,16 @@ static char *f (char * (*g) (char **, int), char **p, ...) va_end (v); return s; } + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2461,11 +2519,21 @@ do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2478,7 +2546,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext +rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC @@ -2506,19 +2574,28 @@ cat >conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ - ''\ - '#include <stdlib.h>' \ + '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -2526,14 +2603,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <stdlib.h> $ac_declaration +#include <stdlib.h> int main () { @@ -2544,11 +2620,21 @@ exit (42); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2561,9 +2647,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 continue fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2580,11 +2665,21 @@ exit (42); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2596,7 +2691,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -2610,7 +2705,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2630,7 +2725,6 @@ if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2681,11 +2775,11 @@ then echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # cc works too. - : + # cc works too. + : else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi @@ -2730,7 +2824,6 @@ else save_CFLAGS="$CFLAGS" CFLAGS="-Wno-long-long" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2747,11 +2840,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2764,7 +2867,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_no_long_long=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_no_long_long" >&5 @@ -2798,7 +2901,6 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2809,7 +2911,7 @@ cat >>conftest.$ac_ext <<_ACEOF #else # include <assert.h> #endif - Syntax error + Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -2821,6 +2923,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2841,7 +2944,6 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2859,6 +2961,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2905,7 +3008,6 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2916,7 +3018,7 @@ cat >>conftest.$ac_ext <<_ACEOF #else # include <assert.h> #endif - Syntax error + Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -2928,6 +3030,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2948,7 +3051,6 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2966,6 +3068,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3012,7 +3115,6 @@ else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3027,11 +3129,21 @@ $ac_kw foo_t foo () {return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3043,23 +3155,27 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 + + case $ac_cv_c_inline in inline | yes) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define inline -_ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define inline $ac_cv_c_inline + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif _ACEOF - ;; + ;; esac @@ -3069,7 +3185,6 @@ if test "${ac_cv_c_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3086,11 +3201,21 @@ long long int i; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3103,7 +3228,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_long_long=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 echo "${ECHO_T}$ac_cv_c_long_long" >&6 @@ -3120,7 +3245,6 @@ if test "${ac_cv_c___int64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3137,11 +3261,21 @@ __int64 i; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3154,7 +3288,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c___int64=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5 echo "${ECHO_T}$ac_cv_c___int64" >&6 @@ -3172,7 +3306,6 @@ if test "${gcc_cv_c__bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3189,11 +3322,21 @@ _Bool foo; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3206,7 +3349,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 gcc_cv_c__bool=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gcc_cv_c__bool" >&5 @@ -3228,7 +3371,6 @@ if test "${ac_cv_sizeof_void_p+set}" = set; then else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3248,11 +3390,21 @@ switch (0) case 0: case (sizeof (void *) == $ac_size):; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3264,7 +3416,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_void_p != x ; then break; fi done @@ -3290,7 +3442,6 @@ if test "${ac_cv_sizeof_short+set}" = set; then else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3310,11 +3461,21 @@ switch (0) case 0: case (sizeof (short) == $ac_size):; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3326,7 +3487,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_short != x ; then break; fi done @@ -3352,7 +3513,6 @@ if test "${ac_cv_sizeof_int+set}" = set; then else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3372,11 +3532,21 @@ switch (0) case 0: case (sizeof (int) == $ac_size):; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3388,7 +3558,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_int != x ; then break; fi done @@ -3414,7 +3584,6 @@ if test "${ac_cv_sizeof_long+set}" = set; then else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3434,11 +3603,21 @@ switch (0) case 0: case (sizeof (long) == $ac_size):; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3450,7 +3629,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_long != x ; then break; fi done @@ -3477,7 +3656,6 @@ if test "${ac_cv_sizeof_long_long+set}" = set; then else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3497,11 +3675,21 @@ switch (0) case 0: case (sizeof (long long) == $ac_size):; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3513,7 +3701,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_long_long != x ; then break; fi done @@ -3541,7 +3729,6 @@ if test "${ac_cv_sizeof___int64+set}" = set; then else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3561,11 +3748,21 @@ switch (0) case 0: case (sizeof (__int64) == $ac_size):; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3577,7 +3774,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof___int64 != x ; then break; fi done @@ -3871,7 +4068,6 @@ if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3892,11 +4088,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3909,12 +4115,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3936,7 +4141,6 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3961,7 +4165,6 @@ if test $ac_cv_header_stdc = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3973,9 +4176,9 @@ cat >>conftest.$ac_ext <<_ACEOF # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -3986,7 +4189,7 @@ main () int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) + || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -4011,7 +4214,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -4036,7 +4239,7 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h + inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -4045,7 +4248,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4057,11 +4259,21 @@ $ac_includes_default _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4074,7 +4286,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -4101,7 +4313,6 @@ else echo "$as_me:$LINENO: checking valgrind.h usability" >&5 echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4112,11 +4323,21 @@ $ac_includes_default _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4129,7 +4350,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -4137,7 +4358,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking valgrind.h presence" >&5 echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4155,6 +4375,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -4174,33 +4395,32 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -4231,7 +4451,6 @@ if test x$ac_checking_valgrind != x ; then echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4252,6 +4471,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -4272,7 +4492,6 @@ echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4293,6 +4512,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -4595,7 +4815,7 @@ fi; echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5009,7 +5229,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - echo "configure:5012: version of makeinfo is $ac_prog_version" >&5 + echo "configure:5232: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; 4.[2-9]*) @@ -5146,7 +5366,6 @@ if test "${gcc_cv_glibc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5166,11 +5385,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5183,7 +5412,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 gcc_cv_glibc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 @@ -5207,7 +5436,6 @@ if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5228,11 +5456,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5245,12 +5483,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5272,7 +5509,6 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5297,7 +5533,6 @@ if test $ac_cv_header_stdc = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5309,9 +5544,9 @@ cat >>conftest.$ac_ext <<_ACEOF # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -5322,7 +5557,7 @@ main () int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) + || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -5347,7 +5582,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -5367,7 +5602,6 @@ if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5388,11 +5622,21 @@ return 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5405,7 +5649,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 @@ -5423,7 +5667,6 @@ if test "${ac_cv_header_stdbool_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5440,11 +5683,21 @@ bool foo = false; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5457,7 +5710,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 @@ -5475,7 +5728,6 @@ if test "${gcc_cv_header_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5493,11 +5745,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5510,7 +5772,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 gcc_cv_header_string=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 echo "${ECHO_T}$gcc_cv_header_string" >&6 @@ -5528,7 +5790,6 @@ if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5555,11 +5816,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5572,7 +5843,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 @@ -5617,7 +5888,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5635,6 +5905,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -5669,7 +5940,6 @@ if test "${ac_cv_header_thread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5687,6 +5957,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -5717,7 +5988,6 @@ if test "${ac_cv_header_pthread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5735,6 +6005,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -5767,7 +6038,6 @@ if test "${gcc_cv_decl_char_bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5802,7 +6072,6 @@ else gcc_cv_c_nbby= while test $i -lt 65; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5822,11 +6091,21 @@ switch(0) { _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5838,7 +6117,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext i=`expr $i + 1` done test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed @@ -5866,7 +6145,6 @@ else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5887,11 +6165,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5899,7 +6187,6 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5920,11 +6207,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5937,19 +6234,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then if test "$cross_compiling" = yes; then echo $ac_n "cross-compiling... " 2>&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5986,7 +6282,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -6091,7 +6387,6 @@ for libs in '' -lld -lmld \ do LIBS="$libs" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6115,11 +6410,21 @@ ldopen (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6131,7 +6436,8 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext done LIBS="$save_LIBS" test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' @@ -6156,7 +6462,6 @@ else ac_func_search_save_LIBS=$LIBS ac_cv_search_exc_resume=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6180,11 +6485,21 @@ exc_resume (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6196,12 +6511,12 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_exc_resume" = no; then for ac_lib in exc; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6225,11 +6540,21 @@ exc_resume (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6242,7 +6567,8 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS @@ -6270,7 +6596,6 @@ else ac_func_search_save_LIBS=$LIBS ac_cv_search_ldexp=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6294,11 +6619,21 @@ ldexp (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6310,12 +6645,12 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_ldexp" = no; then for ac_lib in m; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6339,11 +6674,21 @@ ldexp (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6356,7 +6701,8 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS @@ -6380,7 +6726,6 @@ if test "${gcc_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6398,11 +6743,21 @@ intmax_t i = -1; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6415,7 +6770,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 gcc_cv_header_inttypes_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 @@ -6467,21 +6822,28 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ + #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -6512,11 +6874,21 @@ return f != $ac_func; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6529,7 +6901,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -6552,7 +6925,6 @@ else gcc_cv_func_mbstowcs_works=yes else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6585,7 +6957,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gcc_cv_func_mbstowcs_works=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 @@ -6605,7 +6977,6 @@ if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6625,11 +6996,21 @@ if (sizeof (ssize_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6642,7 +7023,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 @@ -6665,7 +7046,6 @@ if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6707,7 +7087,6 @@ else ac_cv_type_getgroups=cross else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6730,7 +7109,7 @@ main () for (i = 0; i < NGID; i++) gidset[i] = val.gval; n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); + gidset); /* Exit non-zero if getgroups seems to require an array of ints. This happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); @@ -6756,11 +7135,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_type_getgroups=int fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6813,7 +7191,6 @@ else gcc_cv_func_printf_ptr=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6850,7 +7227,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gcc_cv_func_printf_ptr=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f core core.* *.core fi @@ -6921,7 +7298,6 @@ if test "${gcc_cv_decl_map_anon+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6945,11 +7321,21 @@ int n = MAP_ANONYMOUS; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6962,7 +7348,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 gcc_cv_decl_map_anon=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 @@ -7029,7 +7415,6 @@ if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7049,11 +7434,21 @@ if (sizeof (pid_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7066,7 +7461,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 @@ -7091,7 +7486,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7109,6 +7503,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -7146,21 +7541,28 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ + #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -7191,11 +7593,21 @@ return f != $ac_func; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7208,7 +7620,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -7238,9 +7651,9 @@ else /* Some systems only have a dummy stub for fork() */ int main () { - if (fork() < 0) - exit (1); - exit (0); + if (fork() < 0) + exit (1); + exit (0); } _ACEOF rm -f conftest$ac_exeext @@ -7263,7 +7676,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 @@ -7296,7 +7709,6 @@ else ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7418,7 +7830,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 @@ -7426,7 +7838,7 @@ echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 fi; if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=ac_cv_func_vfork + ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi @@ -7478,7 +7890,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7496,6 +7907,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -7532,7 +7944,6 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7552,11 +7963,21 @@ iconv_t cd = iconv_open("",""); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7568,12 +7989,12 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7593,11 +8014,21 @@ iconv_t cd = iconv_open("",""); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7610,7 +8041,8 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi @@ -7630,7 +8062,6 @@ echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7659,11 +8090,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7676,7 +8117,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi @@ -7708,7 +8149,6 @@ if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7725,11 +8165,21 @@ return LC_MESSAGES _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7742,7 +8192,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 @@ -7770,7 +8221,6 @@ if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7794,11 +8244,21 @@ char *(*pfn) = (char *(*)) $ac_func ; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7811,7 +8271,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then @@ -7937,7 +8397,6 @@ if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7965,11 +8424,21 @@ char *(*pfn) = (char *(*)) $ac_func ; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7982,7 +8451,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then @@ -8017,7 +8486,6 @@ fi cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8040,11 +8508,21 @@ rlim_t l = 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8061,7 +8539,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext for ac_func in ldgetname do @@ -8072,7 +8550,6 @@ if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8100,11 +8577,21 @@ char *(*pfn) = (char *(*)) $ac_func ; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8117,7 +8604,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then @@ -8152,7 +8639,6 @@ if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8180,11 +8666,21 @@ char *(*pfn) = (char *(*)) $ac_func ; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8197,7 +8693,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then @@ -8231,7 +8727,6 @@ if test "${ac_cv_struct_tms+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8254,11 +8749,21 @@ struct tms tms; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8271,7 +8776,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tms=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 echo "${ECHO_T}$ac_cv_struct_tms" >&6 @@ -8292,7 +8797,6 @@ if test "${gcc_cv_type_clock_t+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8312,11 +8816,21 @@ clock_t x; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8329,7 +8843,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 gcc_cv_type_clock_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 @@ -8347,7 +8861,6 @@ if test "${gcc_cv_type_uchar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8368,11 +8881,21 @@ if ((uchar *)0) return 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8385,7 +8908,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uchar=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5 echo "${ECHO_T}$gcc_cv_type_uchar" >&6 @@ -8415,7 +8938,6 @@ else gcc_cv_initfini_array=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8447,7 +8969,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gcc_cv_initfini_array=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 @@ -8470,7 +8992,6 @@ if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8497,11 +9018,21 @@ mkdir ("foo", 0); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8514,7 +9045,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 gcc_cv_mkdir_takes_one_arg=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 @@ -8545,79 +9076,14 @@ _ACEOF fi; -if test x$host = x$target; then - echo "$as_me:$LINENO: checking for main in -lunwind" >&5 -echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6 -if test "${ac_cv_lib_unwind_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lunwind $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_unwind_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# For platforms with the unwind ABI which includes an unwind library, +# libunwind, we can choose to use the system libunwind. -ac_cv_lib_unwind_main=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5 -echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6 -if test $ac_cv_lib_unwind_main = yes; then - use_libunwind_default=yes -else - use_libunwind_default=no -fi +# Check whether --with-system-libunwind or --without-system-libunwind was given. +if test "${with_system_libunwind+set}" = set; then + withval="$with_system_libunwind" -else - use_libunwind_default=no -fi -# Use libunwind based exception handling. -# Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. -if test "${enable_libunwind_exceptions+set}" = set; then - enableval="$enable_libunwind_exceptions" - use_libunwind_exceptions=$enableval -else - use_libunwind_exceptions=$use_libunwind_default fi; -if test x"$use_libunwind_exceptions" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define USE_LIBUNWIND_EXCEPTIONS 1 -_ACEOF - -fi # -------------------------------------------------------- # Build, host, and target specific configuration fragments @@ -8783,21 +9249,28 @@ if test "${ac_cv_func___cxa_atexit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define __cxa_atexit innocuous___cxa_atexit + /* System header to define __stub macros and hopefully few prototypes, which can conflict with char __cxa_atexit (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ + #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif + +#undef __cxa_atexit + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -8828,11 +9301,21 @@ return f != __cxa_atexit; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8845,7 +9328,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func___cxa_atexit=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 @@ -9058,7 +9542,6 @@ else ac_func_search_save_LIBS=$LIBS ac_cv_search_RegOpenKeyExA=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9082,11 +9565,21 @@ RegOpenKeyExA (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9098,12 +9591,12 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_RegOpenKeyExA" = no; then for ac_lib in advapi32; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9127,11 +9620,21 @@ RegOpenKeyExA (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9144,7 +9647,8 @@ else sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS @@ -9893,6 +10397,44 @@ _ACEOF fi +echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 +echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 +if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_nsubspa_comdat=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` + then gcc_cv_as_nsubspa_comdat=yes +fi + elif test x$gcc_cv_as != x; then + echo ' .SPACE $TEXT$ + .NSUBSPA $CODE$,COMDAT' > conftest.s + if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_nsubspa_comdat=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 +echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 +if test $gcc_cv_as_nsubspa_comdat = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GAS_NSUBSPA_COMDAT 1 +_ACEOF + +fi + # .hidden needs to be supported in both the assembler and the linker, # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for; we have to check the @@ -10773,7 +11315,7 @@ else if test x$gcc_cv_objdump != x \ && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ | grep ' 82106000 82106000' > /dev/null 2>&1; then - gcc_cv_as_offsetable_lo10=yes + gcc_cv_as_sparc_offsetable_lo10=yes fi else echo "configure: failed program was" >&5 @@ -11314,6 +11856,30 @@ fi echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 echo "${ECHO_T}$gcc_cv_ld_pie" >&6 +echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 +echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 +gcc_cv_ld_static_dynamic=no +if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then + gcc_cv_ld_static_dynamic=yes + fi +elif test x$gcc_cv_ld != x; then + # Check if linker supports -Bstatic/-Bdynamic option + if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ + && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then + gcc_cv_ld_static_dynamic=yes + fi +fi +if test x"$gcc_cv_ld_static_dynamic" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LD_STATIC_DYNAMIC 1 +_ACEOF + +fi +echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 +echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 + case "$target" in *-*-linux*) echo "$as_me:$LINENO: checking linker --as-needed support" >&5 @@ -11813,6 +12379,22 @@ objdir=`${PWDCMD-pwd}` + + +if test x"$SET_GCC_LIB_PATH_CMD" != x; then + # SET_GCC_LIB_PATH_CMD is "XXX=path; export XXX;". It is expanded to + # + # eval "set_gcc_lib_path=XXX=path; export XXX;" + # + eval "set_gcc_lib_path=$SET_GCC_LIB_PATH_CMD" + # It will set set_gcc_lib_path to "export XXX=path" for GNU make. + set_gcc_lib_path="export $set_gcc_lib_path" +else + set_gcc_lib_path= +fi + + + # If it doesn't already exist, create document directory echo "checking for the document directory." 1>&2 if test -d doc ; then @@ -11877,13 +12459,13 @@ _ACEOF # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | @@ -11913,13 +12495,13 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ + ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; +s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; -s/^[^=]*=[ ]*$//; +s/^[^=]*=[ ]*$//; }' fi @@ -11930,7 +12512,7 @@ ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' @@ -11974,9 +12556,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -11995,7 +12578,7 @@ for as_var in \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -12174,16 +12757,17 @@ rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -12210,7 +12794,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12254,9 +12838,9 @@ Usage: $0 [OPTIONS] [FILE]... -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + instantiate the configuration file FILE --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + instantiate the configuration header FILE Configuration files: $config_files @@ -12273,11 +12857,10 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.57, +configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir @@ -12637,6 +13220,7 @@ s,@target_noncanonical@,$target_noncanonical,;t t s,@c_target_objs@,$c_target_objs,;t t s,@cxx_target_objs@,$cxx_target_objs,;t t s,@target_cpu_default@,$target_cpu_default,;t t +s,@set_gcc_lib_path@,$set_gcc_lib_path,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t /@language_hooks@/r $language_hooks @@ -12670,9 +13254,9 @@ _ACEOF (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end @@ -12690,21 +13274,21 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -12720,10 +13304,10 @@ echo X"$ac_file" | as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -12761,12 +13345,45 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac @@ -12784,7 +13401,7 @@ echo "$as_me: creating $ac_file" >&6;} configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -12793,24 +13410,24 @@ echo "$as_me: creating $ac_file" >&6;} case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } _ACEOF @@ -12851,12 +13468,12 @@ cat >>$CONFIG_STATUS <<\_ACEOF # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' @@ -12865,11 +13482,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac @@ -12883,28 +13500,29 @@ echo "$as_me: creating $ac_file" >&6;} case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF @@ -12927,9 +13545,9 @@ s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times @@ -12943,13 +13561,13 @@ rm -f confdef2sed.sed # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail @@ -12958,7 +13576,7 @@ do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -12985,7 +13603,7 @@ do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -13019,10 +13637,10 @@ echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -13038,10 +13656,10 @@ echo X"$ac_file" | as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -13073,16 +13691,41 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. if test "$ac_dir" != .; then @@ -13108,12 +13751,45 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 diff --git a/contrib/gcc/configure.ac b/contrib/gcc/configure.ac index 0aadf4e..37f2dee 100644 --- a/contrib/gcc/configure.ac +++ b/contrib/gcc/configure.ac @@ -979,20 +979,10 @@ AC_ARG_ENABLE(sjlj-exceptions, AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj, [Define 0/1 to force the choice for exception handling model.])]) -if test x$host = x$target; then - AC_CHECK_LIB(unwind, main, use_libunwind_default=yes, use_libunwind_default=no) -else - use_libunwind_default=no -fi -# Use libunwind based exception handling. -AC_ARG_ENABLE(libunwind-exceptions, -[ --enable-libunwind-exceptions force use libunwind for exceptions], -use_libunwind_exceptions=$enableval, -use_libunwind_exceptions=$use_libunwind_default) -if test x"$use_libunwind_exceptions" = xyes; then - AC_DEFINE(USE_LIBUNWIND_EXCEPTIONS, 1, - [Define if gcc should use -lunwind.]) -fi +# For platforms with the unwind ABI which includes an unwind library, +# libunwind, we can choose to use the system libunwind. +AC_ARG_WITH(system-libunwind, +[ --with-system-libunwind use installed libunwind]) # -------------------------------------------------------- # Build, host, and target specific configuration fragments @@ -1865,6 +1855,12 @@ gcc_GAS_CHECK_FEATURE([.weak], gcc_cv_as_weak, [ .weak foobar],, [AC_DEFINE(HAVE_GAS_WEAK, 1, [Define if your assembler supports .weak.])]) +gcc_GAS_CHECK_FEATURE([.nsubspa comdat], gcc_cv_as_nsubspa_comdat, + [2,15,91],, + [ .SPACE $TEXT$ + .NSUBSPA $CODE$,COMDAT],, +[AC_DEFINE(HAVE_GAS_NSUBSPA_COMDAT, 1, [Define if your assembler supports .nsubspa comdat option.])]) + # .hidden needs to be supported in both the assembler and the linker, # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for; we have to check the @@ -2407,7 +2403,7 @@ foo: [if test x$gcc_cv_objdump != x \ && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ | grep ' 82106000 82106000' > /dev/null 2>&1; then - gcc_cv_as_offsetable_lo10=yes + gcc_cv_as_sparc_offsetable_lo10=yes fi], [AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1, [Define if your assembler supports offsetable %lo().])]) @@ -2627,6 +2623,25 @@ if test x"$gcc_cv_ld_pie" = xyes; then fi AC_MSG_RESULT($gcc_cv_ld_pie) +AC_MSG_CHECKING(linker -Bstatic/-Bdynamic option) +gcc_cv_ld_static_dynamic=no +if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then + gcc_cv_ld_static_dynamic=yes + fi +elif test x$gcc_cv_ld != x; then + # Check if linker supports -Bstatic/-Bdynamic option + if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ + && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then + gcc_cv_ld_static_dynamic=yes + fi +fi +if test x"$gcc_cv_ld_static_dynamic" = xyes; then + AC_DEFINE(HAVE_LD_STATIC_DYNAMIC, 1, +[Define if your linker supports -Bstatic/-Bdynamic option.]) +fi +AC_MSG_RESULT($gcc_cv_ld_static_dynamic) + case "$target" in *-*-linux*) AC_CACHE_CHECK(linker --as-needed support, @@ -3100,6 +3115,9 @@ AC_SUBST(target_cpu_default) AC_SUBST_FILE(language_hooks) +sinclude(../config/gcc-lib-path.m4) +TL_AC_GNU_MAKE_GCC_LIB_PATH + # If it doesn't already exist, create document directory echo "checking for the document directory." 1>&2 if test -d doc ; then diff --git a/contrib/gcc/cp-demangle.c b/contrib/gcc/cp-demangle.c index fe4b367..59e561d 100644 --- a/contrib/gcc/cp-demangle.c +++ b/contrib/gcc/cp-demangle.c @@ -4048,21 +4048,6 @@ __cxa_demangle (mangled_name, output_buffer, length, status) return NULL; } - /* The specification for __cxa_demangle() is that if the mangled - name could be either an extern "C" identifier, or an internal - built-in type name, then we resolve it as the identifier. All - internal built-in type names are a single lower case character. - Frankly, this simplistic disambiguation doesn't make sense to me, - but it is documented, so we implement it here. */ - if (IS_LOWER (mangled_name[0]) - && mangled_name[1] == '\0' - && cplus_demangle_builtin_types[mangled_name[0] - 'a'].name != NULL) - { - if (status != NULL) - *status = -2; - return NULL; - } - demangled = d_demangle (mangled_name, DMGL_PARAMS | DMGL_TYPES, &alc); if (demangled == NULL) diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog index 7462819..a40a034 100644 --- a/contrib/gcc/cp/ChangeLog +++ b/contrib/gcc/cp/ChangeLog @@ -1,3 +1,623 @@ +2005-05-19 Release Manager + + * GCC 3.4.4 released. + +2005-05-08 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/21427 + Backport 2005-03-01 Nathan Sidwell <nathan@codesourcery.com> + * class.c (update_vtable_entry_for_fn): Don't crash on invalid + covariancy. + + * cp-tree.h (THUNK_TARGET): Expand comment. + * method.c (use_thunk): Make sure we also use the target, if that + is a thunk. + + Backport 2005-02-11 Nathan Sidwell <nathan@codesourcery.com> + * class.c (update_vtable_entry_for_fn): Walk the covariant's binfo + chain rather than using lookup_base. + +2005-05-04 Mark Mitchell <mark@codesourcery.com> + + Backport: + 2004-12-21 Mark Mitchell <mark@codesourcery.com> + PR c++/19034 + * tree.c (cp_tree_equal): Handle OVERLOAD. + +2005-05-02 Mark Mitchell <mark@codesourcery.com> + + Revert: + 2005-05-01 Mark Mitchell <mark@codesourcery.com> + * typeck.c (unary_complex_lvalue): In a template, always refuse + simplifications. + +2005-05-01 Mark Mitchell <mark@codesourcery.com> + + Backport: + 2005-02-22 Mark Mitchell <mark@codesourcery.com> + PR c++/19991 + * init.c (decl_constant_value): Iterate if the value of a decl + is itself a constant. + +2005-05-01 Mark Mitchell <mark@codesourcery.com> + + Backport: + 2004-12-22 Mark Mitchell <mark@codesourcery.com> + PR c++/18464 + * call.c (build_this): In templates, do not bother with + build_unary_op. + * typeck.c (unary_complex_lvalue): In a template, always refuse + simplifications. + +2005-04-25 Roger Sayle <roger@eyesopen.com> + Mark Mitchell <mark@codesourcery.com> + + PR c++/20995 + Partial backport from mainline. + 2004-09-27 Mark Mitchell <mark@codesourcery.com> + * tree.c (fold_if_not_in_template): New function. + * cp-tree.h (fold_if_not_in_template): Prototype here. + * call.c (build_conditional_expr): Use fold_if_not_in_template. + * typeck.c (build_binary_op): Likewise. + +2005-04-16 Mark Mitchell <mark@codesourcery.com> + + PR c++/21025 + * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to + which sizeof/alignof is dependent, rather than just whether we are + processing_template_decl. + +2005-04-06 Jason Merrill <jason@redhat.com> + + PR c++/19312 + * tree.c (stabilize_init): Don't bother trying to stabilize + something with no side-effects. + +2005-04-04 Mark Mitchell <mark@codesourcery.com> + + PR c++/20679 + * parser.c (cp_parser_template_name): Fix thinko. + +2005-04-03 Gabriel Dos Reis <gdr@integrable-solutions.net> + + PR c++/18644 + * call.c (build_new_op): Remove check for -Wsynth. + +2005-03-21 Paolo Carlini <pcarlini@suse.de> + + PR c++/20147 + * semantics.c (finish_stmt_expr_expr): Return immediately + if error_operand_p (expr). + +2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/20240 + * decl.c (decls_match): Compare context of VAR_DECL. + +2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/20333 + * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>: + Check the return value of cp_parser_nested_name_specifier. + +2005-03-08 Mark Mitchell <mark@codesourcery.com> + + PR c++/20142 + * init.c (build_vec_init): When determining whether or not the + element type has an asignment operator, look through all array + dimensions. + +2005-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/19311 + * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF. + * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR + for OFFSET_TYPE. + * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF. + Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR. + (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside + template. + +2005-03-02 Alexandre Oliva <aoliva@redhat.com> + + * name-lookup.c (push_overloaded_decl): Don't error if the new + decl matches the old one. + * decl.c (redeclaration_error_message): Likewise. + +2005-02-24 Jakub Jelinek <jakub@redhat.com> + + PR c++/20175 + * decl.c (reshape_init): Don't warn about missing braces if STRING_CST + initializes a char/wchar_t array. + +2005-02-21 Alexandre Oliva <aoliva@redhat.com> + + PR c++/20028 + * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a + template along with TYPE_SIZE. + +2005-02-14 Mark Mitchell <mark@codesourcery.com> + + * decl.c (reshape_init): Use explicit quotes in error message + instead of %q. + +2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/14479 + PR c++/19487 + * pt.c (maybe_check_template_type): Remove. + * cp-tree.h (maybe_check_template_type): Remove prototype. + * name-lookup.c (maybe_process_template_type_declaration): Don't + use maybe_check_template_type. + +2005-02-10 Mark Mitchell <mark@codesourcery.com> + + PR c++/19755 + * decl.c (reshape_init): Issue warnings about missing braces. + +2005-02-09 Mark Mitchell <mark@codesourcery.com> + + * parser.c (cp_parser_unqualified_id): Initialize type_decl. + + PR c++/19787 + * call.c (initialize_reference): Robustify. + + PR c++/19762 + * parser.c (cp_parser_unqualified_id): Avoid creating destructor + names with invalid types. + + PR c++/19739 + * parser.c (cp_parser_attributes_list): Allow empty lists. + +2005-02-08 Mark Mitchell <mark@codesourcery.com> + + PR c++/19733 + * cvt.c (convert_to_void): Issue errors about pseudo-destructor + expressions. + +2005-02-01 Alexandre Oliva <aoliva@redhat.com> + + PR c++/18757 + PR c++/19366 + PR c++/19499 + * parser.c (cp_parser_template_id): Revert 2004-12-09's patch. + Issue an error when creating the template id. + * pt.c (fn_type_unification): Return early if the explicit + template arg list is an error_mark_node. + +2005-01-27 J"orn Rennecke <joern.rennecke@st.com> + + PR c++/18370 + * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p. + +2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/19375 + * semantics.c (finish_id_expression): Disable access checking for + already lookuped FIELD_DECL. + +2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/19258 + * parser.c (cp_parser_late_parsing_default_args): Handle friend + defined in class. + * pt.c (push_access_scope, pop_access_scope): Likewise. + +2005-01-15 Jakub Jelinek <jakub@redhat.com> + + PR c++/19263 + * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy + of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified. + Store code to *pcode. + +2004-12-28 Jakub Jelinek <jakub@redhat.com> + + PR c++/18384, c++/18327 + * decl.c (reshape_init_array): Use UHWI type for max_index_cst + and index. Convert max_index to size_type_node if it isn't + host_integerp (, 1). + +2004-12-23 Alexandre Oliva <aoliva@redhat.com> + + PR c++/18962 + * pt.c (check_explicit_specialization): Use the argument list from + the definition in a template function specialization definition. + +2004-12-23 Alexandre Oliva <aoliva@redhat.com> + + PR c++/18757 + * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID + if parsing failed. + +2004-12-17 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/18975 + * method.c (do_build_copy_constructor): Refactor. Don't const + qualify a mutable field. + (do_build_assign_ref): Likewise. + +2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR c++/18731 + * parser.c (cp_parser_class_head): Reject typedef-name in class head. + +2004-12-09 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/16681 + * init.c (build_zero_init): Build a RANGE_EXPR for an array + initializer. + +2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/18100 + * name-lookup.c (push_class_level_binding): Diagnose nested + class template with the same name as enclosing class. + +2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/17011, c++/17971 + * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose + invalid field. + (tsubst_copy_and_build) <COMPONENT_REF case>: Check + error_mark_node after member substitution. + * semantics.c (finish_id_expression): Call + finish_non_static_data_member for dependent FIELD_DECL. + +2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/18123 + * parser.c (cp_parser_type_specifier): Don't create new enum + type if it is not in the form 'enum [identifier] { [...] };'. + Catch template declaration of enum. + +2004-12-01 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/17431 + * call.c (standard_conversion): Add FLAGS parameter. Do not allow + derived to base conversion when checking constructor + accessibility. + (implicit_conversion): Pass FLAGS to standard_conversion. + (check_constructir_callable): Disallow conversion functions. + +2004-11-12 Mark Mitchell <mark@codesourcery.com> + + PR c++/18389 + * decl.c (start_decl): Make sure to set *pop_scope_p. Return + error_mark_node to indicate errors. + + PR c++/18436 + * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an + unqualified name resolves to a member function. + + PR c++/18407 + * pt.c (tsubst_copy_and_build): Handle qualified names used from a + derived class correctly. + +2004-11-04 Release Manager + + * GCC 3.4.3 released. + +2004-10-31 Mark Mitchell <mark@codesourcery.com> + + PR c++/15172 + * typeck2.c (store_init_value): Use split_nonconstant_init even + for types that require construction. + +2004-10-28 Mark Mitchell <mark@codesourcery.com> + + PR c++/17132 + * pt.c (instantiate_class_template): Increment + processing_template_decl when substituting into a member class + template. + +2004-10-27 Mark Mitchell <mark@codesourcery.com> + + PR c++/18140 + * parser.c (cp_parser_next_token_ends_template_argument_p): Do not + include ">>". + +2004-10-27 Andrew Pinski <pinskia@physics.uc.edu> + + PR c++/13560 + * error.c (cp_error_at): Output the context as it might be + different file as the other location. + +2004-10-26 Mark Mitchell <mark@codesourcery.com> + + PR c++/18093 + * search.c (current_scope): Return the innermost non-block scope, + not the innermost non-block, non-namespace scope. + (at_namespace_scope_p): Adjust accordingly. + (dfs_accessible_post): Do not pass namespaces to is_friend. + (dfs_walk_once_accessible_r): Likewise. + * decl.c (grokvardecl): Adjust call to current_scope. + (build_enumerator): Likewise. + * parser.c (cp_parser_using_declaration): Likewise. + (cp_parser_direct_declarator): Use at_namespace_scope_p instead of + current_scope. + (cp_parser_class_head): Adjust call to current_scope. + * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the + alias. + + PR c++/18020 + * pt.c (tusbst_copy_and_build): Resolve enumeration constants to + their underlying values. + +2004-10-17 Andrew Pinski <pinskia@physics.uc.edu> + + PR c++/16301 + * name-lookup.c (parse_using_directive): If we have a + error_mark_node, do not set the decl namespace associations + on it. + +2004-10-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/17976 + * decl.c (cp_finish_decl): Do not call expand_static_init more + than once for a single variable. + +2004-10-11 Mark Mitchell <mark@codesourcery.com> + + PR c++/15786 + * parser.c (cp_parser_declarator): Add member_p parameter. + (cp_parser_condition): Adjust calls to cp_parser_declarator. + (cp_parser_explicit_instantiation): Likewise. + (cp_parser_init_declarator): Likewise. + (cp_parser_direct_declarator): Add member_p parameter. Do not + parse tentatively when parsing the parameters to a member. + (cp_parser_type_id): Adjust calls to cp_parser_declarator. + (cp_parser_parameter_declaration): Likewise. + (cp_parser_member_declaration): Likewise. + (cp_parser_exception_declaration): Likewise. + +2004-10-11 Mark Mitchell <mark@codesourcery.com> + + * decl2.c (finish_anon_union): Robustify. + +2004-10-10 Mark Mitchell <mark@codesourcery.com> + + PR c++/17393 + * decl.c (grokdeclarator): Robustify error-recovery on invalid + declarations. + +2004-10-09 Mark Mitchell <mark@codesourcery.com> + + PR c++/17821 + * parser.c (cp_parser_postfix_dot_deref_expression): If the + pseduo-destructor-name production does not work, fall back to the + ordinary production. + + PR c++/17826 + * tree.c (cp_tree_equal): Handle a BASELINK. + +2004-10-09 Mark Mitchell <mark@codesourcery.com> + + PR c++/17524 + * cp-tree.h (check_var_type): New function. + * decl.c (check_var_type): New function, split out from ... + (grokdeclarator): ... here. + * pt.c (tsubst_decl): Use check_var_type. + + PR c++/17685 + * decl.c (grokdeclarator): Disallow declarations of operators as + non-functions. + +2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR c++/17868 + * error.c (dump_expr): Add missing case for RDIV_EXPR. + +2004-10-08 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/17829 + * parser.c (cp_parser_postfix_expression): Inhibit Koenig when + unqualified lookup finds a member function. + +2004-09-28 Roger Sayle <roger@eyesopen.com> + + PR driver/17537 + * g++spec.c (lang_specific_driver): Unrecognized libraries, other + than -lc and -lm, may require linking against libstc++. + +2004-09-27 Mark Mitchell <mark@codesourcery.com> + + PR c++/17585 + * cp-tree.h (shared_member_p): Declare. + * search.c (shared_member_p): Give it external linkage. + * semantics.c (finish_qualified_id_expr): Use it. + (finish_id_expression): Likewise. + +2004-09-22 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/14179 + * parser.c (cp_parser_initializer): Speed up parsing of simple + literals as initializers. + +2004-09-21 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/14179 + * decl.c (reshape_init): Extract array handling into... + (reshape_init_array): New function. Use integers instead of trees + for indices. Handle out-of-range designated initializers. + +2004-09-16 Mark Mitchell <mark@codesourcery.com> + + PR c++/17501 + * parser.c (cp_parser_nested_name_specifier): Do not resolve + typename types if the user explicitly said "typename". + +2004-09-13 Mark Mitchell <mark@codesourcery.com> + + PR c++/16162 + * parser.c (cp_parser_id_expression): Correct value for + is_declarator. + (cp_parser_nested_name_specifier_opt): Look through typenames as + necessary. + (cp_parser_template_name): Honor check_dependency_p. + +2004-09-13 Mark Mitchell <mark@codesourcery.com> + + PR c++/17327 + * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with + gcc_unreacable. + +2004-09-06 Release Manager + + * GCC 3.4.2 released. + +2004-08-25 Roger Sayle <roger@eyesopen.com> + + PR middle-end/16693 + PR tree-optimization/16372 + * decl.c (finish_enum): Make the precision of the enumerated type + the same width as the underlying integer type. + +2004-08-24 Jason Merrill <jason@redhat.com> + + PR c++/16851 + * tree.c (stabilize_init): See through a COMPOUND_EXPR. + + PR c++/15461 + * semantics.c (nullify_returns_r): Replace a DECL_STMT + for the NRV with an INIT_EXPR. + +2004-08-24 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/16889 + * (is_subobject_of_p): Resurrect & optimize. + (lookup_field_r): Use it. + +2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/16706 + * search.c (friend_accessible_p): Increment processing_template_decl + when deal with TEMPLATE_DECL of SCOPE. + +2004-08-23 Janis Johnson <janis187@us.ibm.com> + + Backports from mainline: + + 2004-02-27 Ziemowit Laski <zlaski@apple.com> + 2004-03-24 Ziemowit Laski <zlaski@apple.com> + + * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H). + * mangle.c (write_type): Add call to 'mangle_fundamental_type' + target hook. + * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs. + +2004-08-19 Mark Mitchell <mark@codesourcery.com> + + PR c++/15890 + * pt.c (push_template_decl_real): Disallow template allocation + functions with fewer than two parameters. + +2004-08-18 Mark Mitchell <mark@codesourcery.com> + + PR c++/17068 + * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as + dependent. + +2004-08-17 Mark Mitchell <mark@codesourcery.com> + + PR c++/16246 + * pt.c (unify): Make sure that non-type arguments have the same + type as the corresponding parameter. + +2004-08-12 Mark Mitchell <mark@codesourcery.com> + + PR c++/16273 + * class.c (count_depth_data): New type. + (dfs_depth_post): New function. + (dfs_depth_q): Likewise. + (find_final_overrider_data_s): Change type of vpath. + Add vpath_list. + (dfs_find_final_overrider_1): New function. + (dfs_find_final_overrider): Use it. + (dfs_find_final_overrider_q): Adjust use of vpath. + (dfs_find_final_overrider_post): Likewise. + (find_final_overrider): Use dfs_depth. Allocate and deallocate + vpath_list. + +2004-08-12 Jan Beulich <jbeulich@novell.com> + + * parser.c (cp_parser_asm_definition): Properly consume scope operator + tokens preceding the clobbers. Don't check for scope operator + following inputs. Simplify inputs handling to match that now used for + clobbers. + +2004-08-11 Mark Mitchell <mark@codesourcery.com> + + PR c++/16698 + * except.c (build_throw): Allocate cleanup_type and the function + for __cxa_throw separately. + +2004-08-11 Mark Mitchell <mark@codesourcery.com> + + PR c++/16717 + * semantics.c (expand_body): Do not update static_ctors and + static_dtors here. + (expand_or_defer_fn): Do it here, instead. + + PR c++/16853 + * call.c (standard_conversion): Do not accept conversions between + pointers to members if the class types are unrelated. + + PR c++/16870 + * pt.c (tsubst): Just return the unknown_type_node. + + PR c++/16964 + * parser.c (cp_parser_class_specifier): Robustify. + + PR c++/16904 + * pt.c (tsubst_copy_and_build): Complain about invalid + qualification. + + PR c++/16929 + * pt.c (tsubst_default_argument): Clear out current_class_ptr and + current_class_ref while tsubsting. + +2004-08-01 Mark Mitchell <mark@codesourcery.com> + + PR c++/16224 + * name-lookup.c (decl_namespace): Remove. + (current_decl_namespace): Use decl_namespace_context instead of + decl_namespace. + (push_decl_namespace): Likewise. + (arg_assoc_class): Likewise. + (arg_assoc_type): Likewise. + * pt.c (check_specialization_namespace): New function. + (maybe_process_partial_specialization): Use it. + (register_specialization): Likewise. + +2004-08-01 Mark Mitchell <mark@codesourcery.com> + + PR c++/16489 + * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro. + * call.c (null_ptr_cst_p): Handle variables with constant + initializers. + * pt.c (convert_nontype_argument): Use + DECL_INTEGRAL_CONSTANT_VAR_P. + * semantics.c (finish_id_expression): Likewise. + + PR c++/16529 + * decl.c (duplicate_decls): Reject duplicate namespace + declarations. + + PR c++/16810 + * typeck.c (build_ptrmemfunc): Loosen assertion. + +2004-07-28 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/13092 + * init.c (build_offset_ref): Build SCOPE_REF with non-null + TREE_TYPE for non-dependent names. + * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF. + * pt.c (type_dependent_expression_p): Handle SCOPE_REF with + unknown_type_node as its TREE_TYPE. + * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. + * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression. + (dump_expr) <SCOPE_REF case>: Likewise. + 2004-07-21 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> PR c++/16175 diff --git a/contrib/gcc/cp/Make-lang.in b/contrib/gcc/cp/Make-lang.in index 9f7ebfb..5888110 100644 --- a/contrib/gcc/cp/Make-lang.in +++ b/contrib/gcc/cp/Make-lang.in @@ -258,7 +258,8 @@ cp/semantics.o: cp/semantics.c $(CXX_TREE_H) $(TM_H) cp/lex.h except.h toplev.h cp/dump.o: cp/dump.c $(CXX_TREE_H) $(TM_H) tree-dump.h cp/optimize.o: cp/optimize.c $(CXX_TREE_H) $(TM_H) rtl.h integrate.h insn-config.h \ input.h $(PARAMS_H) debug.h tree-inline.h -cp/mangle.o: cp/mangle.c $(CXX_TREE_H) $(TM_H) toplev.h real.h gt-cp-mangle.h $(TM_P_H) +cp/mangle.o: cp/mangle.c $(CXX_TREE_H) $(TM_H) toplev.h real.h gt-cp-mangle.h \ + $(TARGET_H) $(TM_P_H) cp/parser.o: cp/parser.c $(CXX_TREE_H) $(TM_H) diagnostic.h gt-cp-parser.h output.h diff --git a/contrib/gcc/cp/call.c b/contrib/gcc/cp/call.c index b1353f5..aeed315 100644 --- a/contrib/gcc/cp/call.c +++ b/contrib/gcc/cp/call.c @@ -1,6 +1,6 @@ /* Functions related to invoking methods and overloaded functions. Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) and modified by Brendan Kehoe (brendan@cygnus.com). @@ -86,7 +86,7 @@ static struct z_candidate *add_conv_candidate static struct z_candidate *add_function_candidate (struct z_candidate **, tree, tree, tree, tree, tree, int); static tree implicit_conversion (tree, tree, tree, int); -static tree standard_conversion (tree, tree, tree); +static tree standard_conversion (tree, tree, tree, int); static tree reference_binding (tree, tree, tree, int); static tree build_conv (enum tree_code, tree, tree); static bool is_subseq (tree, tree); @@ -373,6 +373,9 @@ struct z_candidate GTY(()) { #define USER_CONV_CAND(NODE) WRAPPER_ZC (TREE_OPERAND (NODE, 1)) #define USER_CONV_FN(NODE) (USER_CONV_CAND (NODE)->fn) +/* Returns true iff T is a null pointer constant in the sense of + [conv.ptr]. */ + bool null_ptr_cst_p (tree t) { @@ -380,6 +383,8 @@ null_ptr_cst_p (tree t) A null pointer constant is an integral constant expression (_expr.const_) rvalue of integer type that evaluates to zero. */ + if (DECL_INTEGRAL_CONSTANT_VAR_P (t)) + t = decl_constant_value (t); if (t == null_node || (CP_INTEGRAL_TYPE_P (TREE_TYPE (t)) && integer_zerop (t))) return true; @@ -449,7 +454,7 @@ strip_top_quals (tree t) also pass the expression EXPR to convert from. */ static tree -standard_conversion (tree to, tree from, tree expr) +standard_conversion (tree to, tree from, tree expr, int flags) { enum tree_code fcode, tcode; tree conv; @@ -500,7 +505,7 @@ standard_conversion (tree to, tree from, tree expr) the standard conversion sequence to perform componentwise conversion. */ tree part_conv = standard_conversion - (TREE_TYPE (to), TREE_TYPE (from), NULL_TREE); + (TREE_TYPE (to), TREE_TYPE (from), NULL_TREE, flags); if (part_conv) { @@ -573,6 +578,8 @@ standard_conversion (tree to, tree from, tree expr) TYPE_PTRMEM_POINTED_TO_TYPE (from)); conv = build_conv (PMEM_CONV, from, conv); } + else if (!same_type_p (fbase, tbase)) + return NULL; } else if (IS_AGGR_TYPE (TREE_TYPE (from)) && IS_AGGR_TYPE (TREE_TYPE (to)) @@ -685,7 +692,8 @@ standard_conversion (tree to, tree from, tree expr) && ((*targetm.vector_opaque_p) (from) || (*targetm.vector_opaque_p) (to))) return build_conv (STD_CONV, to, conv); - else if (IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from) + else if (!(flags & LOOKUP_CONSTRUCTOR_CALLABLE) + && IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from) && is_properly_derived_from (from, to)) { if (TREE_CODE (conv) == RVALUE_CONV) @@ -1098,7 +1106,7 @@ implicit_conversion (tree to, tree from, tree expr, int flags) if (TREE_CODE (to) == REFERENCE_TYPE) conv = reference_binding (to, from, expr, flags); else - conv = standard_conversion (to, from, expr); + conv = standard_conversion (to, from, expr, flags); if (conv) return conv; @@ -2195,10 +2203,18 @@ any_strictly_viable (struct z_candidate *cands) return false; } +/* OBJ is being used in an expression like "OBJ.f (...)". In other + words, it is about to become the "this" pointer for a member + function call. Take the address of the object. */ + static tree build_this (tree obj) { - /* Fix this to work on non-lvalues. */ + /* In a template, we are only concerned about the type of the + expression, so we can take a shortcut. */ + if (processing_template_decl) + return build_address (obj); + return build_unary_op (ADDR_EXPR, obj, 0); } @@ -3270,7 +3286,8 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3) } valid_operands: - result = fold (build (COND_EXPR, result_type, arg1, arg2, arg3)); + result = fold_if_not_in_template (build (COND_EXPR, result_type, + arg1, arg2, arg3)); /* We can't use result_type below, as fold might have returned a throw_expr. */ @@ -3554,20 +3571,6 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3, if (overloaded_p) *overloaded_p = true; - if (warn_synth - && fnname == ansi_assopname (NOP_EXPR) - && DECL_ARTIFICIAL (cand->fn) - && candidates->next - && ! candidates->next->next) - { - warning ("using synthesized `%#D' for copy assignment", - cand->fn); - cp_warning_at (" where cfront would use `%#D'", - cand == candidates - ? candidates->next->fn - : candidates->fn); - } - return build_over_call (cand, LOOKUP_NORMAL); } @@ -3871,6 +3874,7 @@ check_constructor_callable (tree type, tree expr) build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), LOOKUP_NORMAL | LOOKUP_ONLYCONVERTING + | LOOKUP_NO_CONVERSION | LOOKUP_CONSTRUCTOR_CALLABLE); } @@ -6181,6 +6185,8 @@ initialize_reference (tree type, tree expr, tree decl, tree *cleanup) /*fn=*/NULL_TREE, /*argnum=*/0, /*inner=*/-1, /*issue_conversion_warnings=*/true); + if (error_operand_p (expr)) + return error_mark_node; if (!real_lvalue_p (expr)) { tree init; diff --git a/contrib/gcc/cp/class.c b/contrib/gcc/cp/class.c index 9fa7f26..09daf11 100644 --- a/contrib/gcc/cp/class.c +++ b/contrib/gcc/cp/class.c @@ -1,6 +1,7 @@ /* Functions related to building classes and their related objects. Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. @@ -1847,6 +1848,36 @@ base_derived_from (tree derived, tree base) return false; } +typedef struct count_depth_data { + /* The depth of the current subobject, with "1" as the depth of the + most derived object in the hierarchy. */ + size_t depth; + /* The maximum depth found so far. */ + size_t max_depth; +} count_depth_data; + +/* Called from find_final_overrider via dfs_walk. */ + +static tree +dfs_depth_post (tree binfo ATTRIBUTE_UNUSED, void *data) +{ + count_depth_data *cd = (count_depth_data *) data; + if (cd->depth > cd->max_depth) + cd->max_depth = cd->depth; + cd->depth--; + return NULL_TREE; +} + +/* Called from find_final_overrider via dfs_walk. */ + +static tree +dfs_depth_q (tree derived, int i, void *data) +{ + count_depth_data *cd = (count_depth_data *) data; + cd->depth++; + return BINFO_BASETYPE (derived, i); +} + typedef struct find_final_overrider_data_s { /* The function for which we are trying to find a final overrider. */ tree fn; @@ -1856,70 +1887,74 @@ typedef struct find_final_overrider_data_s { tree most_derived_type; /* The candidate overriders. */ tree candidates; - /* Binfos which inherited virtually on the current path. */ - tree vpath; + /* Each entry in this array is the next-most-derived class for a + virtual base class along the current path. */ + tree *vpath_list; + /* A pointer one past the top of the VPATH_LIST. */ + tree *vpath; } find_final_overrider_data; -/* Called from find_final_overrider via dfs_walk. */ +/* Add the overrider along the current path to FFOD->CANDIDATES. + Returns true if an overrider was found; false otherwise. */ -static tree -dfs_find_final_overrider (tree binfo, void* data) +static bool +dfs_find_final_overrider_1 (tree binfo, + tree *vpath, + find_final_overrider_data *ffod) { - find_final_overrider_data *ffod = (find_final_overrider_data *) data; - - if (binfo == ffod->declaring_base) + tree method; + + /* If BINFO is not the most derived type, try a more derived class. + A definition there will overrider a definition here. */ + if (!same_type_p (BINFO_TYPE (binfo), ffod->most_derived_type)) { - /* We've found a path to the declaring base. Walk the path from - derived to base, looking for an overrider for FN. */ - tree path, probe, vpath; + tree derived; + + if (TREE_VIA_VIRTUAL (binfo)) + derived = *--vpath; + else + derived = BINFO_INHERITANCE_CHAIN (binfo); + if (dfs_find_final_overrider_1 (derived, vpath, ffod)) + return true; + } - /* Build the path, using the inheritance chain and record of - virtual inheritance. */ - for (path = NULL_TREE, probe = binfo, vpath = ffod->vpath;;) + method = look_for_overrides_here (BINFO_TYPE (binfo), ffod->fn); + if (method) + { + tree *candidate = &ffod->candidates; + + /* Remove any candidates overridden by this new function. */ + while (*candidate) { - path = tree_cons (NULL_TREE, probe, path); - if (same_type_p (BINFO_TYPE (probe), ffod->most_derived_type)) - break; - if (TREE_VIA_VIRTUAL (probe)) - { - probe = TREE_VALUE (vpath); - vpath = TREE_CHAIN (vpath); - } + /* If *CANDIDATE overrides METHOD, then METHOD + cannot override anything else on the list. */ + if (base_derived_from (TREE_VALUE (*candidate), binfo)) + return true; + /* If METHOD overrides *CANDIDATE, remove *CANDIDATE. */ + if (base_derived_from (binfo, TREE_VALUE (*candidate))) + *candidate = TREE_CHAIN (*candidate); else - probe = BINFO_INHERITANCE_CHAIN (probe); - } - /* Now walk path, looking for overrides. */ - for (; path; path = TREE_CHAIN (path)) - { - tree method = look_for_overrides_here - (BINFO_TYPE (TREE_VALUE (path)), ffod->fn); - - if (method) - { - tree *candidate = &ffod->candidates; - path = TREE_VALUE (path); - - /* Remove any candidates overridden by this new function. */ - while (*candidate) - { - /* If *CANDIDATE overrides METHOD, then METHOD - cannot override anything else on the list. */ - if (base_derived_from (TREE_VALUE (*candidate), path)) - return NULL_TREE; - /* If METHOD overrides *CANDIDATE, remove *CANDIDATE. */ - if (base_derived_from (path, TREE_VALUE (*candidate))) - *candidate = TREE_CHAIN (*candidate); - else - candidate = &TREE_CHAIN (*candidate); - } - - /* Add the new function. */ - ffod->candidates = tree_cons (method, path, ffod->candidates); - break; - } + candidate = &TREE_CHAIN (*candidate); } + + /* Add the new function. */ + ffod->candidates = tree_cons (method, binfo, ffod->candidates); + return true; } + return false; +} + +/* Called from find_final_overrider via dfs_walk. */ + +static tree +dfs_find_final_overrider (tree binfo, void* data) +{ + find_final_overrider_data *ffod = (find_final_overrider_data *) data; + + if (binfo == ffod->declaring_base) + dfs_find_final_overrider_1 (binfo, ffod->vpath, ffod); + return NULL_TREE; } @@ -1930,7 +1965,7 @@ dfs_find_final_overrider_q (tree derived, int ix, void *data) find_final_overrider_data *ffod = (find_final_overrider_data *) data; if (TREE_VIA_VIRTUAL (binfo)) - ffod->vpath = tree_cons (NULL_TREE, derived, ffod->vpath); + *ffod->vpath++ = derived; return binfo; } @@ -1940,8 +1975,8 @@ dfs_find_final_overrider_post (tree binfo, void *data) { find_final_overrider_data *ffod = (find_final_overrider_data *) data; - if (TREE_VIA_VIRTUAL (binfo) && TREE_CHAIN (ffod->vpath)) - ffod->vpath = TREE_CHAIN (ffod->vpath); + if (TREE_VIA_VIRTUAL (binfo)) + ffod->vpath--; return NULL_TREE; } @@ -1955,6 +1990,7 @@ static tree find_final_overrider (tree derived, tree binfo, tree fn) { find_final_overrider_data ffod; + count_depth_data cd; /* Getting this right is a little tricky. This is valid: @@ -1976,12 +2012,18 @@ find_final_overrider (tree derived, tree binfo, tree fn) different overriders along any two, then there is a problem. */ if (DECL_THUNK_P (fn)) fn = THUNK_TARGET (fn); - + + /* Determine the depth of the hierarchy. */ + cd.depth = 0; + cd.max_depth = 0; + dfs_walk (derived, dfs_depth_post, dfs_depth_q, &cd); + ffod.fn = fn; ffod.declaring_base = binfo; ffod.most_derived_type = BINFO_TYPE (derived); ffod.candidates = NULL_TREE; - ffod.vpath = NULL_TREE; + ffod.vpath_list = (tree *) xcalloc (cd.max_depth, sizeof (tree)); + ffod.vpath = ffod.vpath_list; dfs_walk_real (derived, dfs_find_final_overrider, @@ -1989,6 +2031,8 @@ find_final_overrider (tree derived, tree binfo, tree fn) dfs_find_final_overrider_q, &ffod); + free (ffod.vpath_list); + /* If there was no winner, issue an error message. */ if (!ffod.candidates || TREE_CHAIN (ffod.candidates)) { @@ -2072,6 +2116,9 @@ update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals, also be converting to the return type of FN, we have to combine the two conversions here. */ tree fixed_offset, virtual_offset; + + over_return = TREE_TYPE (over_return); + base_return = TREE_TYPE (base_return); if (DECL_THUNK_P (fn)) { @@ -2089,32 +2136,51 @@ update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals, virtual_offset = TREE_VALUE (purpose_member (BINFO_TYPE (virtual_offset), - CLASSTYPE_VBASECLASSES (TREE_TYPE (over_return)))); - else if (!same_type_p (TREE_TYPE (over_return), - TREE_TYPE (base_return))) + CLASSTYPE_VBASECLASSES (over_return))); + else if (!same_type_ignoring_top_level_qualifiers_p + (over_return, base_return)) { - /* There was no existing virtual thunk (which takes - precedence). */ - tree thunk_binfo; - base_kind kind; + /* There was no existing virtual thunk (which takes + precedence). So find the binfo of the base function's + return type within the overriding function's return type. + We cannot call lookup base here, because we're inside a + dfs_walk, and will therefore clobber the BINFO_MARKED + flags. Fortunately we know the covariancy is valid (it + has already been checked), so we can just iterate along + the binfos, which have been chained in inheritance graph + order. Of course it is lame that we have to repeat the + search here anyway -- we should really be caching pieces + of the vtable and avoiding this repeated work. */ + tree thunk_binfo, base_binfo; + + /* Find the base binfo within the overriding function's + return type. We will always find a thunk_binfo, except + when the covariancy is invalid (which we will have + already diagnosed). */ + for (base_binfo = TYPE_BINFO (base_return), + thunk_binfo = TYPE_BINFO (over_return); + thunk_binfo; + thunk_binfo = TREE_CHAIN (thunk_binfo)) + if (same_type_p (BINFO_TYPE (thunk_binfo), + BINFO_TYPE (base_binfo))) + break; - thunk_binfo = lookup_base (TREE_TYPE (over_return), - TREE_TYPE (base_return), - ba_check | ba_quiet, &kind); - - if (thunk_binfo && (kind == bk_via_virtual - || !BINFO_OFFSET_ZEROP (thunk_binfo))) + /* See if virtual inheritance is involved. */ + for (virtual_offset = thunk_binfo; + virtual_offset; + virtual_offset = BINFO_INHERITANCE_CHAIN (virtual_offset)) + if (TREE_VIA_VIRTUAL (virtual_offset)) + break; + + if (virtual_offset + || (thunk_binfo && !BINFO_OFFSET_ZEROP (thunk_binfo))) { tree offset = convert (ssizetype, BINFO_OFFSET (thunk_binfo)); - if (kind == bk_via_virtual) + if (virtual_offset) { - /* We convert via virtual base. Find the virtual - base and adjust the fixed offset to be from there. */ - while (!TREE_VIA_VIRTUAL (thunk_binfo)) - thunk_binfo = BINFO_INHERITANCE_CHAIN (thunk_binfo); - - virtual_offset = thunk_binfo; + /* We convert via virtual base. Adjust the fixed + offset to be from there. */ offset = size_diffop (offset, convert (ssizetype, BINFO_OFFSET (virtual_offset))); @@ -5174,6 +5240,7 @@ finish_struct (tree t, tree attributes) { finish_struct_methods (t); TYPE_SIZE (t) = bitsize_zero_node; + TYPE_SIZE_UNIT (t) = size_zero_node; } else finish_struct_1 (t); diff --git a/contrib/gcc/cp/cp-tree.h b/contrib/gcc/cp/cp-tree.h index b3ceab4..ed33f32 100644 --- a/contrib/gcc/cp/cp-tree.h +++ b/contrib/gcc/cp/cp-tree.h @@ -1,6 +1,6 @@ /* Definitions for C++ parsing and type checking. Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. @@ -1899,6 +1899,23 @@ struct lang_decl GTY(()) #define DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P(NODE) \ (TREE_LANG_FLAG_2 (VAR_DECL_CHECK (NODE))) +/* Nonzero for a VAR_DECL that can be used in an integral constant + expression. + + [expr.const] + + An integral constant-expression can only involve ... const + variables of static or enumeration types initialized with + constant expressions ... + + The standard does not require that the expression be non-volatile. + G++ implements the proposed correction in DR 457. */ +#define DECL_INTEGRAL_CONSTANT_VAR_P(NODE) \ + (TREE_CODE (NODE) == VAR_DECL \ + && CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (NODE)) \ + && INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (NODE)) \ + && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (NODE)) + /* Nonzero if the DECL was initialized in the class definition itself, rather than outside the class. This is used for both static member VAR_DECLS, and FUNTION_DECLS that are defined in the class. */ @@ -2900,7 +2917,8 @@ struct lang_decl GTY(()) #define THUNK_ALIAS(DECL) \ (DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (DECL))->decl_flags.u.thunk_alias) -/* For thunk NODE, this is the FUNCTION_DECL thunked to. */ +/* For thunk NODE, this is the FUNCTION_DECL thunked to. It is + possible for the target to be a thunk too. */ #define THUNK_TARGET(NODE) \ (DECL_LANG_SPECIFIC (NODE)->u.f.befriending_classes) @@ -3711,6 +3729,7 @@ extern tree cp_fname_init (const char *, tree *); extern tree check_elaborated_type_specifier (enum tag_types, tree, bool); extern tree cxx_builtin_type_decls (void); extern void warn_extern_redeclared_static (tree, tree); +extern tree check_var_type (tree, tree); extern bool have_extern_spec; @@ -3903,7 +3922,6 @@ extern int is_specialization_of (tree, tree); extern bool is_specialization_of_friend (tree, tree); extern int comp_template_args (tree, tree); extern void maybe_process_partial_specialization (tree); -extern void maybe_check_template_type (tree); extern tree most_specialized_instantiation (tree); extern void print_candidates (tree); extern int instantiate_pending_templates (void); @@ -3997,6 +4015,7 @@ extern tree adjust_result_of_qualified_name_lookup (tree, tree, tree); extern tree copied_binfo (tree, tree); extern tree original_binfo (tree, tree); +extern int shared_member_p (tree); /* in semantics.c */ extern void push_deferring_access_checks (deferring_kind); @@ -4176,6 +4195,7 @@ extern int cp_cannot_inline_tree_fn (tree*); extern tree cp_add_pending_fn_decls (void*,tree); extern int cp_is_overload_p (tree); extern int cp_auto_var_in_fn_p (tree,tree); +extern tree fold_if_not_in_template (tree); extern tree cp_copy_res_decl_for_inlining (tree, tree, tree, void*, int*, tree); diff --git a/contrib/gcc/cp/cvt.c b/contrib/gcc/cp/cvt.c index 48be5c5..95fce07 100644 --- a/contrib/gcc/cp/cvt.c +++ b/contrib/gcc/cp/cvt.c @@ -793,6 +793,11 @@ convert_to_void (tree expr, const char *implicit) return expr; if (invalid_nonstatic_memfn_p (expr)) return error_mark_node; + if (TREE_CODE (expr) == PSEUDO_DTOR_EXPR) + { + error ("pseudo-destructor is not called"); + return error_mark_node; + } if (VOID_TYPE_P (TREE_TYPE (expr))) return expr; switch (TREE_CODE (expr)) diff --git a/contrib/gcc/cp/cxx-pretty-print.c b/contrib/gcc/cp/cxx-pretty-print.c index 53c677a..e4d304a 100644 --- a/contrib/gcc/cp/cxx-pretty-print.c +++ b/contrib/gcc/cp/cxx-pretty-print.c @@ -177,6 +177,10 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t) pp_cxx_template_id (pp, t); break; + case BASELINK: + pp_cxx_unqualified_id (pp, BASELINK_FUNCTIONS (t)); + break; + case RECORD_TYPE: case UNION_TYPE: case ENUMERAL_TYPE: diff --git a/contrib/gcc/cp/decl.c b/contrib/gcc/cp/decl.c index eb34d39..6c7cece 100644 --- a/contrib/gcc/cp/decl.c +++ b/contrib/gcc/cp/decl.c @@ -1,6 +1,6 @@ /* Process declarations and variables for C++ compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. @@ -119,6 +119,7 @@ static void initialize_local_var (tree, tree); static void expand_static_init (tree, tree); static tree next_initializable_field (tree); static tree reshape_init (tree, tree *); +static bool reshape_init_array (tree, tree, tree *, tree); static tree build_typename_type (tree, tree, tree); /* Erroneous argument lists can use this *IFF* they do not modify it. */ @@ -1067,6 +1068,12 @@ decls_match (tree newdecl, tree olddecl) } else { + /* Need to check scope for variable declaration (VAR_DECL). + For typedef (TYPE_DECL), scope is ignored. */ + if (TREE_CODE (newdecl) == VAR_DECL + && CP_DECL_CONTEXT (newdecl) != CP_DECL_CONTEXT (olddecl)) + return 0; + if (TREE_TYPE (newdecl) == error_mark_node) types_match = TREE_TYPE (olddecl) == error_mark_node; else if (TREE_TYPE (olddecl) == NULL_TREE) @@ -1410,19 +1417,32 @@ duplicate_decls (tree newdecl, tree olddecl) /* One of the declarations is a template instantiation, and the other is not a template at all. That's OK. */ return NULL_TREE; - else if (TREE_CODE (newdecl) == NAMESPACE_DECL - && DECL_NAMESPACE_ALIAS (newdecl) - && DECL_NAMESPACE_ALIAS (newdecl) == DECL_NAMESPACE_ALIAS (olddecl)) - /* In [namespace.alias] we have: - - In a declarative region, a namespace-alias-definition can be - used to redefine a namespace-alias declared in that declarative - region to refer only to the namespace to which it already - refers. - - Therefore, if we encounter a second alias directive for the same - alias, we can just ignore the second directive. */ - return olddecl; + else if (TREE_CODE (newdecl) == NAMESPACE_DECL) + { + /* In [namespace.alias] we have: + + In a declarative region, a namespace-alias-definition can be + used to redefine a namespace-alias declared in that declarative + region to refer only to the namespace to which it already + refers. + + Therefore, if we encounter a second alias directive for the same + alias, we can just ignore the second directive. */ + if (DECL_NAMESPACE_ALIAS (newdecl) + && (DECL_NAMESPACE_ALIAS (newdecl) + == DECL_NAMESPACE_ALIAS (olddecl))) + return olddecl; + /* [namespace.alias] + + A namespace-name or namespace-alias shall not be declared as + the name of any other entity in the same declarative region. + A namespace-name defined at global scope shall not be + declared as the name of any other entity in any glogal scope + of the program. */ + error ("declaration of `namespace %D' conflicts with", newdecl); + cp_error_at ("previous declaration of `namespace %D' here", olddecl); + return error_mark_node; + } else { const char *errmsg = redeclaration_error_message (newdecl, olddecl); @@ -2009,7 +2029,8 @@ redeclaration_error_message (tree newdecl, tree olddecl) /* If both functions come from different namespaces, this is not a redeclaration - this is a conflict with a used function. */ if (DECL_NAMESPACE_SCOPE_P (olddecl) - && DECL_CONTEXT (olddecl) != DECL_CONTEXT (newdecl)) + && DECL_CONTEXT (olddecl) != DECL_CONTEXT (newdecl) + && ! decls_match (olddecl, newdecl)) return "`%D' conflicts with used function"; /* We'll complain about linkage mismatches in @@ -3690,12 +3711,12 @@ start_decl (tree declarator, deprecated_state = DEPRECATED_NORMAL; if (decl == NULL_TREE || TREE_CODE (decl) == VOID_TYPE) - return NULL_TREE; + return error_mark_node; type = TREE_TYPE (decl); if (type == error_mark_node) - return NULL_TREE; + return error_mark_node; context = DECL_CONTEXT (decl); @@ -4183,6 +4204,62 @@ next_initializable_field (tree field) return field; } +/* Subroutine of reshape_init. Reshape the constructor for an array. INITP + is the pointer to the old constructor list (to the CONSTRUCTOR_ELTS of + the CONSTRUCTOR we are processing), while NEW_INIT is the CONSTRUCTOR we + are building. + ELT_TYPE is the element type of the array. MAX_INDEX is an INTEGER_CST + representing the size of the array minus one (the maximum index), or + NULL_TREE if the array was declared without specifying the size. */ + +static bool +reshape_init_array (tree elt_type, tree max_index, + tree *initp, tree new_init) +{ + bool sized_array_p = (max_index != NULL_TREE); + unsigned HOST_WIDE_INT max_index_cst = 0; + unsigned HOST_WIDE_INT index; + + if (sized_array_p) + { + if (host_integerp (max_index, 1)) + max_index_cst = tree_low_cst (max_index, 1); + /* sizetype is sign extended, not zero extended. */ + else + max_index_cst = tree_low_cst (convert (size_type_node, max_index), 1); + } + + /* Loop until there are no more initializers. */ + for (index = 0; + *initp && (!sized_array_p || index <= max_index_cst); + ++index) + { + tree element_init; + tree designated_index; + + element_init = reshape_init (elt_type, initp); + if (element_init == error_mark_node) + return false; + TREE_CHAIN (element_init) = CONSTRUCTOR_ELTS (new_init); + CONSTRUCTOR_ELTS (new_init) = element_init; + designated_index = TREE_PURPOSE (element_init); + if (designated_index) + { + /* Handle array designated initializers (GNU extension). */ + if (TREE_CODE (designated_index) == IDENTIFIER_NODE) + { + error ("name `%D' used in a GNU-style designated " + "initializer for an array", designated_index); + TREE_PURPOSE (element_init) = NULL_TREE; + } + else + abort (); + } + } + + return true; +} + /* Undo the brace-elision allowed by [dcl.init.aggr] in a brace-enclosed aggregate initializer. @@ -4206,6 +4283,7 @@ reshape_init (tree type, tree *initp) tree old_init_value; tree new_init; bool brace_enclosed_p; + bool string_init_p; old_init = *initp; old_init_value = (TREE_CODE (*initp) == TREE_LIST @@ -4270,6 +4348,7 @@ reshape_init (tree type, tree *initp) return old_init; } + string_init_p = false; if (TREE_CODE (old_init_value) == STRING_CST && TREE_CODE (type) == ARRAY_TYPE && char_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (type)))) @@ -4284,6 +4363,7 @@ reshape_init (tree type, tree *initp) /* Move past the initializer. */ *initp = TREE_CHAIN (old_init); TREE_CHAIN (old_init) = NULL_TREE; + string_init_p = true; } else { @@ -4351,38 +4431,15 @@ reshape_init (tree type, tree *initp) } else if ((TREE_CODE (type) == ARRAY_TYPE)|| (TREE_CODE (type) == VECTOR_TYPE)) { - tree index; tree max_index; /* If the bound of the array is known, take no more initializers than are allowed. */ max_index = ((TYPE_DOMAIN (type) && (TREE_CODE (type) == ARRAY_TYPE)) ? array_type_nelts (type) : NULL_TREE); - /* Loop through the array elements, gathering initializers. */ - for (index = size_zero_node; - *initp && (!max_index || !tree_int_cst_lt (max_index, index)); - index = size_binop (PLUS_EXPR, index, size_one_node)) - { - tree element_init; - - element_init = reshape_init (TREE_TYPE (type), initp); - if (element_init == error_mark_node) - return error_mark_node; - TREE_CHAIN (element_init) = CONSTRUCTOR_ELTS (new_init); - CONSTRUCTOR_ELTS (new_init) = element_init; - if (TREE_PURPOSE (element_init)) - { - tree next_index = TREE_PURPOSE (element_init); - if (TREE_CODE (next_index) == IDENTIFIER_NODE) - { - error ("name `%D' used in a GNU-style designated " - "initializer for an array", next_index); - TREE_PURPOSE (element_init) = NULL_TREE; - } - else - index = next_index; - } - } + if (!reshape_init_array (TREE_TYPE (type), max_index, + initp, new_init)) + return error_mark_node; } else abort (); @@ -4395,10 +4452,15 @@ reshape_init (tree type, tree *initp) new_init = build_tree_list (TREE_PURPOSE (old_init), new_init); } - /* If this was a brace-enclosed initializer and all of the - initializers were not used up, there is a problem. */ - if (brace_enclosed_p && *initp) - error ("too many initializers for `%T'", type); + /* If there are more initializers than necessary, issue a + diagnostic. */ + if (*initp) + { + if (brace_enclosed_p) + error ("too many initializers for `%T'", type); + else if (warn_missing_braces && !string_init_p) + warning ("missing braces around initializer"); + } return new_init; } @@ -4723,6 +4785,7 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags) tree cleanup; const char *asmspec = NULL; int was_readonly = 0; + bool var_definition_p = false; if (decl == error_mark_node) return; @@ -4875,6 +4938,11 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags) /* Remember that the initialization for this variable has taken place. */ DECL_INITIALIZED_P (decl) = 1; + /* This declaration is the definition of this variable, + unless we are initializing a static data member within + the class specifier. */ + if (!DECL_EXTERNAL (decl)) + var_definition_p = true; } /* If the variable has an array type, lay out the type, even if there is no initializer. It is valid to index through the @@ -4949,8 +5017,16 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags) initialize_local_var (decl, init); } - if (TREE_STATIC (decl)) - expand_static_init (decl, init); + /* If a variable is defined, and then a subsequent + definintion with external linkage is encountered, we will + get here twice for the same variable. We want to avoid + calling expand_static_init more than once. For variables + that are not static data members, we can call + expand_static_init only when we actually process the + initializer. It is not legal to redeclare a static data + member, so this issue does not arise in that case. */ + if (var_definition_p && TREE_STATIC (decl)) + expand_static_init (decl, init); } finish_end0: @@ -6317,6 +6393,32 @@ check_special_function_return_type (special_function_kind sfk, return type; } +/* A variable or data member (whose unqualified name is IDENTIFIER) + has been declared with the indicated TYPE. If the TYPE is not + acceptable, issue an error message and return a type to use for + error-recovery purposes. */ + +tree +check_var_type (tree identifier, tree type) +{ + if (VOID_TYPE_P (type)) + { + if (!identifier) + error ("unnamed variable or field declared void"); + else if (TREE_CODE (identifier) == IDENTIFIER_NODE) + { + if (IDENTIFIER_OPNAME_P (identifier)) + abort (); + error ("variable or field `%E' declared void", identifier); + } + else + error ("variable or field declared void"); + type = integer_type_node; + } + + return type; +} + /* Given declspecs and a declarator (abstract or otherwise), determine the name and type of the object declared and construct a DECL node for it. @@ -8016,30 +8118,25 @@ grokdeclarator (tree declarator, && ! bitfield) { error ("abstract declarator `%T' used as declaration", type); - declarator = make_anon_name (); + return error_mark_node; } - /* `void' at top level (not within pointer) - is allowed only in typedefs or type names. - We don't complain about parms either, but that is because - a better error message can be made later. */ - - if (TREE_CODE (type) == VOID_TYPE && decl_context != PARM) + /* Only functions may be declared using an operator-function-id. */ + if (declarator + && TREE_CODE (declarator) == IDENTIFIER_NODE + && IDENTIFIER_OPNAME_P (declarator) + && TREE_CODE (type) != FUNCTION_TYPE + && TREE_CODE (type) != METHOD_TYPE) { - if (! declarator) - error ("unnamed variable or field declared void"); - else if (TREE_CODE (declarator) == IDENTIFIER_NODE) - { - if (IDENTIFIER_OPNAME_P (declarator)) - abort (); - else - error ("variable or field `%s' declared void", name); - } - else - error ("variable or field declared void"); - type = integer_type_node; + error ("declaration of `%D' as non-function", declarator); + return error_mark_node; } + /* We don't check parameter types here because we can emit a better + error message later. */ + if (decl_context != PARM) + type = check_var_type (declarator, type); + /* Now create the decl, which may be a VAR_DECL, a PARM_DECL or a FUNCTION_DECL, depending on DECL_CONTEXT and TYPE. */ @@ -9848,7 +9945,14 @@ finish_enum (tree enumtype) underlying type in the range bmin to bmax, where bmin and bmax are, respectively, the smallest and largest values of the smallest bit- field that can store emin and emax. */ - TYPE_PRECISION (enumtype) = precision; + + /* The middle-end currently assumes that types with TYPE_PRECISION + narrower than their underlying type are suitably zero or sign + extended to fill their mode. g++ doesn't make these guarantees. + Until the middle-end can represent such paradoxical types, we + set the TYPE_PRECISON to the width of the underlying type. */ + TYPE_PRECISION (enumtype) = TYPE_PRECISION (underlying_type); + set_min_and_max_values_for_integral_type (enumtype, precision, unsignedp); /* [dcl.enum] diff --git a/contrib/gcc/cp/decl2.c b/contrib/gcc/cp/decl2.c index 4e8c2f8..09fe5dd 100644 --- a/contrib/gcc/cp/decl2.c +++ b/contrib/gcc/cp/decl2.c @@ -1203,9 +1203,15 @@ build_anon_union_vars (tree object) void finish_anon_union (tree anon_union_decl) { - tree type = TREE_TYPE (anon_union_decl); + tree type; tree main_decl; - bool public_p = TREE_PUBLIC (anon_union_decl); + bool public_p; + + if (anon_union_decl == error_mark_node) + return; + + type = TREE_TYPE (anon_union_decl); + public_p = TREE_PUBLIC (anon_union_decl); /* The VAR_DECL's context is the same as the TYPE's context. */ DECL_CONTEXT (anon_union_decl) = DECL_CONTEXT (TYPE_NAME (type)); diff --git a/contrib/gcc/cp/error.c b/contrib/gcc/cp/error.c index 9c9561f..5b83c60 100644 --- a/contrib/gcc/cp/error.c +++ b/contrib/gcc/cp/error.c @@ -815,9 +815,7 @@ dump_decl (tree t, int flags) break; case SCOPE_REF: - dump_decl (TREE_OPERAND (t, 0), flags & ~TFF_DECL_SPECIFIERS); - pp_colon_colon (cxx_pp); - dump_decl (TREE_OPERAND (t, 1), flags); + pp_expression (cxx_pp, t); break; case ARRAY_REF: @@ -1489,6 +1487,7 @@ dump_expr (tree t, int flags) case CEIL_DIV_EXPR: case FLOOR_DIV_EXPR: case ROUND_DIV_EXPR: + case RDIV_EXPR: dump_binary_op ("/", t, flags); break; @@ -1736,9 +1735,7 @@ dump_expr (tree t, int flags) break; case SCOPE_REF: - dump_type (TREE_OPERAND (t, 0), flags); - pp_colon_colon (cxx_pp); - dump_expr (TREE_OPERAND (t, 1), flags | TFF_EXPR_IN_PARENS); + pp_expression (cxx_pp, t); break; case CAST_EXPR: @@ -2410,6 +2407,9 @@ cp_error_at (const char *msgid, ...) va_start (ap, msgid); diagnostic_set_info (&diagnostic, msgid, &ap, + input_location, DK_ERROR); + cp_diagnostic_starter (global_dc, &diagnostic); + diagnostic_set_info (&diagnostic, msgid, &ap, location_of (here), DK_ERROR); report_diagnostic (&diagnostic); va_end (ap); diff --git a/contrib/gcc/cp/except.c b/contrib/gcc/cp/except.c index c8112d1..e61e652 100644 --- a/contrib/gcc/cp/except.c +++ b/contrib/gcc/cp/except.c @@ -594,9 +594,9 @@ build_throw (tree exp) fn = push_throw_library_fn (fn, tmp); } else if (really_overloaded_fn (fn)) - {
+ { error ("`%D' should never be overloaded", fn); - return error_mark_node;
+ return error_mark_node; } fn = OVL_CURRENT (fn); exp = build_function_call (fn, tree_cons (NULL_TREE, exp, NULL_TREE)); @@ -610,18 +610,18 @@ build_throw (tree exp) tree temp_expr, allocate_expr; bool elided; + /* The CLEANUP_TYPE is the internal type of a destructor. */ + if (!cleanup_type) + { + tmp = void_list_node; + tmp = tree_cons (NULL_TREE, ptr_type_node, tmp); + tmp = build_function_type (void_type_node, tmp); + cleanup_type = build_pointer_type (tmp); + } + fn = get_identifier ("__cxa_throw"); if (!get_global_value_if_present (fn, &fn)) { - /* The CLEANUP_TYPE is the internal type of a destructor. */ - if (cleanup_type == NULL_TREE) - { - tmp = void_list_node; - tmp = tree_cons (NULL_TREE, ptr_type_node, tmp); - tmp = build_function_type (void_type_node, tmp); - cleanup_type = build_pointer_type (tmp); - } - /* Declare void __cxa_throw (void*, void*, void (*)(void*)). */ /* ??? Second argument is supposed to be "std::type_info*". */ tmp = void_list_node; @@ -631,7 +631,7 @@ build_throw (tree exp) tmp = build_function_type (void_type_node, tmp); fn = push_throw_library_fn (fn, tmp); } - + /* throw expression */ /* First, decay it. */ exp = decay_conversion (exp); diff --git a/contrib/gcc/cp/g++spec.c b/contrib/gcc/cp/g++spec.c index e6c9ee6..22dffb1 100644 --- a/contrib/gcc/cp/g++spec.c +++ b/contrib/gcc/cp/g++spec.c @@ -167,6 +167,9 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, } saw_speclang = 1; } + /* Unrecognized libraries (e.g. -lfoo) may require libstdc++. */ + else if (strncmp (argv[i], "-l", 2) == 0) + library = (library == 0) ? 1 : library; else if (((argv[i][2] == '\0' && strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL) || strcmp (argv[i], "-Xlinker") == 0 diff --git a/contrib/gcc/cp/init.c b/contrib/gcc/cp/init.c index c81736c..732d4a0 100644 --- a/contrib/gcc/cp/init.c +++ b/contrib/gcc/cp/init.c @@ -217,7 +217,6 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) } else if (TREE_CODE (type) == ARRAY_TYPE) { - tree index; tree max_index; tree inits; @@ -231,14 +230,16 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) /* A zero-sized array, which is accepted as an extension, will have an upper bound of -1. */ if (!tree_int_cst_equal (max_index, integer_minus_one_node)) - for (index = size_zero_node; - !tree_int_cst_lt (max_index, index); - index = size_binop (PLUS_EXPR, index, size_one_node)) - inits = tree_cons (index, - build_zero_init (TREE_TYPE (type), - /*nelts=*/NULL_TREE, - static_storage_p), - inits); + { + tree elt_init = build_zero_init (TREE_TYPE (type), + /*nelts=*/NULL_TREE, + static_storage_p); + tree range = build (RANGE_EXPR, + sizetype, size_zero_node, max_index); + + inits = tree_cons (range, elt_init, inits); + } + CONSTRUCTOR_ELTS (init) = nreverse (inits); } else if (TREE_CODE (type) == REFERENCE_TYPE) @@ -1378,7 +1379,7 @@ build_offset_ref (tree type, tree name, bool address_p) if (TREE_CODE (name) == TEMPLATE_DECL) return name; - if (processing_template_decl || uses_template_parms (type)) + if (dependent_type_p (type) || type_dependent_expression_p (name)) return build_min_nt (SCOPE_REF, type, name); if (TREE_CODE (name) == TEMPLATE_ID_EXPR) @@ -1442,6 +1443,7 @@ build_offset_ref (tree type, tree name, bool address_p) return error_mark_node; } + /* Set up BASEBINFO for member lookup. */ decl = maybe_dummy_object (type, &basebinfo); if (BASELINK_P (name) || DECL_P (name)) @@ -1621,21 +1623,23 @@ decl_constant_value (tree decl) TREE_OPERAND (decl, 0), d1, d2); } - if (DECL_P (decl) - && (/* Enumeration constants are constant. */ - TREE_CODE (decl) == CONST_DECL - /* And so are variables with a 'const' type -- unless they - are also 'volatile'. */ - || CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (decl))) - && DECL_INITIAL (decl) - && DECL_INITIAL (decl) != error_mark_node - /* This is invalid if initial value is not constant. - If it has either a function call, a memory reference, - or a variable, then re-evaluating it could give different results. */ - && TREE_CONSTANT (DECL_INITIAL (decl)) - /* Check for cases where this is sub-optimal, even though valid. */ - && TREE_CODE (DECL_INITIAL (decl)) != CONSTRUCTOR) - return DECL_INITIAL (decl); + while (DECL_P (decl) + && (/* Enumeration constants are constant. */ + TREE_CODE (decl) == CONST_DECL + /* And so are variables with a 'const' type -- unless they + are also 'volatile'. */ + || CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (decl))) + && DECL_INITIAL (decl) + && DECL_INITIAL (decl) != error_mark_node + /* This is invalid if initial value is not constant. If it + has either a function call, a memory reference, or a + variable, then re-evaluating it could give different + results. */ + && TREE_CONSTANT (DECL_INITIAL (decl)) + /* Check for cases where this is sub-optimal, even though + valid. */ + && TREE_CODE (DECL_INITIAL (decl)) != CONSTRUCTOR) + decl = DECL_INITIAL (decl); return decl; } @@ -2540,6 +2544,9 @@ build_vec_init (tree base, tree maxindex, tree init, int from_array) tree atype = TREE_TYPE (base); /* The type of an element in the array. */ tree type = TREE_TYPE (atype); + /* The element type reached after removing all outer array + types. */ + tree inner_elt_type; /* The type of a pointer to an element in the array. */ tree ptype; tree stmt_expr; @@ -2556,15 +2563,17 @@ build_vec_init (tree base, tree maxindex, tree init, int from_array) if (maxindex == NULL_TREE || maxindex == error_mark_node) return error_mark_node; + inner_elt_type = strip_array_types (atype); if (init && (from_array == 2 - ? (!CLASS_TYPE_P (type) || !TYPE_HAS_COMPLEX_ASSIGN_REF (type)) + ? (!CLASS_TYPE_P (inner_elt_type) + || !TYPE_HAS_COMPLEX_ASSIGN_REF (inner_elt_type)) : !TYPE_NEEDS_CONSTRUCTING (type)) && ((TREE_CODE (init) == CONSTRUCTOR /* Don't do this if the CONSTRUCTOR might contain something that might throw and require us to clean up. */ && (CONSTRUCTOR_ELTS (init) == NULL_TREE - || ! TYPE_HAS_NONTRIVIAL_DESTRUCTOR (target_type (type)))) + || ! TYPE_HAS_NONTRIVIAL_DESTRUCTOR (inner_elt_type))) || from_array)) { /* Do non-default initialization of POD arrays resulting from diff --git a/contrib/gcc/cp/mangle.c b/contrib/gcc/cp/mangle.c index 760d8b3..a92f2b4 100644 --- a/contrib/gcc/cp/mangle.c +++ b/contrib/gcc/cp/mangle.c @@ -59,6 +59,7 @@ #include "toplev.h" #include "varray.h" #include "flags.h" +#include "target.h" /* Debugging support. */ @@ -1497,12 +1498,24 @@ write_type (tree type) case BOOLEAN_TYPE: case INTEGER_TYPE: /* Includes wchar_t. */ case REAL_TYPE: + { + /* Handle any target-specific fundamental types. */ + const char *target_mangling + = targetm.mangle_fundamental_type (type); + + if (target_mangling) + { + write_string (target_mangling); + return; + } + /* If this is a typedef, TYPE may not be one of the standard builtin type nodes, but an alias of one. Use TYPE_MAIN_VARIANT to get to the underlying builtin type. */ write_builtin_type (TYPE_MAIN_VARIANT (type)); ++is_builtin_type; break; + } case COMPLEX_TYPE: write_char ('C'); diff --git a/contrib/gcc/cp/method.c b/contrib/gcc/cp/method.c index 0f72dc7..ef69c37 100644 --- a/contrib/gcc/cp/method.c +++ b/contrib/gcc/cp/method.c @@ -357,6 +357,10 @@ use_thunk (tree thunk_fndecl, bool emit_p) There's no need to process this thunk again. */ return; + if (DECL_THUNK_P (function)) + /* The target is itself a thunk, process it now. */ + use_thunk (function, emit_p); + /* Thunks are always addressable; they only appear in vtables. */ TREE_ADDRESSABLE (thunk_fndecl) = 1; @@ -583,14 +587,14 @@ do_build_copy_constructor (tree fndecl) for (; fields; fields = TREE_CHAIN (fields)) { - tree init; + tree init = parm; tree field = fields; tree expr_type; if (TREE_CODE (field) != FIELD_DECL) continue; - init = parm; + expr_type = TREE_TYPE (field); if (DECL_NAME (field)) { if (VFIELD_NAME_P (DECL_NAME (field))) @@ -600,9 +604,7 @@ do_build_copy_constructor (tree fndecl) if (IDENTIFIER_CLASS_VALUE (DECL_NAME (field)) != field) continue; } - else if ((t = TREE_TYPE (field)) != NULL_TREE - && ANON_AGGR_TYPE_P (t) - && TYPE_FIELDS (t) != NULL_TREE) + else if (ANON_AGGR_TYPE_P (expr_type) && TYPE_FIELDS (expr_type)) /* Just use the field; anonymous types can't have nontrivial copy ctors or assignment ops. */; else @@ -613,14 +615,19 @@ do_build_copy_constructor (tree fndecl) the field is "T", then the type will usually be "const T". (There are no cv-qualified variants of reference types.) */ - expr_type = TREE_TYPE (field); if (TREE_CODE (expr_type) != REFERENCE_TYPE) - expr_type = cp_build_qualified_type (expr_type, cvquals); + { + int quals = cvquals; + + if (DECL_MUTABLE_P (field)) + quals &= ~TYPE_QUAL_CONST; + expr_type = cp_build_qualified_type (expr_type, quals); + } + init = build (COMPONENT_REF, expr_type, init, field); init = build_tree_list (NULL_TREE, init); - member_init_list - = tree_cons (field, init, member_init_list); + member_init_list = tree_cons (field, init, member_init_list); } finish_mem_initializers (member_init_list); } @@ -675,26 +682,27 @@ do_build_assign_ref (tree fndecl) fields; fields = TREE_CHAIN (fields)) { - tree comp, init, t; + tree comp = current_class_ref; + tree init = parm; tree field = fields; + tree expr_type; + int quals; if (TREE_CODE (field) != FIELD_DECL || DECL_ARTIFICIAL (field)) continue; - if (CP_TYPE_CONST_P (TREE_TYPE (field))) + expr_type = TREE_TYPE (field); + if (CP_TYPE_CONST_P (expr_type)) { error ("non-static const member `%#D', can't use default assignment operator", field); continue; } - else if (TREE_CODE (TREE_TYPE (field)) == REFERENCE_TYPE) + else if (TREE_CODE (expr_type) == REFERENCE_TYPE) { error ("non-static reference member `%#D', can't use default assignment operator", field); continue; } - comp = current_class_ref; - init = parm; - if (DECL_NAME (field)) { if (VFIELD_NAME_P (DECL_NAME (field))) @@ -704,24 +712,27 @@ do_build_assign_ref (tree fndecl) if (IDENTIFIER_CLASS_VALUE (DECL_NAME (field)) != field) continue; } - else if ((t = TREE_TYPE (field)) != NULL_TREE - && ANON_AGGR_TYPE_P (t) - && TYPE_FIELDS (t) != NULL_TREE) + else if (ANON_AGGR_TYPE_P (expr_type) && TYPE_FIELDS (expr_type)) /* Just use the field; anonymous types can't have nontrivial copy ctors or assignment ops. */; else continue; comp = build (COMPONENT_REF, TREE_TYPE (field), comp, field); - init = build (COMPONENT_REF, - cp_build_qualified_type (TREE_TYPE (field), cvquals), - init, field); + + /* Compute the type of init->field */ + quals = cvquals; + if (DECL_MUTABLE_P (field)) + quals &= ~TYPE_QUAL_CONST; + expr_type = cp_build_qualified_type (expr_type, quals); + + init = build (COMPONENT_REF, expr_type, init, field); if (DECL_NAME (field)) - finish_expr_stmt (build_modify_expr (comp, NOP_EXPR, init)); + init = build_modify_expr (comp, NOP_EXPR, init); else - finish_expr_stmt (build (MODIFY_EXPR, TREE_TYPE (comp), comp, - init)); + init = build (MODIFY_EXPR, TREE_TYPE (comp), comp, init); + finish_expr_stmt (init); } } finish_return_stmt (current_class_ref); diff --git a/contrib/gcc/cp/name-lookup.c b/contrib/gcc/cp/name-lookup.c index a4e996f..3e79d3e 100644 --- a/contrib/gcc/cp/name-lookup.c +++ b/contrib/gcc/cp/name-lookup.c @@ -1,5 +1,5 @@ /* Definitions for C++ name lookup routines. - Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net> This file is part of GCC. @@ -2018,7 +2018,8 @@ push_overloaded_decl (tree decl, int flags) if (TREE_CODE (tmp) == OVERLOAD && OVL_USED (tmp) && !(flags & PUSH_USING) && compparms (TYPE_ARG_TYPES (TREE_TYPE (fn)), - TYPE_ARG_TYPES (TREE_TYPE (decl)))) + TYPE_ARG_TYPES (TREE_TYPE (decl))) + && ! decls_match (fn, decl)) error ("`%#D' conflicts with previous using declaration `%#D'", decl, fn); @@ -2804,6 +2805,7 @@ push_class_level_binding (tree name, tree x) || TREE_CODE (x) == CONST_DECL || (TREE_CODE (x) == TYPE_DECL && !DECL_SELF_REFERENCE_P (x)) + || DECL_CLASS_TEMPLATE_P (x) /* A data member of an anonymous union. */ || (TREE_CODE (x) == FIELD_DECL && DECL_CONTEXT (x) != current_class_type)) @@ -2968,27 +2970,6 @@ set_namespace_binding (tree name, tree scope, tree val) timevar_pop (TV_NAME_LOOKUP); } -/* Compute the namespace where a declaration is defined. */ - -static tree -decl_namespace (tree decl) -{ - timevar_push (TV_NAME_LOOKUP); - if (TYPE_P (decl)) - decl = TYPE_STUB_DECL (decl); - while (DECL_CONTEXT (decl)) - { - decl = DECL_CONTEXT (decl); - if (TREE_CODE (decl) == NAMESPACE_DECL) - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl); - if (TYPE_P (decl)) - decl = TYPE_STUB_DECL (decl); - my_friendly_assert (DECL_P (decl), 390); - } - - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, global_namespace); -} - /* Set the context of a declaration to scope. Complain if we are not outside scope. */ @@ -3057,9 +3038,9 @@ current_decl_namespace (void) return TREE_PURPOSE (decl_namespace_list); if (current_class_type) - result = decl_namespace (TYPE_STUB_DECL (current_class_type)); + result = decl_namespace_context (current_class_type); else if (current_function_decl) - result = decl_namespace (current_function_decl); + result = decl_namespace_context (current_function_decl); else result = current_namespace; return result; @@ -3187,7 +3168,7 @@ void push_decl_namespace (tree decl) { if (TREE_CODE (decl) != NAMESPACE_DECL) - decl = decl_namespace (decl); + decl = decl_namespace_context (decl); decl_namespace_list = tree_cons (ORIGINAL_NAMESPACE (decl), NULL_TREE, decl_namespace_list); } @@ -3231,6 +3212,9 @@ do_namespace_alias (tree alias, tree namespace) alias = build_lang_decl (NAMESPACE_DECL, alias, void_type_node); DECL_NAMESPACE_ALIAS (alias) = namespace; DECL_EXTERNAL (alias) = 1; + DECL_CONTEXT (alias) = current_scope (); + if (!DECL_CONTEXT (alias)) + DECL_CONTEXT (alias) = FROB_CONTEXT (current_namespace); pushdecl (alias); } @@ -3405,7 +3389,7 @@ parse_using_directive (tree namespace, tree attribs) { if (!toplevel_bindings_p ()) error ("strong using only meaningful at namespace scope"); - else + else if (namespace != error_mark_node) DECL_NAMESPACE_ASSOCIATIONS (namespace) = tree_cons (current_namespace, 0, DECL_NAMESPACE_ASSOCIATIONS (namespace)); @@ -4275,7 +4259,7 @@ arg_assoc_class (struct arg_lookup *k, tree type) return false; k->classes = tree_cons (type, NULL_TREE, k->classes); - context = decl_namespace (TYPE_MAIN_DECL (type)); + context = decl_namespace_context (type); if (arg_assoc_namespace (k, context)) return true; @@ -4357,7 +4341,7 @@ arg_assoc_type (struct arg_lookup *k, tree type) return arg_assoc_type (k, TREE_TYPE (type)); case UNION_TYPE: case ENUMERAL_TYPE: - return arg_assoc_namespace (k, decl_namespace (TYPE_MAIN_DECL (type))); + return arg_assoc_namespace (k, decl_namespace_context (type)); case METHOD_TYPE: /* The basetype is referenced in the first arg type, so just fall through. */ @@ -4559,12 +4543,9 @@ maybe_process_template_type_declaration (tree type, int globalize, ; else { - maybe_check_template_type (type); - my_friendly_assert (IS_AGGR_TYPE (type) || TREE_CODE (type) == ENUMERAL_TYPE, 0); - if (processing_template_decl) { /* This may change after the call to diff --git a/contrib/gcc/cp/parser.c b/contrib/gcc/cp/parser.c index 344a8f5..fb0d1e3 100644 --- a/contrib/gcc/cp/parser.c +++ b/contrib/gcc/cp/parser.c @@ -1,5 +1,6 @@ /* C++ Parser. - Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, + 2005 Free Software Foundation, Inc. Written by Mark Mitchell <mark@codesourcery.com>. This file is part of GCC. @@ -1483,9 +1484,9 @@ static void cp_parser_linkage_specification static tree cp_parser_init_declarator (cp_parser *, tree, tree, bool, bool, int, bool *); static tree cp_parser_declarator - (cp_parser *, cp_parser_declarator_kind, int *, bool *); + (cp_parser *, cp_parser_declarator_kind, int *, bool *, bool); static tree cp_parser_direct_declarator - (cp_parser *, cp_parser_declarator_kind, int *); + (cp_parser *, cp_parser_declarator_kind, int *, bool); static enum tree_code cp_parser_ptr_operator (cp_parser *, tree *, tree *); static tree cp_parser_cv_qualifier_seq_opt @@ -2701,7 +2702,7 @@ cp_parser_id_expression (cp_parser *parser, /*typename_keyword_p=*/false, check_dependency_p, /*type_p=*/false, - /*is_declarator=*/false) + declarator_p) != NULL_TREE); /* If there is a nested-name-specifier, then we are looking at the first qualified-id production. */ @@ -2850,6 +2851,7 @@ cp_parser_unqualified_id (cp_parser* parser, tree qualifying_scope; tree object_scope; tree scope; + bool done; /* Consume the `~' token. */ cp_lexer_consume_token (parser->lexer); @@ -2906,6 +2908,8 @@ cp_parser_unqualified_id (cp_parser* parser, /* If there was an explicit qualification (S::~T), first look in the scope given by the qualification (i.e., S). */ + done = false; + type_decl = NULL_TREE; if (scope) { cp_parser_parse_tentatively (parser); @@ -2917,10 +2921,10 @@ cp_parser_unqualified_id (cp_parser* parser, /*class_head_p=*/false, declarator_p); if (cp_parser_parse_definitely (parser)) - return build_nt (BIT_NOT_EXPR, TREE_TYPE (type_decl)); + done = true; } /* In "N::S::~S", look in "N" as well. */ - if (scope && qualifying_scope) + if (!done && scope && qualifying_scope) { cp_parser_parse_tentatively (parser); parser->scope = qualifying_scope; @@ -2935,10 +2939,10 @@ cp_parser_unqualified_id (cp_parser* parser, /*class_head_p=*/false, declarator_p); if (cp_parser_parse_definitely (parser)) - return build_nt (BIT_NOT_EXPR, TREE_TYPE (type_decl)); + done = true; } /* In "p->S::~T", look in the scope given by "*p" as well. */ - else if (object_scope) + else if (!done && object_scope) { cp_parser_parse_tentatively (parser); parser->scope = object_scope; @@ -2953,20 +2957,23 @@ cp_parser_unqualified_id (cp_parser* parser, /*class_head_p=*/false, declarator_p); if (cp_parser_parse_definitely (parser)) - return build_nt (BIT_NOT_EXPR, TREE_TYPE (type_decl)); + done = true; } /* Look in the surrounding context. */ - parser->scope = NULL_TREE; - parser->object_scope = NULL_TREE; - parser->qualifying_scope = NULL_TREE; - type_decl - = cp_parser_class_name (parser, - /*typename_keyword_p=*/false, - /*template_keyword_p=*/false, - /*type_p=*/false, - /*check_dependency=*/false, - /*class_head_p=*/false, - declarator_p); + if (!done) + { + parser->scope = NULL_TREE; + parser->object_scope = NULL_TREE; + parser->qualifying_scope = NULL_TREE; + type_decl + = cp_parser_class_name (parser, + /*typename_keyword_p=*/false, + /*template_keyword_p=*/false, + /*type_p=*/false, + /*check_dependency=*/false, + /*class_head_p=*/false, + declarator_p); + } /* If an error occurred, assume that the name of the destructor is the same as the name of the qualifying class. That allows us to keep parsing after running @@ -3141,6 +3148,16 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, might destroy it. */ old_scope = parser->scope; saved_qualifying_scope = parser->qualifying_scope; + /* In a declarator-id like "X<T>::I::Y<T>" we must be able to + look up names in "X<T>::I" in order to determine that "Y" is + a template. So, if we have a typename at this point, we make + an effort to look through it. */ + if (is_declaration + && !typename_keyword_p + && parser->scope + && TREE_CODE (parser->scope) == TYPENAME_TYPE) + parser->scope = resolve_typename_type (parser->scope, + /*only_current_p=*/false); /* Parse the qualifying entity. */ new_scope = cp_parser_class_or_namespace_name (parser, @@ -3534,18 +3551,22 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) bool template_p = false; tree id; tree type; + tree scope; /* Consume the `typename' token. */ cp_lexer_consume_token (parser->lexer); /* Look for the optional `::' operator. */ cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false); - /* Look for the nested-name-specifier. */ - cp_parser_nested_name_specifier (parser, - /*typename_keyword_p=*/true, - /*check_dependency_p=*/true, - /*type_p=*/true, - /*is_declaration=*/true); + /* Look for the nested-name-specifier. In case of error here, + consume the trailing id to avoid subsequent error messages + for usual cases. */ + scope = cp_parser_nested_name_specifier (parser, + /*typename_keyword_p=*/true, + /*check_dependency_p=*/true, + /*type_p=*/true, + /*is_declaration=*/true); + /* Look for the optional `template' keyword. */ template_p = cp_parser_optional_template_keyword (parser); /* We don't know whether we're looking at a template-id or an @@ -3558,9 +3579,13 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) /* If that didn't work, try an identifier. */ if (!cp_parser_parse_definitely (parser)) id = cp_parser_identifier (parser); + + /* Don't process id if nested name specifier is invalid. */ + if (scope == error_mark_node) + return error_mark_node; /* If we look up a template-id in a non-dependent qualifying scope, there's no need to create a dependent type. */ - if (TREE_CODE (id) == TYPE_DECL + else if (TREE_CODE (id) == TYPE_DECL && !dependent_type_p (parser->scope)) type = TREE_TYPE (id); /* Create a TYPENAME_TYPE to represent the type to which the @@ -3741,20 +3766,36 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) koenig_p = false; if (idk == CP_ID_KIND_UNQUALIFIED) { + if (TREE_CODE (postfix_expression) == IDENTIFIER_NODE) + { + if (args) + { + koenig_p = true; + postfix_expression + = perform_koenig_lookup (postfix_expression, args); + } + else + postfix_expression + = unqualified_fn_lookup_error (postfix_expression); + } /* We do not perform argument-dependent lookup if normal lookup finds a non-function, in accordance with the expected resolution of DR 218. */ - if (args - && (is_overloaded_fn (postfix_expression) - || TREE_CODE (postfix_expression) == IDENTIFIER_NODE)) + else if (args && is_overloaded_fn (postfix_expression)) { - koenig_p = true; - postfix_expression - = perform_koenig_lookup (postfix_expression, args); + tree fn = get_first_fn (postfix_expression); + if (TREE_CODE (fn) == TEMPLATE_ID_EXPR) + fn = OVL_CURRENT (TREE_OPERAND (fn, 0)); + /* Only do argument dependent lookup if regular + lookup does not find a set of member functions. + [basic.lookup.koenig]/2a */ + if (!DECL_FUNCTION_MEMBER_P (fn)) + { + koenig_p = true; + postfix_expression + = perform_koenig_lookup (postfix_expression, args); + } } - else if (TREE_CODE (postfix_expression) == IDENTIFIER_NODE) - postfix_expression - = unqualified_fn_lookup_error (postfix_expression); } if (TREE_CODE (postfix_expression) == COMPONENT_REF) @@ -3820,6 +3861,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) tree name; bool dependent_p; bool template_p; + bool pseudo_destructor_p; tree scope = NULL_TREE; enum cpp_ttype token_type = token->type; @@ -3870,11 +3912,34 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) /* Consume the `.' or `->' operator. */ cp_lexer_consume_token (parser->lexer); - /* If the SCOPE is not a scalar type, we are looking at an - ordinary class member access expression, rather than a - pseudo-destructor-name. */ - if (!scope || !SCALAR_TYPE_P (scope)) + + /* Assume this expression is not a pseudo-destructor access. */ + pseudo_destructor_p = false; + + /* If the SCOPE is a scalar type, then, if this is a valid program, + we must be looking at a pseudo-destructor-name. */ + if (scope && SCALAR_TYPE_P (scope)) { + tree s = NULL_TREE; + tree type; + + cp_parser_parse_tentatively (parser); + /* Parse the pseudo-destructor-name. */ + cp_parser_pseudo_destructor_name (parser, &s, &type); + if (cp_parser_parse_definitely (parser)) + { + pseudo_destructor_p = true; + postfix_expression + = finish_pseudo_destructor_expr (postfix_expression, + s, TREE_TYPE (type)); + } + } + + if (!pseudo_destructor_p) + { + /* If the SCOPE is not a scalar type, we are looking + at an ordinary class member access expression, + rather than a pseudo-destructor-name. */ template_p = cp_parser_optional_template_keyword (parser); /* Parse the id-expression. */ name = cp_parser_id_expression (parser, @@ -3914,19 +3979,6 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) postfix_expression = finish_class_member_access_expr (postfix_expression, name); } - /* Otherwise, try the pseudo-destructor-name production. */ - else - { - tree s = NULL_TREE; - tree type; - - /* Parse the pseudo-destructor-name. */ - cp_parser_pseudo_destructor_name (parser, &s, &type); - /* Form the call. */ - postfix_expression - = finish_pseudo_destructor_expr (postfix_expression, - s, TREE_TYPE (type)); - } /* We no longer need to look up names in the scope of the object on the left-hand side of the `.' or `->' @@ -5811,7 +5863,8 @@ cp_parser_condition (cp_parser* parser) /* Parse the declarator. */ declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_NAMED, /*ctor_dtor_or_conv_p=*/NULL, - /*parenthesized_p=*/NULL); + /*parenthesized_p=*/NULL, + /*member_p=*/false); /* Parse the attributes. */ attributes = cp_parser_attributes_opt (parser); /* Parse the asm-specification. */ @@ -7992,6 +8045,13 @@ cp_parser_template_id (cp_parser *parser, token->keyword = RID_MAX; /* Purge all subsequent tokens. */ cp_lexer_purge_tokens_after (parser->lexer, token); + + /* ??? Can we actually assume that, if template_id == + error_mark_node, we will have issued a diagnostic to the + user, as opposed to simply marking the tentative parse as + failed? */ + if (cp_parser_error_occurred (parser) && template_id != error_mark_node) + error ("parse error in template argument list"); } pop_deferring_access_checks (); @@ -8095,6 +8155,7 @@ cp_parser_template_name (cp_parser* parser, if (is_declaration && !template_keyword_p && parser->scope && TYPE_P (parser->scope) + && check_dependency_p && dependent_type_p (parser->scope) /* Do not do this for dtors (or ctors), since they never need the template keyword before their name. */ @@ -8170,6 +8231,8 @@ cp_parser_template_name (cp_parser* parser, ; else { + tree fn = NULL_TREE; + /* The standard does not explicitly indicate whether a name that names a set of overloaded declarations, some of which are templates, is a template-name. However, such a name should @@ -8177,14 +8240,11 @@ cp_parser_template_name (cp_parser* parser, template-id for the overloaded templates. */ fns = BASELINK_P (decl) ? BASELINK_FUNCTIONS (decl) : decl; if (TREE_CODE (fns) == OVERLOAD) - { - tree fn; - - for (fn = fns; fn; fn = OVL_NEXT (fn)) - if (TREE_CODE (OVL_CURRENT (fn)) == TEMPLATE_DECL) - break; - } - else + for (fn = fns; fn; fn = OVL_NEXT (fn)) + if (TREE_CODE (OVL_CURRENT (fn)) == TEMPLATE_DECL) + break; + + if (!fn) { /* Otherwise, the name does not name a template. */ cp_parser_error (parser, "expected template-name"); @@ -8548,7 +8608,8 @@ cp_parser_explicit_instantiation (cp_parser* parser) declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_NAMED, /*ctor_dtor_or_conv_p=*/NULL, - /*parenthesized_p=*/NULL); + /*parenthesized_p=*/NULL, + /*member_p=*/false); cp_parser_check_for_definition_in_return_type (declarator, declares_class_or_enum); if (declarator != error_mark_node) @@ -8684,21 +8745,40 @@ cp_parser_type_specifier (cp_parser* parser, keyword = token->keyword; switch (keyword) { + case RID_ENUM: + /* 'enum' [identifier] '{' introduces an enum-specifier; + 'enum' <anything else> introduces an elaborated-type-specifier. */ + if (cp_lexer_peek_nth_token (parser->lexer, 2)->type == CPP_OPEN_BRACE + || (cp_lexer_peek_nth_token (parser->lexer, 2)->type == CPP_NAME + && cp_lexer_peek_nth_token (parser->lexer, 3)->type + == CPP_OPEN_BRACE)) + { + if (parser->num_template_parameter_lists) + { + error ("template declaration of `enum'"); + cp_parser_skip_to_end_of_block_or_statement (parser); + type_spec = error_mark_node; + } + else + type_spec = cp_parser_enum_specifier (parser); + + if (declares_class_or_enum) + *declares_class_or_enum = 2; + return type_spec; + } + else + goto elaborated_type_specifier; + /* Any of these indicate either a class-specifier, or an elaborated-type-specifier. */ case RID_CLASS: case RID_STRUCT: case RID_UNION: - case RID_ENUM: /* Parse tentatively so that we can back up if we don't find a class-specifier or enum-specifier. */ cp_parser_parse_tentatively (parser); - /* Look for the class-specifier or enum-specifier. */ - if (keyword == RID_ENUM) - type_spec = cp_parser_enum_specifier (parser); - else - type_spec = cp_parser_class_specifier (parser); - + /* Look for the class-specifier. */ + type_spec = cp_parser_class_specifier (parser); /* If that worked, we're done. */ if (cp_parser_parse_definitely (parser)) { @@ -8710,6 +8790,7 @@ cp_parser_type_specifier (cp_parser* parser, /* Fall through. */ case RID_TYPENAME: + elaborated_type_specifier: /* Look for an elaborated-type-specifier. */ type_spec = cp_parser_elaborated_type_specifier (parser, is_friend, @@ -9765,26 +9846,19 @@ cp_parser_asm_definition (cp_parser* parser) /* If the next token is `::', there are no outputs, and the next token is the beginning of the inputs. */ else if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE)) - { - /* Consume the `::' token. */ - cp_lexer_consume_token (parser->lexer); - /* The inputs are coming next. */ - inputs_p = true; - } + /* The inputs are coming next. */ + inputs_p = true; /* Look for inputs. */ if (inputs_p || cp_lexer_next_token_is (parser->lexer, CPP_COLON)) { - if (!inputs_p) - /* Consume the `:'. */ - cp_lexer_consume_token (parser->lexer); + /* Consume the `:' or `::'. */ + cp_lexer_consume_token (parser->lexer); /* Parse the output-operands. */ if (cp_lexer_next_token_is_not (parser->lexer, CPP_COLON) && cp_lexer_next_token_is_not (parser->lexer, - CPP_SCOPE) - && cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)) inputs = cp_parser_asm_operand_list (parser); } @@ -9796,9 +9870,8 @@ cp_parser_asm_definition (cp_parser* parser) if (clobbers_p || cp_lexer_next_token_is (parser->lexer, CPP_COLON)) { - if (!clobbers_p) - /* Consume the `:'. */ - cp_lexer_consume_token (parser->lexer); + /* Consume the `:' or `::'. */ + cp_lexer_consume_token (parser->lexer); /* Parse the clobbers. */ if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)) @@ -9899,7 +9972,8 @@ cp_parser_init_declarator (cp_parser* parser, declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_NAMED, &ctor_dtor_or_conv_p, - /*parenthesized_p=*/NULL); + /*parenthesized_p=*/NULL, + /*member_p=*/false); /* Gather up the deferred checks. */ stop_deferring_access_checks (); @@ -10182,13 +10256,16 @@ cp_parser_init_declarator (cp_parser* parser, expression, not a declaration.) If PARENTHESIZED_P is non-NULL, *PARENTHESIZED_P is set to true iff - the declarator is a direct-declarator of the form "(...)". */ + the declarator is a direct-declarator of the form "(...)". + + MEMBER_P is true iff this declarator is a member-declarator. */ static tree cp_parser_declarator (cp_parser* parser, cp_parser_declarator_kind dcl_kind, int* ctor_dtor_or_conv_p, - bool* parenthesized_p) + bool* parenthesized_p, + bool member_p) { cp_token *token; tree declarator; @@ -10229,7 +10306,8 @@ cp_parser_declarator (cp_parser* parser, /* Parse the dependent declarator. */ declarator = cp_parser_declarator (parser, dcl_kind, /*ctor_dtor_or_conv_p=*/NULL, - /*parenthesized_p=*/NULL); + /*parenthesized_p=*/NULL, + /*member_p=*/false); /* If we are parsing an abstract-declarator, we must handle the case where the dependent declarator is absent. */ @@ -10255,7 +10333,8 @@ cp_parser_declarator (cp_parser* parser, *parenthesized_p = cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN); declarator = cp_parser_direct_declarator (parser, dcl_kind, - ctor_dtor_or_conv_p); + ctor_dtor_or_conv_p, + member_p); } if (attributes && declarator != error_mark_node) @@ -10303,7 +10382,8 @@ cp_parser_declarator (cp_parser* parser, static tree cp_parser_direct_declarator (cp_parser* parser, cp_parser_declarator_kind dcl_kind, - int* ctor_dtor_or_conv_p) + int* ctor_dtor_or_conv_p, + bool member_p) { cp_token *token; tree declarator = NULL_TREE; @@ -10362,7 +10442,14 @@ cp_parser_direct_declarator (cp_parser* parser, tree params; unsigned saved_num_template_parameter_lists; - cp_parser_parse_tentatively (parser); + /* In a member-declarator, the only valid interpretation + of a parenthesis is the start of a + parameter-declaration-clause. (It is invalid to + initialize a static data member with a parenthesized + initializer; only the "=" form of initialization is + permitted.) */ + if (!member_p) + cp_parser_parse_tentatively (parser); /* Consume the `('. */ cp_lexer_consume_token (parser->lexer); @@ -10388,7 +10475,7 @@ cp_parser_direct_declarator (cp_parser* parser, /* If all went well, parse the cv-qualifier-seq and the exception-specification. */ - if (cp_parser_parse_definitely (parser)) + if (member_p || cp_parser_parse_definitely (parser)) { tree cv_qualifiers; tree exception_specification; @@ -10436,7 +10523,8 @@ cp_parser_direct_declarator (cp_parser* parser, parser->in_type_id_in_expr_p = true; declarator = cp_parser_declarator (parser, dcl_kind, ctor_dtor_or_conv_p, - /*parenthesized_p=*/NULL); + /*parenthesized_p=*/NULL, + member_p); parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p; first = false; /* Expect a `)'. */ @@ -10854,7 +10942,8 @@ cp_parser_type_id (cp_parser* parser) /* Look for the declarator. */ abstract_declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_ABSTRACT, NULL, - /*parenthesized_p=*/NULL); + /*parenthesized_p=*/NULL, + /*member_p=*/false); /* Check to see if there really was a declarator. */ if (!cp_parser_parse_definitely (parser)) abstract_declarator = NULL_TREE; @@ -11212,7 +11301,8 @@ cp_parser_parameter_declaration (cp_parser *parser, declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_EITHER, /*ctor_dtor_or_conv_p=*/NULL, - parenthesized_p); + parenthesized_p, + /*member_p=*/false); parser->default_arg_ok_p = saved_default_arg_ok_p; /* After the declarator, allow more attributes. */ attributes = chainon (attributes, cp_parser_attributes_opt (parser)); @@ -11471,18 +11561,52 @@ cp_parser_initializer (cp_parser* parser, bool* is_parenthesized_init, static tree cp_parser_initializer_clause (cp_parser* parser, bool* non_constant_p) { - tree initializer; + tree initializer = NULL_TREE; + + /* Assume the expression is constant. */ + *non_constant_p = false; /* If it is not a `{', then we are looking at an assignment-expression. */ if (cp_lexer_next_token_is_not (parser->lexer, CPP_OPEN_BRACE)) { - initializer - = cp_parser_constant_expression (parser, - /*allow_non_constant_p=*/true, - non_constant_p); - if (!*non_constant_p) - initializer = fold_non_dependent_expr (initializer); + /* Speed up common initializers (simply a literal). */ + cp_token* token = cp_lexer_peek_token (parser->lexer); + cp_token* token2 = cp_lexer_peek_nth_token (parser->lexer, 2); + + if (token2->type == CPP_COMMA) + switch (token->type) + { + case CPP_CHAR: + case CPP_WCHAR: + case CPP_NUMBER: + token = cp_lexer_consume_token (parser->lexer); + initializer = token->value; + break; + + case CPP_STRING: + case CPP_WSTRING: + token = cp_lexer_consume_token (parser->lexer); + if (TREE_CHAIN (token->value)) + initializer = TREE_CHAIN (token->value); + else + initializer = token->value; + break; + + default: + break; + } + + /* Otherwise, fall back to the generic assignment expression. */ + if (!initializer) + { + initializer + = cp_parser_constant_expression (parser, + /*allow_non_constant_p=*/true, + non_constant_p); + if (!*non_constant_p) + initializer = fold_non_dependent_expr (initializer); + } } else { @@ -11742,6 +11866,7 @@ cp_parser_class_specifier (cp_parser* parser) bool nested_name_specifier_p; unsigned saved_num_template_parameter_lists; bool pop_p = false; + tree scope = NULL_TREE; push_deferring_access_checks (dk_no_deferred); @@ -11777,7 +11902,10 @@ cp_parser_class_specifier (cp_parser* parser) /* Start the class. */ if (nested_name_specifier_p) - pop_p = push_scope (CP_DECL_CONTEXT (TYPE_MAIN_DECL (type))); + { + scope = CP_DECL_CONTEXT (TYPE_MAIN_DECL (type)); + pop_p = push_scope (scope); + } type = begin_class_definition (type); if (type == error_mark_node) /* If the type is erroneous, skip the entire body of the class. */ @@ -11800,7 +11928,7 @@ cp_parser_class_specifier (cp_parser* parser) if (type != error_mark_node) type = finish_struct (type, attributes); if (pop_p) - pop_scope (CP_DECL_CONTEXT (TYPE_MAIN_DECL (type))); + pop_scope (scope); /* If this class is not itself within the scope of another class, then we need to parse the bodies of all of the queued function definitions. Note that the queued functions defined in a class @@ -12071,6 +12199,15 @@ cp_parser_class_head (cp_parser* parser, else if (nested_name_specifier) { tree scope; + + /* Reject typedef-names in class heads. */ + if (!DECL_IMPLICIT_TYPEDEF_P (type)) + { + error ("invalid class name in declaration of `%D'", type); + type = NULL_TREE; + goto done; + } + /* Figure out in what scope the declaration is being placed. */ scope = current_scope (); if (!scope) @@ -12528,7 +12665,8 @@ cp_parser_member_declaration (cp_parser* parser) declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_NAMED, &ctor_dtor_or_conv_p, - /*parenthesized_p=*/NULL); + /*parenthesized_p=*/NULL, + /*member_p=*/true); /* If something went wrong parsing the declarator, make sure that we at least consume some tokens. */ @@ -13144,7 +13282,8 @@ cp_parser_exception_declaration (cp_parser* parser) else declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_EITHER, /*ctor_dtor_or_conv_p=*/NULL, - /*parenthesized_p=*/NULL); + /*parenthesized_p=*/NULL, + /*member_p=*/false); /* Restore the saved message. */ parser->type_definition_forbidden_message = saved_message; @@ -13409,36 +13548,39 @@ cp_parser_attribute_list (cp_parser* parser) /* Look for the identifier. We also allow keywords here; for example `__attribute__ ((const))' is legal. */ token = cp_lexer_peek_token (parser->lexer); - if (token->type != CPP_NAME - && token->type != CPP_KEYWORD) - return error_mark_node; - /* Consume the token. */ - token = cp_lexer_consume_token (parser->lexer); - - /* Save away the identifier that indicates which attribute this is. */ - identifier = token->value; - attribute = build_tree_list (identifier, NULL_TREE); - - /* Peek at the next token. */ - token = cp_lexer_peek_token (parser->lexer); - /* If it's an `(', then parse the attribute arguments. */ - if (token->type == CPP_OPEN_PAREN) + if (token->type == CPP_NAME + || token->type == CPP_KEYWORD) { - tree arguments; + /* Consume the token. */ + token = cp_lexer_consume_token (parser->lexer); - arguments = (cp_parser_parenthesized_expression_list - (parser, true, /*non_constant_p=*/NULL)); - /* Save the identifier and arguments away. */ - TREE_VALUE (attribute) = arguments; - } + /* Save away the identifier that indicates which attribute + this is. */ + identifier = token->value; + attribute = build_tree_list (identifier, NULL_TREE); + + /* Peek at the next token. */ + token = cp_lexer_peek_token (parser->lexer); + /* If it's an `(', then parse the attribute arguments. */ + if (token->type == CPP_OPEN_PAREN) + { + tree arguments; + + arguments = (cp_parser_parenthesized_expression_list + (parser, true, /*non_constant_p=*/NULL)); + /* Save the identifier and arguments away. */ + TREE_VALUE (attribute) = arguments; + } - /* Add this attribute to the list. */ - TREE_CHAIN (attribute) = attribute_list; - attribute_list = attribute; + /* Add this attribute to the list. */ + TREE_CHAIN (attribute) = attribute_list; + attribute_list = attribute; - /* Now, look for more attributes. */ - token = cp_lexer_peek_token (parser->lexer); - /* If the next token isn't a `,', we're done. */ + /* Now, look for more attributes. */ + token = cp_lexer_peek_token (parser->lexer); + } + /* Now, look for more attributes. If the next token isn't a + `,', we're done. */ if (token->type != CPP_COMMA) break; @@ -14728,10 +14870,12 @@ cp_parser_late_parsing_default_args (cp_parser *parser, tree fn) saved_local_variables_forbidden_p = parser->local_variables_forbidden_p; parser->local_variables_forbidden_p = true; /* Parse the assignment-expression. */ - if (DECL_CLASS_SCOPE_P (fn)) + if (DECL_FRIEND_CONTEXT (fn)) + push_nested_class (DECL_FRIEND_CONTEXT (fn)); + else if (DECL_CLASS_SCOPE_P (fn)) push_nested_class (DECL_CONTEXT (fn)); TREE_PURPOSE (parameters) = cp_parser_assignment_expression (parser); - if (DECL_CLASS_SCOPE_P (fn)) + if (DECL_FRIEND_CONTEXT (fn) || DECL_CLASS_SCOPE_P (fn)) pop_nested_class (); /* If the token stream has not been completely used up, then @@ -14998,9 +15142,7 @@ cp_parser_next_token_starts_class_definition_p (cp_parser *parser) } /* Returns TRUE iff the next token is the "," or ">" ending a - template-argument. ">>" is also accepted (after the full - argument was parsed) because it's probably a typo for "> >", - and there is a specific diagnostic for this. */ + template-argument. */ static bool cp_parser_next_token_ends_template_argument_p (cp_parser *parser) @@ -15008,8 +15150,7 @@ cp_parser_next_token_ends_template_argument_p (cp_parser *parser) cp_token *token; token = cp_lexer_peek_token (parser->lexer); - return (token->type == CPP_COMMA || token->type == CPP_GREATER - || token->type == CPP_RSHIFT); + return (token->type == CPP_COMMA || token->type == CPP_GREATER); } /* Returns TRUE iff the n-th token is a ">", or the n-th is a "[" and the diff --git a/contrib/gcc/cp/pt.c b/contrib/gcc/cp/pt.c index c5c8e32..e5aadc1 100644 --- a/contrib/gcc/cp/pt.c +++ b/contrib/gcc/cp/pt.c @@ -1,6 +1,6 @@ /* Handle parameterized types (templates) for GNU C++. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com) while at Watchmaker Computing. Rewritten by Jason Merrill (jason@cygnus.com). @@ -180,7 +180,9 @@ push_access_scope (tree t) || TREE_CODE (t) == VAR_DECL, 0); - if (DECL_CLASS_SCOPE_P (t)) + if (DECL_FRIEND_CONTEXT (t)) + push_nested_class (DECL_FRIEND_CONTEXT (t)); + else if (DECL_CLASS_SCOPE_P (t)) push_nested_class (DECL_CONTEXT (t)); else push_to_top_level (); @@ -205,7 +207,7 @@ pop_access_scope (tree t) saved_access_scope = TREE_CHAIN (saved_access_scope); } - if (DECL_CLASS_SCOPE_P (t)) + if (DECL_FRIEND_CONTEXT (t) || DECL_CLASS_SCOPE_P (t)) pop_nested_class (); else pop_from_top_level (); @@ -706,6 +708,36 @@ end_explicit_instantiation (void) processing_explicit_instantiation = false; } +/* A explicit specialization or partial specialization TMPL is being + declared. Check that the namespace in which the specialization is + occurring is permissible. Returns false iff it is invalid to + specialize TMPL in the current namespace. */ + +static bool +check_specialization_namespace (tree tmpl) +{ + tree tpl_ns = decl_namespace_context (tmpl); + + /* [tmpl.expl.spec] + + An explicit specialization shall be declared in the namespace of + which the template is a member, or, for member templates, in the + namespace of which the enclosing class or enclosing class + template is a member. An explicit specialization of a member + function, member class or static data member of a class template + shall be declared in the namespace of which the class template is + a member. */ + if (is_associated_namespace (current_namespace, tpl_ns)) + /* Same or super-using namespace. */ + return true; + else + { + pedwarn ("specialization of `%D' in different namespace", tmpl); + cp_pedwarn_at (" from definition of `%#D'", tmpl); + return false; + } +} + /* The TYPE is being declared. If it is a template type, that means it is a partial specialization. Do appropriate error-checking. */ @@ -731,15 +763,7 @@ maybe_process_partial_specialization (tree type) if (CLASSTYPE_IMPLICIT_INSTANTIATION (type) && !COMPLETE_TYPE_P (type)) { - tree tpl_ns = decl_namespace_context (CLASSTYPE_TI_TEMPLATE (type)); - if (is_associated_namespace (current_namespace, tpl_ns)) - /* Same or super-using namespace. */; - else - { - pedwarn ("specializing `%#T' in different namespace", type); - cp_pedwarn_at (" from definition of `%#D'", - CLASSTYPE_TI_TEMPLATE (type)); - } + check_specialization_namespace (CLASSTYPE_TI_TEMPLATE (type)); SET_CLASSTYPE_TEMPLATE_SPECIALIZATION (type); if (processing_template_decl) push_template_decl (TYPE_MAIN_DECL (type)); @@ -1114,6 +1138,12 @@ register_specialization (tree spec, tree tmpl, tree args) } } + /* A specialization must be declared in the same namespace as the + template it is specializing. */ + if (DECL_TEMPLATE_SPECIALIZATION (spec) + && !check_specialization_namespace (tmpl)) + DECL_CONTEXT (spec) = decl_namespace_context (tmpl); + DECL_TEMPLATE_SPECIALIZATIONS (tmpl) = tree_cons (args, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl)); @@ -1927,6 +1957,10 @@ check_explicit_specialization (tree declarator, DECL_SOURCE_LOCATION (tmpl) = DECL_SOURCE_LOCATION (decl); DECL_SOURCE_LOCATION (DECL_TEMPLATE_RESULT (tmpl)) = DECL_SOURCE_LOCATION (decl); + /* We want to use the argument list specified in the + definition, not in the original declaration. */ + DECL_ARGUMENTS (DECL_TEMPLATE_RESULT (tmpl)) + = DECL_ARGUMENTS (decl); } return tmpl; } @@ -1963,49 +1997,6 @@ check_explicit_specialization (tree declarator, return decl; } -/* TYPE is being declared. Verify that the use of template headers - and such is reasonable. Issue error messages if not. */ - -void -maybe_check_template_type (tree type) -{ - if (template_header_count) - { - /* We are in the scope of some `template <...>' header. */ - - int context_depth - = template_class_depth_real (TYPE_CONTEXT (type), - /*count_specializations=*/1); - - if (template_header_count <= context_depth) - /* This is OK; the template headers are for the context. We - are actually too lenient here; like - check_explicit_specialization we should consider the number - of template types included in the actual declaration. For - example, - - template <class T> struct S { - template <class U> template <class V> - struct I {}; - }; - - is invalid, but: - - template <class T> struct S { - template <class U> struct I; - }; - - template <class T> template <class U. - struct S<T>::I {}; - - is not. */ - ; - else if (template_header_count > context_depth + 1) - /* There are two many template parameter lists. */ - error ("too many template parameter lists in declaration of `%T'", type); - } -} - /* Returns 1 iff PARMS1 and PARMS2 are identical sets of template parameters. These are represented in the same format used for DECL_TEMPLATE_PARMS. */ @@ -2815,19 +2806,35 @@ push_template_decl_real (tree decl, int is_friend) else if (TREE_CODE (decl) == TYPE_DECL && ANON_AGGRNAME_P (DECL_NAME (decl))) error ("template class without a name"); - else if (TREE_CODE (decl) == FUNCTION_DECL - && DECL_DESTRUCTOR_P (decl)) + else if (TREE_CODE (decl) == FUNCTION_DECL) { - /* [temp.mem] - - A destructor shall not be a member template. */ - error ("destructor `%D' declared as member template", decl); - return error_mark_node; + if (DECL_DESTRUCTOR_P (decl)) + { + /* [temp.mem] + + A destructor shall not be a member template. */ + error ("destructor `%D' declared as member template", decl); + return error_mark_node; + } + if (NEW_DELETE_OPNAME_P (DECL_NAME (decl)) + && (!TYPE_ARG_TYPES (TREE_TYPE (decl)) + || TYPE_ARG_TYPES (TREE_TYPE (decl)) == void_list_node + || !TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (decl))) + || (TREE_CHAIN (TYPE_ARG_TYPES ((TREE_TYPE (decl)))) + == void_list_node))) + { + /* [basic.stc.dynamic.allocation] + + An allocation function can be a function + template. ... Template allocation functions shall + have two or more parameters. */ + error ("invalid template declaration of `%D'", decl); + return decl; + } } else if ((DECL_IMPLICIT_TYPEDEF_P (decl) && CLASS_TYPE_P (TREE_TYPE (decl))) - || (TREE_CODE (decl) == VAR_DECL && ctx && CLASS_TYPE_P (ctx)) - || TREE_CODE (decl) == FUNCTION_DECL) + || (TREE_CODE (decl) == VAR_DECL && ctx && CLASS_TYPE_P (ctx))) /* OK */; else { @@ -3199,9 +3206,7 @@ convert_nontype_argument (tree type, tree expr) will not return the initializer. Handle that special case here. */ if (expr == const_expr - && TREE_CODE (expr) == VAR_DECL - && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (expr) - && CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (expr)) + && DECL_INTEGRAL_CONSTANT_VAR_P (expr) /* DECL_INITIAL can be NULL if we are processing a variable initialized to an expression involving itself. We know it is initialized to a constant -- but not what @@ -5470,14 +5475,28 @@ instantiate_class_template (tree type) tree tag = t; tree name = TYPE_IDENTIFIER (tag); tree newtag; - + bool class_template_p; + + class_template_p = (TREE_CODE (tag) != ENUMERAL_TYPE + && TYPE_LANG_SPECIFIC (tag) + && CLASSTYPE_IS_TEMPLATE (tag)); + /* If the member is a class template, then -- even after + substituition -- there may be dependent types in the + template argument list for the class. We increment + PROCESSING_TEMPLATE_DECL so that dependent_type_p, as + that function will assume that no types are dependent + when outside of a template. */ + if (class_template_p) + ++processing_template_decl; newtag = tsubst (tag, args, tf_error, NULL_TREE); + if (class_template_p) + --processing_template_decl; if (newtag == error_mark_node) continue; if (TREE_CODE (newtag) != ENUMERAL_TYPE) { - if (TYPE_LANG_SPECIFIC (tag) && CLASSTYPE_IS_TEMPLATE (tag)) + if (class_template_p) /* Unfortunately, lookup_template_class sets CLASSTYPE_IMPLICIT_INSTANTIATION for a partial instantiation (i.e., for the type of a member @@ -5872,6 +5891,9 @@ tsubst_aggr_type (tree t, tree tsubst_default_argument (tree fn, tree type, tree arg) { + tree saved_class_ptr = NULL_TREE; + tree saved_class_ref = NULL_TREE; + /* This default argument came from a template. Instantiate the default argument here, not in tsubst. In the case of something like: @@ -5889,12 +5911,27 @@ tsubst_default_argument (tree fn, tree type, tree arg) within the scope of FN. Since push_access_scope sets current_function_decl, we must explicitly clear it here. */ current_function_decl = NULL_TREE; + /* The "this" pointer is not valid in a default argument. */ + if (cfun) + { + saved_class_ptr = current_class_ptr; + cp_function_chain->x_current_class_ptr = NULL_TREE; + saved_class_ref = current_class_ref; + cp_function_chain->x_current_class_ref = NULL_TREE; + } push_deferring_access_checks(dk_no_deferred); arg = tsubst_expr (arg, DECL_TI_ARGS (fn), tf_error | tf_warning, NULL_TREE); pop_deferring_access_checks(); + /* Restore the "this" pointer. */ + if (cfun) + { + cp_function_chain->x_current_class_ptr = saved_class_ptr; + cp_function_chain->x_current_class_ref = saved_class_ref; + } + pop_access_scope (fn); /* Make sure the default argument is reasonable. */ @@ -6384,6 +6421,7 @@ tsubst_decl (tree t, tree args, tree type, tsubst_flags_t complain) type = complete_type (type); DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (r) = DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (t); + type = check_var_type (DECL_NAME (r), type); } else if (DECL_SELF_REFERENCE_P (t)) SET_DECL_SELF_REFERENCE_P (r); @@ -6424,9 +6462,6 @@ tsubst_decl (tree t, tree args, tree type, tsubst_flags_t complain) register_local_specialization (r, t); TREE_CHAIN (r) = NULL_TREE; - if (TREE_CODE (r) == VAR_DECL && VOID_TYPE_P (type)) - cp_error_at ("instantiation of `%D' as type `%T'", r, type); - /* Compute the size, alignment, etc. of R. */ layout_decl (r, 0); } break; @@ -6618,6 +6653,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) || t == integer_type_node || t == void_type_node || t == char_type_node + || t == unknown_type_node || TREE_CODE (t) == NAMESPACE_DECL) return t; @@ -7446,7 +7482,16 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) ctx = tsubst_aggr_type (DECL_CONTEXT (t), args, complain, in_decl, /*entering_scope=*/1); if (ctx != DECL_CONTEXT (t)) - return lookup_field (ctx, DECL_NAME (t), 0, false); + { + tree r = lookup_field (ctx, DECL_NAME (t), 0, false); + if (!r) + { + if (complain & tf_error) + error ("using invalid field `%D'", t); + return error_mark_node; + } + return r; + } } return t; @@ -8381,7 +8426,11 @@ tsubst_copy_and_build (tree t, lookup finds a non-function, in accordance with the expected resolution of DR 218. */ if (koenig_p - && (is_overloaded_fn (function) + && ((is_overloaded_fn (function) + /* If lookup found a member function, the Koenig lookup is + not appropriate, even if an unqualified-name was used + to denote the function. */ + && !DECL_FUNCTION_MEMBER_P (get_first_fn (function))) || TREE_CODE (function) == IDENTIFIER_NODE)) function = perform_koenig_lookup (function, call_args); @@ -8471,7 +8520,9 @@ tsubst_copy_and_build (tree t, else member = tsubst_copy (member, args, complain, in_decl); - if (!CLASS_TYPE_P (TREE_TYPE (object))) + if (member == error_mark_node) + return error_mark_node; + else if (!CLASS_TYPE_P (TREE_TYPE (object))) { if (TREE_CODE (member) == BIT_NOT_EXPR) return finish_pseudo_destructor_expr (object, @@ -8497,15 +8548,35 @@ tsubst_copy_and_build (tree t, /*is_type_p=*/false, /*complain=*/false); if (BASELINK_P (member)) - BASELINK_FUNCTIONS (member) - = build_nt (TEMPLATE_ID_EXPR, BASELINK_FUNCTIONS (member), - args); + { + BASELINK_FUNCTIONS (member) + = build_nt (TEMPLATE_ID_EXPR, BASELINK_FUNCTIONS (member), + args); + member = (adjust_result_of_qualified_name_lookup + (member, BINFO_TYPE (BASELINK_BINFO (member)), + TREE_TYPE (object))); + } else { qualified_name_lookup_error (TREE_TYPE (object), tmpl); return error_mark_node; } } + else if (TREE_CODE (member) == SCOPE_REF + && !CLASS_TYPE_P (TREE_OPERAND (member, 0)) + && TREE_CODE (TREE_OPERAND (member, 0)) != NAMESPACE_DECL) + { + if (complain & tf_error) + { + if (TYPE_P (TREE_OPERAND (member, 0))) + error ("`%T' is not a class or namespace", + TREE_OPERAND (member, 0)); + else + error ("`%D' is not a class or namespace", + TREE_OPERAND (member, 0)); + } + return error_mark_node; + } else if (TREE_CODE (member) == FIELD_DECL) return finish_non_static_data_member (member, object, NULL_TREE); @@ -8574,6 +8645,14 @@ tsubst_copy_and_build (tree t, tsubst_copy (TREE_TYPE (t), args, complain, in_decl)); + case CONST_DECL: + t = tsubst_copy (t, args, complain, in_decl); + /* As in finish_id_expression, we resolve enumeration constants + to their underlying values. */ + if (TREE_CODE (t) == CONST_DECL) + return DECL_INITIAL (t); + return t; + default: return tsubst_copy (t, args, complain, in_decl); } @@ -8813,6 +8892,9 @@ fn_type_unification (tree fn, tree converted_args; bool incomplete; + if (explicit_targs == error_mark_node) + return 1; + converted_args = (coerce_template_parms (DECL_INNERMOST_TEMPLATE_PARMS (fn), explicit_targs, NULL_TREE, tf_none, @@ -9833,7 +9915,10 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict) else if ((strict & UNIFY_ALLOW_INTEGER) && (TREE_CODE (tparm) == INTEGER_TYPE || TREE_CODE (tparm) == BOOLEAN_TYPE)) - /* OK */; + /* Convert the ARG to the type of PARM; the deduced non-type + template argument must exactly match the types of the + corresponding parameter. */ + arg = fold (build_nop (TREE_TYPE (parm), arg)); else if (uses_template_parms (tparm)) /* We haven't deduced the type of this parameter yet. Try again later. */ @@ -9913,6 +9998,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict) case VECTOR_TYPE: case INTEGER_TYPE: case BOOLEAN_TYPE: + case ENUMERAL_TYPE: case VOID_TYPE: if (TREE_CODE (arg) != TREE_CODE (parm)) return 1; @@ -10108,10 +10194,8 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict) else return 0; } - else - sorry ("use of `%s' in template type unification", - tree_code_name [(int) TREE_CODE (parm)]); - + sorry ("use of `%s' in template type unification", + tree_code_name [(int) TREE_CODE (parm)]); return 1; } } @@ -11927,6 +12011,9 @@ type_dependent_expression_p (tree expression) if (TREE_CODE (expression) == IDENTIFIER_NODE) return false; } + /* SCOPE_REF with non-null TREE_TYPE is always non-dependent. */ + if (TREE_CODE (expression) == SCOPE_REF) + return false; if (TREE_CODE (expression) == BASELINK) expression = BASELINK_FUNCTIONS (expression); @@ -12031,8 +12118,9 @@ dependent_template_p (tree tmpl) if (DECL_TEMPLATE_TEMPLATE_PARM_P (tmpl) || TREE_CODE (tmpl) == TEMPLATE_TEMPLATE_PARM) return true; - /* So are qualified names that have not been looked up. */ - if (TREE_CODE (tmpl) == SCOPE_REF) + /* So arenames that have not been looked up. */ + if (TREE_CODE (tmpl) == SCOPE_REF + || TREE_CODE (tmpl) == IDENTIFIER_NODE) return true; /* So are member templates of dependent classes. */ if (TYPE_P (CP_DECL_CONTEXT (tmpl))) @@ -12148,7 +12236,8 @@ build_non_dependent_expr (tree expr) if (TREE_CODE (inner_expr) == OVERLOAD || TREE_CODE (inner_expr) == FUNCTION_DECL || TREE_CODE (inner_expr) == TEMPLATE_DECL - || TREE_CODE (inner_expr) == TEMPLATE_ID_EXPR) + || TREE_CODE (inner_expr) == TEMPLATE_ID_EXPR + || TREE_CODE (inner_expr) == OFFSET_REF) return expr; /* Preserve string constants; conversions from string constants to "char *" are allowed, even though normally a "const char *" diff --git a/contrib/gcc/cp/search.c b/contrib/gcc/cp/search.c index 65ed660..0dfdb92 100644 --- a/contrib/gcc/cp/search.c +++ b/contrib/gcc/cp/search.c @@ -78,6 +78,7 @@ struct vbase_info tree inits; }; +static int is_subobject_of_p (tree, tree); static tree dfs_check_overlap (tree, void *); static tree dfs_no_overlap_yet (tree, int, void *); static base_kind lookup_base_r (tree, tree, base_access, bool, tree *); @@ -97,7 +98,6 @@ static struct search_level *pop_search_level (struct stack_level *); static tree bfs_walk (tree, tree (*) (tree, void *), tree (*) (tree, int, void *), void *); static tree lookup_field_queue_p (tree, int, void *); -static int shared_member_p (tree); static tree lookup_field_r (tree, void *); static tree dfs_accessible_queue_p (tree, int, void *); static tree dfs_accessible_p (tree, void *); @@ -891,10 +891,26 @@ friend_accessible_p (tree scope, tree decl, tree binfo) /* Or an instantiation of something which is a friend. */ if (DECL_TEMPLATE_INFO (scope)) - return friend_accessible_p (DECL_TI_TEMPLATE (scope), decl, binfo); + { + int ret; + /* Increment processing_template_decl to make sure that + dependent_type_p works correctly. */ + ++processing_template_decl; + ret = friend_accessible_p (DECL_TI_TEMPLATE (scope), decl, binfo); + --processing_template_decl; + return ret; + } } else if (CLASSTYPE_TEMPLATE_INFO (scope)) - return friend_accessible_p (CLASSTYPE_TI_TEMPLATE (scope), decl, binfo); + { + int ret; + /* Increment processing_template_decl to make sure that + dependent_type_p works correctly. */ + ++processing_template_decl; + ret = friend_accessible_p (CLASSTYPE_TI_TEMPLATE (scope), decl, binfo); + --processing_template_decl; + return ret; + } return 0; } @@ -1058,7 +1074,6 @@ template_self_reference_p (tree type, tree decl) && DECL_NAME (decl) == constructor_name (type)); } - /* Nonzero for a class member means that it is shared between all objects of that class. @@ -1069,7 +1084,7 @@ template_self_reference_p (tree type, tree decl) This function checks that T contains no nonstatic members. */ -static int +int shared_member_p (tree t) { if (TREE_CODE (t) == VAR_DECL || TREE_CODE (t) == TYPE_DECL \ @@ -1088,6 +1103,27 @@ shared_member_p (tree t) return 0; } +/* Routine to see if the sub-object denoted by the binfo PARENT can be + found as a base class and sub-object of the object denoted by + BINFO. */ + +static int +is_subobject_of_p (tree parent, tree binfo) +{ + tree probe; + + for (probe = parent; probe; probe = BINFO_INHERITANCE_CHAIN (probe)) + { + if (probe == binfo) + return 1; + if (TREE_VIA_VIRTUAL (probe)) + return (purpose_member (BINFO_TYPE (probe), + CLASSTYPE_VBASECLASSES (BINFO_TYPE (binfo))) + != NULL_TREE); + } + return 0; +} + /* DATA is really a struct lookup_field_info. Look for a field with the name indicated there in BINFO. If this function returns a non-NULL value it is the result of the lookup. Called from @@ -1155,12 +1191,14 @@ lookup_field_r (tree binfo, void *data) /* If the lookup already found a match, and the new value doesn't hide the old one, we might have an ambiguity. */ - if (lfi->rval_binfo && !original_binfo (lfi->rval_binfo, binfo)) + if (lfi->rval_binfo + && !is_subobject_of_p (lfi->rval_binfo, binfo)) + { if (nval == lfi->rval && shared_member_p (nval)) /* The two things are really the same. */ ; - else if (original_binfo (binfo, lfi->rval_binfo)) + else if (is_subobject_of_p (binfo, lfi->rval_binfo)) /* The previous value hides the new one. */ ; else diff --git a/contrib/gcc/cp/semantics.c b/contrib/gcc/cp/semantics.c index 966b004..bb2f3c9 100644 --- a/contrib/gcc/cp/semantics.c +++ b/contrib/gcc/cp/semantics.c @@ -4,7 +4,7 @@ and during the instantiation of template functions. Copyright (C) 1998, 1999, 2000, 2001, 2002, - 2003, 2004 Free Software Foundation, Inc. + 2003, 2004, 2005 Free Software Foundation, Inc. Written by Mark Mitchell (mmitchell@usa.net) based on code found formerly in parse.y and pt.c. @@ -1388,19 +1388,16 @@ finish_qualified_id_expr (tree qualifying_class, tree expr, bool done, qualifying_class); else if (BASELINK_P (expr) && !processing_template_decl) { - tree fn; tree fns; /* See if any of the functions are non-static members. */ fns = BASELINK_FUNCTIONS (expr); if (TREE_CODE (fns) == TEMPLATE_ID_EXPR) fns = TREE_OPERAND (fns, 0); - for (fn = fns; fn; fn = OVL_NEXT (fn)) - if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fn)) - break; /* If so, the expression may be relative to the current class. */ - if (fn && current_class_type + if (!shared_member_p (fns) + && current_class_type && DERIVED_FROM_P (qualifying_class, current_class_type)) expr = (build_class_member_access_expr (maybe_dummy_object (qualifying_class, NULL), @@ -1446,6 +1443,9 @@ finish_stmt_expr_expr (tree expr) tree result = NULL_TREE; tree type = void_type_node; + if (error_operand_p (expr)) + return error_mark_node; + if (expr) { type = TREE_TYPE (expr); @@ -2561,31 +2561,35 @@ finish_id_expression (tree id_expression, if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL) return decl; + /* The same is true for FIELD_DECL, but we also need to + make sure that the syntax is correct. */ + else if (TREE_CODE (decl) == FIELD_DECL) + { + /* Since SCOPE is NULL here, this is an unqualified name. + Access checking has been performed during name lookup + already. Turn off checking to avoid duplicate errors. */ + push_deferring_access_checks (dk_no_check); + decl = finish_non_static_data_member + (decl, current_class_ref, + /*qualifying_scope=*/NULL_TREE); + pop_deferring_access_checks (); + return decl; + } return id_expression; } /* Only certain kinds of names are allowed in constant expression. Enumerators and template parameters have already been handled above. */ - if (integral_constant_expression_p) + if (integral_constant_expression_p + && !DECL_INTEGRAL_CONSTANT_VAR_P (decl)) { - /* Const variables or static data members of integral or - enumeration types initialized with constant expressions - are OK. */ - if (TREE_CODE (decl) == VAR_DECL - && CP_TYPE_CONST_P (TREE_TYPE (decl)) - && INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (decl)) - && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)) - ; - else + if (!allow_non_integral_constant_expression_p) { - if (!allow_non_integral_constant_expression_p) - { - error ("`%D' cannot appear in a constant-expression", decl); - return error_mark_node; - } - *non_integral_constant_expression_p = true; + error ("`%D' cannot appear in a constant-expression", decl); + return error_mark_node; } + *non_integral_constant_expression_p = true; } if (TREE_CODE (decl) == NAMESPACE_DECL) @@ -2630,8 +2634,15 @@ finish_id_expression (tree id_expression, decl = build (SCOPE_REF, TREE_TYPE (decl), scope, decl); } else if (TREE_CODE (decl) == FIELD_DECL) - decl = finish_non_static_data_member (decl, current_class_ref, - /*qualifying_scope=*/NULL_TREE); + { + /* Since SCOPE is NULL here, this is an unqualified name. + Access checking has been performed during name lookup + already. Turn off checking to avoid duplicate errors. */ + push_deferring_access_checks (dk_no_check); + decl = finish_non_static_data_member (decl, current_class_ref, + /*qualifying_scope=*/NULL_TREE); + pop_deferring_access_checks (); + } else if (is_overloaded_fn (decl)) { tree first_fn = OVL_CURRENT (decl); @@ -2643,7 +2654,8 @@ finish_id_expression (tree id_expression, mark_used (first_fn); if (TREE_CODE (first_fn) == FUNCTION_DECL - && DECL_FUNCTION_MEMBER_P (first_fn)) + && DECL_FUNCTION_MEMBER_P (first_fn) + && !shared_member_p (decl)) { /* A set of member functions. */ decl = maybe_dummy_object (DECL_CONTEXT (first_fn), 0); @@ -2935,18 +2947,6 @@ expand_body (tree fn) extract_interface_info (); - /* 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 (DECL_CLONED_FUNCTION_P (fn)) { /* If this is a clone, go through the other clones now and mark @@ -3009,6 +3009,18 @@ expand_or_defer_fn (tree fn) if (DECL_DECLARED_INLINE_P (fn)) import_export_decl (fn); + /* 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++; /* Expand or defer, at the whim of the compilation unit manager. */ @@ -3035,6 +3047,27 @@ nullify_returns_r (tree* tp, int* walk_subtrees, void* data) else if (TREE_CODE (*tp) == CLEANUP_STMT && CLEANUP_DECL (*tp) == nrv) CLEANUP_EH_ONLY (*tp) = 1; + /* Replace the DECL_STMT for the NRV with an initialization of the + RESULT_DECL, if needed. */ + else if (TREE_CODE (*tp) == DECL_STMT + && DECL_STMT_DECL (*tp) == nrv) + { + tree init; + if (DECL_INITIAL (nrv) + && DECL_INITIAL (nrv) != error_mark_node) + { + init = build (INIT_EXPR, void_type_node, + DECL_RESULT (current_function_decl), + DECL_INITIAL (nrv)); + DECL_INITIAL (nrv) = error_mark_node; + } + else + init = NULL_TREE; + init = build_stmt (EXPR_STMT, init); + TREE_CHAIN (init) = TREE_CHAIN (*tp); + STMT_LINENO (init) = STMT_LINENO (*tp); + *tp = init; + } /* Keep iterating. */ return NULL_TREE; diff --git a/contrib/gcc/cp/tree.c b/contrib/gcc/cp/tree.c index d39ff76..2e41211 100644 --- a/contrib/gcc/cp/tree.c +++ b/contrib/gcc/cp/tree.c @@ -1,6 +1,6 @@ /* Language-dependent node constructors for parse phase of GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. @@ -1546,6 +1546,12 @@ cp_tree_equal (tree t1, tree t2) case IDENTIFIER_NODE: return false; + case BASELINK: + return (BASELINK_BINFO (t1) == BASELINK_BINFO (t2) + && BASELINK_ACCESS_BINFO (t1) == BASELINK_ACCESS_BINFO (t2) + && cp_tree_equal (BASELINK_FUNCTIONS (t1), + BASELINK_FUNCTIONS (t2))); + case TEMPLATE_PARM_INDEX: return (TEMPLATE_PARM_IDX (t1) == TEMPLATE_PARM_IDX (t2) && TEMPLATE_PARM_LEVEL (t1) == TEMPLATE_PARM_LEVEL (t2) @@ -1598,6 +1604,11 @@ cp_tree_equal (tree t1, tree t2) return same_type_p (PTRMEM_CST_CLASS (t1), PTRMEM_CST_CLASS (t2)); + case OVERLOAD: + if (OVL_FUNCTION (t1) != OVL_FUNCTION (t2)) + return false; + return cp_tree_equal (OVL_CHAIN (t1), OVL_CHAIN (t2)); + default: break; } @@ -1764,6 +1775,8 @@ pod_type_p (tree t) return 1; /* pointer to non-member */ if (TYPE_PTR_TO_MEMBER_P (t)) return 1; /* pointer to member */ + if (TREE_CODE (t) == VECTOR_TYPE) + return 1; /* vectors are (small) arrays of scalars */ if (! CLASS_TYPE_P (t)) return 0; /* other non-class type (reference or function) */ @@ -2494,6 +2507,8 @@ stabilize_init (tree init, tree *initp) t = TREE_OPERAND (t, 1); if (TREE_CODE (t) == TARGET_EXPR) t = TARGET_EXPR_INITIAL (t); + if (TREE_CODE (t) == COMPOUND_EXPR) + t = expr_last (t); if (TREE_CODE (t) == CONSTRUCTOR && CONSTRUCTOR_ELTS (t) == NULL_TREE) { @@ -2507,12 +2522,28 @@ stabilize_init (tree init, tree *initp) if (TREE_CODE (t) == COND_EXPR) return false; - stabilize_call (t, initp); + /* The TARGET_EXPR might be initializing via bitwise copy from + another variable; leave that alone. */ + if (TREE_SIDE_EFFECTS (t)) + stabilize_call (t, initp); } return true; } +/* Like "fold", but should be used whenever we might be processing the + body of a template. */ + +tree +fold_if_not_in_template (tree expr) +{ + /* In the body of a template, there is never any need to call + "fold". We will call fold later when actually instantiating the + template. Integral constant expressions in templates will be + evaluated via fold_non_dependent_expr, as necessary. */ + return (processing_template_decl ? expr : fold (expr)); +} + #if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007) /* Complain that some language-specific thing hanging off a tree diff --git a/contrib/gcc/cp/typeck.c b/contrib/gcc/cp/typeck.c index 5044db4..0c9c6c4 100644 --- a/contrib/gcc/cp/typeck.c +++ b/contrib/gcc/cp/typeck.c @@ -1,6 +1,6 @@ /* Build expressions with type checking for C++ compiler. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. @@ -1216,7 +1216,7 @@ cxx_sizeof_or_alignof_type (tree type, enum tree_code op, bool complain) if (type == error_mark_node) return error_mark_node; - if (processing_template_decl) + if (dependent_type_p (type)) { value = build_min (op, size_type_node, type); TREE_READONLY (value) = 1; @@ -3458,7 +3458,7 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, tree result = build (resultcode, build_type, op0, op1); tree folded; - folded = fold (result); + folded = fold_if_not_in_template (result); if (folded == result) TREE_CONSTANT (folded) = TREE_CONSTANT (op0) & TREE_CONSTANT (op1); if (final_type != 0) @@ -3548,6 +3548,7 @@ build_x_unary_op (enum tree_code code, tree xarg) { if (type_dependent_expression_p (xarg)) return build_min_nt (code, xarg, NULL_TREE); + xarg = build_non_dependent_expr (xarg); } @@ -3609,13 +3610,13 @@ build_x_unary_op (enum tree_code code, tree xarg) else if (TREE_CODE (xarg) == TARGET_EXPR) warning ("taking address of temporary"); exp = build_unary_op (ADDR_EXPR, xarg, 0); - if (TREE_CODE (exp) == ADDR_EXPR) - PTRMEM_OK_P (exp) = ptrmem; } if (processing_template_decl && exp != error_mark_node) - return build_min_non_dep (code, exp, orig_expr, - /*For {PRE,POST}{INC,DEC}REMENT_EXPR*/NULL_TREE); + exp = build_min_non_dep (code, exp, orig_expr, + /*For {PRE,POST}{INC,DEC}REMENT_EXPR*/NULL_TREE); + if (TREE_CODE (exp) == ADDR_EXPR) + PTRMEM_OK_P (exp) = ptrmem; return exp; } @@ -4077,6 +4078,7 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert) is an error. */ else if (TREE_CODE (argtype) != FUNCTION_TYPE && TREE_CODE (argtype) != METHOD_TYPE + && TREE_CODE (arg) != OFFSET_REF && !lvalue_or_else (arg, "unary `&'")) return error_mark_node; @@ -4091,7 +4093,11 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert) expression so we can just form an ADDR_EXPR with the correct type. */ || processing_template_decl) - addr = build_address (arg); + { + addr = build_address (arg); + if (TREE_CODE (arg) == OFFSET_REF) + PTRMEM_OK_P (addr) = PTRMEM_OK_P (arg); + } else if (TREE_CODE (TREE_OPERAND (arg, 1)) == BASELINK) { tree fn = BASELINK_FUNCTIONS (TREE_OPERAND (arg, 1)); @@ -4160,7 +4166,8 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert) for certain kinds of expressions which are not really lvalues but which we can accept as lvalues. - If ARG is not a kind of expression we can handle, return zero. */ + If ARG is not a kind of expression we can handle, return + NULL_TREE. */ tree unary_complex_lvalue (enum tree_code code, tree arg) @@ -5509,7 +5516,10 @@ build_ptrmemfunc (tree type, tree pfn, int force) } /* Just adjust the DELTA field. */ - my_friendly_assert (TREE_TYPE (delta) == ptrdiff_type_node, 20030727); + my_friendly_assert + (same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (delta), + ptrdiff_type_node), + 20030727); if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_delta) n = cp_build_binary_op (LSHIFT_EXPR, n, integer_one_node); delta = cp_build_binary_op (PLUS_EXPR, delta, n); diff --git a/contrib/gcc/cp/typeck2.c b/contrib/gcc/cp/typeck2.c index 300e8e6..780c3e7 100644 --- a/contrib/gcc/cp/typeck2.c +++ b/contrib/gcc/cp/typeck2.c @@ -348,9 +348,11 @@ split_nonconstant_init_1 (tree dest, tree init, tree *pcode) case VECTOR_TYPE: if (!initializer_constant_valid_p (init, type)) { + tree cons = copy_node (init); CONSTRUCTOR_ELTS (init) = NULL; - code = build (MODIFY_EXPR, type, dest, init); + code = build (MODIFY_EXPR, type, dest, cons); code = build_stmt (EXPR_STMT, code); + *pcode = code; pcode = &TREE_CHAIN (code); } break; @@ -445,28 +447,18 @@ store_init_value (tree decl, tree init) init = build_x_compound_expr_from_list (init, "initializer"); } - /* End of special C++ code. */ - /* Digest the specified initializer into an expression. */ value = digest_init (type, init, (tree *) 0); - - /* Store the expression if valid; else report error. */ - - if (TREE_CODE (value) == ERROR_MARK) - ; - /* Other code expects that initializers for objects of types that need - constructing never make it into DECL_INITIAL, and passes 'init' to - build_aggr_init without checking DECL_INITIAL. So just return. */ - else if (TYPE_NEEDS_CONSTRUCTING (type)) - return build (INIT_EXPR, type, decl, value); - else if (TREE_STATIC (decl) - && (! TREE_CONSTANT (value) - || ! initializer_constant_valid_p (value, TREE_TYPE (value)))) + /* If the initializer is not a constant, fill in DECL_INITIAL with + the bits that are constant, and then return an expression that + will perform the dynamic initialization. */ + if (value != error_mark_node + && (! TREE_CONSTANT (value) + || ! initializer_constant_valid_p (value, TREE_TYPE (value)))) return split_nonconstant_init (decl, value); - - /* Store the VALUE in DECL_INITIAL. If we're building a - statement-tree we will actually expand the initialization later - when we output this function. */ + /* If the value is a constant, just put it in DECL_INITIAL. If DECL + is an automatic variable, the middle end will turn this into a + dynamic initialization later. */ DECL_INITIAL (decl) = value; return NULL_TREE; } diff --git a/contrib/gcc/cppfiles.c b/contrib/gcc/cppfiles.c index 1ca793d..9aea34c 100644 --- a/contrib/gcc/cppfiles.c +++ b/contrib/gcc/cppfiles.c @@ -168,6 +168,7 @@ static void open_file_failed (cpp_reader *pfile, _cpp_file *file); static struct file_hash_entry *search_cache (struct file_hash_entry *head, const cpp_dir *start_dir); static _cpp_file *make_cpp_file (cpp_reader *, cpp_dir *, const char *fname); +static void destroy_cpp_file (_cpp_file *); static cpp_dir *make_cpp_dir (cpp_reader *, const char *dir_name, int sysp); static void allocate_file_hash_entries (cpp_reader *pfile); static struct file_hash_entry *new_file_hash_entry (cpp_reader *pfile); @@ -598,12 +599,38 @@ should_stack_file (cpp_reader *pfile, _cpp_file *file, bool import) if ((import || f->once_only) && f->err_no == 0 && f->st.st_mtime == file->st.st_mtime - && f->st.st_size == file->st.st_size - && read_file (pfile, f) - /* Size might have changed in read_file(). */ - && f->st.st_size == file->st.st_size - && !memcmp (f->buffer, file->buffer, f->st.st_size)) - break; + && f->st.st_size == file->st.st_size) + { + _cpp_file *ref_file; + bool same_file_p = false; + + if (f->buffer && !f->buffer_valid) + { + /* We already have a buffer but it is not valid, because + the file is still stacked. Make a new one. */ + ref_file = make_cpp_file (pfile, f->dir, f->name); + ref_file->path = f->path; + } + else + /* The file is not stacked anymore. We can reuse it. */ + ref_file = f; + + same_file_p = read_file (pfile, ref_file) + /* Size might have changed in read_file(). */ + && ref_file->st.st_size == file->st.st_size + && !memcmp (ref_file->buffer, + file->buffer, + file->st.st_size); + + if (f->buffer && !f->buffer_valid) + { + ref_file->path = 0; + destroy_cpp_file (ref_file); + } + + if (same_file_p) + break; + } } return f == NULL; @@ -781,6 +808,16 @@ make_cpp_file (cpp_reader *pfile, cpp_dir *dir, const char *fname) return file; } +/* Release a _cpp_file structure. */ +static void +destroy_cpp_file (_cpp_file *file) +{ + if (file->buffer) + free ((void *) file->buffer); + free ((void *) file->name); + free (file); +} + /* A hash of directory names. The directory names are the path names of files which contain a #include "", the included file name is appended to this directories. diff --git a/contrib/gcc/cpplib.c b/contrib/gcc/cpplib.c index 60a86e3..298f5e6 100644 --- a/contrib/gcc/cpplib.c +++ b/contrib/gcc/cpplib.c @@ -680,6 +680,14 @@ do_include_common (cpp_reader *pfile, enum include_type type) if (!fname) return; + if (!*fname) + { + cpp_error (pfile, CPP_DL_ERROR, "empty filename in #%s", + pfile->directive->name); + free ((void *) fname); + return; + } + /* Prevent #include recursion. */ if (pfile->line_maps.depth >= CPP_STACK_MAX) cpp_error (pfile, CPP_DL_ERROR, "#include nested too deeply"); diff --git a/contrib/gcc/cppmacro.c b/contrib/gcc/cppmacro.c index 11ac09f..2298c85 100644 --- a/contrib/gcc/cppmacro.c +++ b/contrib/gcc/cppmacro.c @@ -1626,6 +1626,7 @@ cpp_macro_definition (cpp_reader *pfile, const cpp_hashnode *node) len += NODE_LEN (macro->params[i]) + 1; /* "," */ } + /* This should match below where we fill in the buffer. */ if (CPP_OPTION (pfile, traditional)) len += _cpp_replacement_text_len (macro); else @@ -1637,11 +1638,14 @@ cpp_macro_definition (cpp_reader *pfile, const cpp_hashnode *node) if (token->type == CPP_MACRO_ARG) len += NODE_LEN (macro->params[token->val.arg_no - 1]); else - len += cpp_token_len (token) + 1; /* Includes room for ' '. */ + len += cpp_token_len (token); + if (token->flags & STRINGIFY_ARG) len++; /* "#" */ if (token->flags & PASTE_LEFT) len += 3; /* " ##" */ + if (token->flags & PREV_WHITE) + len++; /* " " */ } } @@ -1701,10 +1705,10 @@ cpp_macro_definition (cpp_reader *pfile, const cpp_hashnode *node) if (token->type == CPP_MACRO_ARG) { - len = NODE_LEN (macro->params[token->val.arg_no - 1]); memcpy (buffer, - NODE_NAME (macro->params[token->val.arg_no - 1]), len); - buffer += len; + NODE_NAME (macro->params[token->val.arg_no - 1]), + NODE_LEN (macro->params[token->val.arg_no - 1])); + buffer += NODE_LEN (macro->params[token->val.arg_no - 1]); } else buffer = cpp_spell_token (pfile, token, buffer); diff --git a/contrib/gcc/crtstuff.c b/contrib/gcc/crtstuff.c index b9a29a0..580ee3c 100644 --- a/contrib/gcc/crtstuff.c +++ b/contrib/gcc/crtstuff.c @@ -445,9 +445,18 @@ STATIC func_ptr __DTOR_END__[1] #ifdef EH_FRAME_SECTION_NAME /* Terminate the frame unwind info section with a 4byte 0 as a sentinel; this would be the 'length' field in a real FDE. */ -STATIC EH_FRAME_SECTION_CONST int __FRAME_END__[] - __attribute__ ((unused, mode(SI), section(EH_FRAME_SECTION_NAME), - aligned(4))) +# if __INT_MAX__ == 2147483647 +typedef int int32; +# elif __LONG_MAX__ == 2147483647 +typedef long int32; +# elif __SHRT_MAX__ == 2147483647 +typedef short int32; +# else +# error "Missing a 4 byte integer" +# endif +STATIC EH_FRAME_SECTION_CONST int32 __FRAME_END__[] + __attribute__ ((unused, section(EH_FRAME_SECTION_NAME), + aligned(sizeof(int32)))) = { 0 }; #endif /* EH_FRAME_SECTION_NAME */ diff --git a/contrib/gcc/cse.c b/contrib/gcc/cse.c index 5081926..447d972 100644 --- a/contrib/gcc/cse.c +++ b/contrib/gcc/cse.c @@ -83,11 +83,12 @@ Registers and "quantity numbers": `reg_qty' records what quantity a register is currently thought of as containing. - All real quantity numbers are greater than or equal to `max_reg'. - If register N has not been assigned a quantity, reg_qty[N] will equal N. + All real quantity numbers are greater than or equal to zero. + If register N has not been assigned a quantity, reg_qty[N] will + equal -N - 1, which is always negative. - Quantity numbers below `max_reg' do not exist and none of the `qty_table' - entries should be referenced with an index below `max_reg'. + Quantity numbers below zero do not exist and none of the `qty_table' + entries should be referenced with a negative index. We also maintain a bidirectional chain of registers for each quantity number. The `qty_table` members `first_reg' and `last_reg', @@ -539,7 +540,7 @@ struct table_elt /* Determine if the quantity number for register X represents a valid index into the qty_table. */ -#define REGNO_QTY_VALID_P(N) (REG_QTY (N) != (int) (N)) +#define REGNO_QTY_VALID_P(N) (REG_QTY (N) >= 0) static struct table_elt *table[HASH_SIZE]; @@ -943,7 +944,7 @@ get_cse_reg_info (unsigned int regno) p->reg_tick = 1; p->reg_in_table = -1; p->subreg_ticked = -1; - p->reg_qty = regno; + p->reg_qty = -regno - 1; p->regno = regno; p->next = cse_reg_info_used_list; cse_reg_info_used_list = p; @@ -967,7 +968,7 @@ new_basic_block (void) { int i; - next_qty = max_reg; + next_qty = 0; /* Clear out hash table state for this pass. */ @@ -1113,7 +1114,7 @@ delete_reg_equiv (unsigned int reg) int p, n; /* If invalid, do nothing. */ - if (q == (int) reg) + if (! REGNO_QTY_VALID_P (reg)) return; ent = &qty_table[q]; @@ -1130,7 +1131,7 @@ delete_reg_equiv (unsigned int reg) else ent->first_reg = n; - REG_QTY (reg) = reg; + REG_QTY (reg) = -reg - 1; } /* Remove any invalid expressions from the hash table @@ -1734,7 +1735,7 @@ merge_equiv_classes (struct table_elt *class1, struct table_elt *class2) if (GET_CODE (exp) == REG) { - need_rehash = (unsigned) REG_QTY (REGNO (exp)) != REGNO (exp); + need_rehash = REGNO_QTY_VALID_P (REGNO (exp)); delete_reg_equiv (REGNO (exp)); } @@ -3868,6 +3869,10 @@ fold_rtx (rtx x, rtx insn) break; case '<': + /* Don't perform any simplifications of vector mode comparisons. */ + if (VECTOR_MODE_P (mode)) + break; + /* See what items are actually being compared and set FOLDED_ARG[01] to those values and CODE to the actual comparison code. If any are constant, set CONST_ARG0 and CONST_ARG1 appropriately. We needn't @@ -7070,8 +7075,6 @@ cse_main (rtx f, int nregs, int after_loop, FILE *file) if (max_qty < 500) max_qty = 500; - max_qty += max_reg; - /* If this basic block is being extended by following certain jumps, (see `cse_end_of_basic_block'), we reprocess the code from the start. Otherwise, we start after this basic block. */ @@ -7134,11 +7137,8 @@ cse_basic_block (rtx from, rtx to, struct branch_path *next_branch, int num_insns = 0; int no_conflict = 0; - /* This array is undefined before max_reg, so only allocate - the space actually needed and adjust the start. */ - - qty_table = xmalloc ((max_qty - max_reg) * sizeof (struct qty_table_elem)); - qty_table -= max_reg; + /* Allocate the space needed by qty_table. */ + qty_table = xmalloc (max_qty * sizeof (struct qty_table_elem)); new_basic_block (); @@ -7249,7 +7249,7 @@ cse_basic_block (rtx from, rtx to, struct branch_path *next_branch, { if (to == 0) { - free (qty_table + max_reg); + free (qty_table); return 0; } @@ -7284,7 +7284,7 @@ cse_basic_block (rtx from, rtx to, struct branch_path *next_branch, /* If TO was the last insn in the function, we are done. */ if (insn == 0) { - free (qty_table + max_reg); + free (qty_table); return 0; } @@ -7293,7 +7293,7 @@ cse_basic_block (rtx from, rtx to, struct branch_path *next_branch, prev = prev_nonnote_insn (to); if (prev && GET_CODE (prev) == BARRIER) { - free (qty_table + max_reg); + free (qty_table); return insn; } @@ -7344,7 +7344,7 @@ cse_basic_block (rtx from, rtx to, struct branch_path *next_branch, && LABEL_NUSES (JUMP_LABEL (insn)) == 1) cse_around_loop (JUMP_LABEL (insn)); - free (qty_table + max_reg); + free (qty_table); return to ? NEXT_INSN (to) : 0; } diff --git a/contrib/gcc/cselib.c b/contrib/gcc/cselib.c index 95b4cc7..9c1d936 100644 --- a/contrib/gcc/cselib.c +++ b/contrib/gcc/cselib.c @@ -60,7 +60,6 @@ static void add_mem_for_addr (cselib_val *, cselib_val *, rtx); static cselib_val *cselib_lookup_mem (rtx, int); static void cselib_invalidate_regno (unsigned int, enum machine_mode); static void cselib_invalidate_mem (rtx); -static void cselib_invalidate_rtx (rtx, rtx, void *); static void cselib_record_set (rtx, cselib_val *, cselib_val *); static void cselib_record_sets (rtx); @@ -1135,13 +1134,10 @@ cselib_invalidate_mem (rtx mem_rtx) *vp = &dummy_val; } -/* Invalidate DEST, which is being assigned to or clobbered. The second and - the third parameter exist so that this function can be passed to - note_stores; they are ignored. */ +/* Invalidate DEST, which is being assigned to or clobbered. */ -static void -cselib_invalidate_rtx (rtx dest, rtx ignore ATTRIBUTE_UNUSED, - void *data ATTRIBUTE_UNUSED) +void +cselib_invalidate_rtx (rtx dest) { while (GET_CODE (dest) == STRICT_LOW_PART || GET_CODE (dest) == SIGN_EXTRACT || GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SUBREG) @@ -1157,7 +1153,16 @@ cselib_invalidate_rtx (rtx dest, rtx ignore ATTRIBUTE_UNUSED, invalidate the stack pointer correctly. Note that invalidating the stack pointer is different from invalidating DEST. */ if (push_operand (dest, GET_MODE (dest))) - cselib_invalidate_rtx (stack_pointer_rtx, NULL_RTX, NULL); + cselib_invalidate_rtx (stack_pointer_rtx); +} + +/* A wrapper for cselib_invalidate_rtx to be called via note_stores. */ + +static void +cselib_invalidate_rtx_note_stores (rtx dest, rtx ignore ATTRIBUTE_UNUSED, + void *data ATTRIBUTE_UNUSED) +{ + cselib_invalidate_rtx (dest); } /* Record the result of a SET instruction. DEST is being set; the source @@ -1290,7 +1295,7 @@ cselib_record_sets (rtx insn) /* Invalidate all locations written by this insn. Note that the elts we looked up in the previous loop aren't affected, just some of their locations may go away. */ - note_stores (body, cselib_invalidate_rtx, NULL); + note_stores (body, cselib_invalidate_rtx_note_stores, NULL); /* If this is an asm, look for duplicate sets. This can happen when the user uses the same value as an output multiple times. This is valid @@ -1334,8 +1339,6 @@ cselib_process_insn (rtx insn) if (find_reg_note (insn, REG_LIBCALL, NULL)) cselib_current_insn_in_libcall = true; - if (find_reg_note (insn, REG_RETVAL, NULL)) - cselib_current_insn_in_libcall = false; cselib_current_insn = insn; /* Forget everything at a CODE_LABEL, a volatile asm, or a setjmp. */ @@ -1346,12 +1349,16 @@ cselib_process_insn (rtx insn) && GET_CODE (PATTERN (insn)) == ASM_OPERANDS && MEM_VOLATILE_P (PATTERN (insn)))) { + if (find_reg_note (insn, REG_RETVAL, NULL)) + cselib_current_insn_in_libcall = false; clear_table (); return; } if (! INSN_P (insn)) { + if (find_reg_note (insn, REG_RETVAL, NULL)) + cselib_current_insn_in_libcall = false; cselib_current_insn = 0; return; } @@ -1377,7 +1384,7 @@ cselib_process_insn (rtx insn) unlikely to help. */ for (x = REG_NOTES (insn); x; x = XEXP (x, 1)) if (REG_NOTE_KIND (x) == REG_INC) - cselib_invalidate_rtx (XEXP (x, 0), NULL_RTX, NULL); + cselib_invalidate_rtx (XEXP (x, 0)); #endif /* Look for any CLOBBERs in CALL_INSN_FUNCTION_USAGE, but only @@ -1385,8 +1392,10 @@ cselib_process_insn (rtx insn) if (GET_CODE (insn) == CALL_INSN) for (x = CALL_INSN_FUNCTION_USAGE (insn); x; x = XEXP (x, 1)) if (GET_CODE (XEXP (x, 0)) == CLOBBER) - cselib_invalidate_rtx (XEXP (XEXP (x, 0), 0), NULL_RTX, NULL); + cselib_invalidate_rtx (XEXP (XEXP (x, 0), 0)); + if (find_reg_note (insn, REG_RETVAL, NULL)) + cselib_current_insn_in_libcall = false; cselib_current_insn = 0; if (n_useless_values > MAX_USELESS_VALUES) diff --git a/contrib/gcc/cselib.h b/contrib/gcc/cselib.h index f86f657..bbe1ffa 100644 --- a/contrib/gcc/cselib.h +++ b/contrib/gcc/cselib.h @@ -72,3 +72,4 @@ extern enum machine_mode cselib_reg_set_mode (rtx); extern int rtx_equal_for_cselib_p (rtx, rtx); extern int references_value_p (rtx, int); extern rtx cselib_subst_to_values (rtx); +extern void cselib_invalidate_rtx (rtx); diff --git a/contrib/gcc/dbxout.c b/contrib/gcc/dbxout.c index 5a3c135..b12ea5c 100644 --- a/contrib/gcc/dbxout.c +++ b/contrib/gcc/dbxout.c @@ -434,6 +434,9 @@ static void dbxout_function_end (void) { char lscope_label_name[100]; + + /* The Lscope label must be emitted even if we aren't doing anything + else; dbxout_block needs it. */ /* Convert Ltext into the appropriate format for local labels in case the system doesn't insert underscores in front of user generated labels. */ @@ -441,6 +444,16 @@ dbxout_function_end (void) (*targetm.asm_out.internal_label) (asmfile, "Lscope", scope_labelno); scope_labelno++; + /* The N_FUN tag at the end of the function is a GNU extension, + which may be undesirable, and is unnecessary if we do not have + named sections. */ + if (!use_gnu_debug_info_extensions +#if defined(NO_DBX_FUNCTION_END) + || NO_DBX_FUNCTION_END +#endif + || !targetm.have_named_sections) + return; + /* By convention, GCC will mark the end of a function with an N_FUN symbol and an empty string. */ #ifdef DBX_OUTPUT_NFUN @@ -774,12 +787,7 @@ dbxout_function_decl (tree decl) #ifdef DBX_OUTPUT_FUNCTION_END DBX_OUTPUT_FUNCTION_END (asmfile, decl); #endif - if (use_gnu_debug_info_extensions -#if defined(NO_DBX_FUNCTION_END) - && ! NO_DBX_FUNCTION_END -#endif - && targetm.have_named_sections) - dbxout_function_end (); + dbxout_function_end (); } #endif /* DBX_DEBUGGING_INFO */ @@ -2439,6 +2447,37 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home) letter = decl_function_context (decl) ? 'V' : 'S'; + /* Some ports can transform a symbol ref into a label ref, + because the symbol ref is too far away and has to be + dumped into a constant pool. Alternatively, the symbol + in the constant pool might be referenced by a different + symbol. */ + if (GET_CODE (current_sym_addr) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (current_sym_addr)) + { + bool marked; + rtx tmp = get_pool_constant_mark (current_sym_addr, &marked); + + if (GET_CODE (tmp) == SYMBOL_REF) + { + current_sym_addr = tmp; + if (CONSTANT_POOL_ADDRESS_P (current_sym_addr)) + get_pool_constant_mark (current_sym_addr, &marked); + else + marked = true; + } + else if (GET_CODE (tmp) == LABEL_REF) + { + current_sym_addr = tmp; + marked = true; + } + + /* If all references to the constant pool were optimized + out, we just ignore the symbol. */ + if (!marked) + return 0; + } + /* This should be the same condition as in assemble_variable, but we don't have access to dont_output_data here. So, instead, we rely on the fact that error_mark_node initializers always @@ -2453,37 +2492,6 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home) current_sym_code = DBX_STATIC_CONST_VAR_CODE; else { - /* Some ports can transform a symbol ref into a label ref, - because the symbol ref is too far away and has to be - dumped into a constant pool. Alternatively, the symbol - in the constant pool might be referenced by a different - symbol. */ - if (GET_CODE (current_sym_addr) == SYMBOL_REF - && CONSTANT_POOL_ADDRESS_P (current_sym_addr)) - { - bool marked; - rtx tmp = get_pool_constant_mark (current_sym_addr, &marked); - - if (GET_CODE (tmp) == SYMBOL_REF) - { - current_sym_addr = tmp; - if (CONSTANT_POOL_ADDRESS_P (current_sym_addr)) - get_pool_constant_mark (current_sym_addr, &marked); - else - marked = true; - } - else if (GET_CODE (tmp) == LABEL_REF) - { - current_sym_addr = tmp; - marked = true; - } - - /* If all references to the constant pool were optimized - out, we just ignore the symbol. */ - if (!marked) - return 0; - } - /* Ultrix `as' seems to need this. */ #ifdef DBX_STATIC_STAB_DATA_SECTION data_section (); @@ -3037,6 +3045,46 @@ dbxout_args (tree args) } } +/* Subroutine of dbxout_block. Emit an N_LBRAC stab referencing LABEL. + BEGIN_LABEL is the name of the beginning of the function, which may + be required. */ +static void +dbx_output_lbrac (const char *label, + const char *begin_label ATTRIBUTE_UNUSED) +{ +#ifdef DBX_OUTPUT_LBRAC + DBX_OUTPUT_LBRAC (asmfile, label); +#else + fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC); + assemble_name (asmfile, label); +#if DBX_BLOCKS_FUNCTION_RELATIVE + putc ('-', asmfile); + assemble_name (asmfile, begin_label); +#endif + fprintf (asmfile, "\n"); +#endif +} + +/* Subroutine of dbxout_block. Emit an N_RBRAC stab referencing LABEL. + BEGIN_LABEL is the name of the beginning of the function, which may + be required. */ +static void +dbx_output_rbrac (const char *label, + const char *begin_label ATTRIBUTE_UNUSED) +{ +#ifdef DBX_OUTPUT_RBRAC + DBX_OUTPUT_RBRAC (asmfile, label); +#else + fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC); + assemble_name (asmfile, label); +#if DBX_BLOCKS_FUNCTION_RELATIVE + putc ('-', asmfile); + assemble_name (asmfile, begin_label); +#endif + fprintf (asmfile, "\n"); +#endif +} + /* Output everything about a symbol block (a BLOCK node that represents a scope level), including recursive output of contained blocks. @@ -3057,15 +3105,11 @@ dbxout_args (tree args) static void dbxout_block (tree block, int depth, tree args) { - int blocknum = -1; - -#if DBX_BLOCKS_FUNCTION_RELATIVE const char *begin_label; if (current_function_func_begin_label != NULL_TREE) begin_label = IDENTIFIER_POINTER (current_function_func_begin_label); else begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); -#endif while (block) { @@ -3073,6 +3117,7 @@ dbxout_block (tree block, int depth, tree args) if (TREE_USED (block) && TREE_ASM_WRITTEN (block)) { int did_output; + int blocknum = BLOCK_NUMBER (block); /* In dbx format, the syms of a block come before the N_LBRAC. If nothing is output, we don't need the N_LBRAC, either. */ @@ -3086,11 +3131,20 @@ dbxout_block (tree block, int depth, tree args) the block. Use the block's tree-walk order to generate the assembler symbols LBBn and LBEn that final will define around the code in this block. */ - if (depth > 0 && did_output) + if (did_output) { char buf[20]; - blocknum = BLOCK_NUMBER (block); - ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", blocknum); + const char *scope_start; + + if (depth == 0) + /* The outermost block doesn't get LBB labels; use + the function symbol. */ + scope_start = begin_label; + else + { + ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", blocknum); + scope_start = buf; + } if (BLOCK_HANDLER_BLOCK (block)) { @@ -3100,44 +3154,30 @@ dbxout_block (tree block, int depth, tree args) { fprintf (asmfile, "%s\"%s:C1\",%d,0,0,", ASM_STABS_OP, IDENTIFIER_POINTER (DECL_NAME (decl)), N_CATCH); - assemble_name (asmfile, buf); + assemble_name (asmfile, scope_start); fprintf (asmfile, "\n"); decl = TREE_CHAIN (decl); } } - -#ifdef DBX_OUTPUT_LBRAC - DBX_OUTPUT_LBRAC (asmfile, buf); -#else - fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC); - assemble_name (asmfile, buf); -#if DBX_BLOCKS_FUNCTION_RELATIVE - putc ('-', asmfile); - assemble_name (asmfile, begin_label); -#endif - fprintf (asmfile, "\n"); -#endif + dbx_output_lbrac (scope_start, begin_label); } /* Output the subblocks. */ dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE); /* Refer to the marker for the end of the block. */ - if (depth > 0 && did_output) + if (did_output) { - char buf[20]; - ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum); -#ifdef DBX_OUTPUT_RBRAC - DBX_OUTPUT_RBRAC (asmfile, buf); -#else - fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC); - assemble_name (asmfile, buf); -#if DBX_BLOCKS_FUNCTION_RELATIVE - putc ('-', asmfile); - assemble_name (asmfile, begin_label); -#endif - fprintf (asmfile, "\n"); -#endif + char buf[100]; + if (depth == 0) + /* The outermost block doesn't get LBE labels; + use the "scope" label which will be emitted + by dbxout_function_end. */ + ASM_GENERATE_INTERNAL_LABEL (buf, "Lscope", scope_labelno); + else + ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum); + + dbx_output_rbrac (buf, begin_label); } } block = BLOCK_CHAIN (block); diff --git a/contrib/gcc/defaults.h b/contrib/gcc/defaults.h index fff782f..d603547 100644 --- a/contrib/gcc/defaults.h +++ b/contrib/gcc/defaults.h @@ -139,6 +139,12 @@ do { fputs (integer_asm_op (POINTER_SIZE / UNITS_PER_WORD, TRUE), FILE); \ #endif #endif +/* Decide whether to defer emitting the assembler output for an equate + of two values. The default is to not defer output. */ +#ifndef TARGET_DEFERRED_OUTPUT_DEFS +#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false +#endif + /* This is how to output the definition of a user-level label named NAME, such as the label on a static function or variable NAME. */ diff --git a/contrib/gcc/doc/extend.texi b/contrib/gcc/doc/extend.texi index 3785cee..4638645 100644 --- a/contrib/gcc/doc/extend.texi +++ b/contrib/gcc/doc/extend.texi @@ -2048,6 +2048,8 @@ typedef void voidfn (); volatile voidfn fatal; @end smallexample +This approach does not work in GNU C++. + @cindex @code{noinline} function attribute @item noinline This function attribute prevents a function from being considered for @@ -6121,139 +6123,264 @@ v2si __builtin_ia32_pswapdsi (v2si) @node PowerPC AltiVec Built-in Functions @subsection PowerPC AltiVec Built-in Functions -These built-in functions are available for the PowerPC family -of computers, depending on the command-line switches used. +GCC provides an interface for the PowerPC family of processors to access +the AltiVec operations described in Motorola's AltiVec Programming +Interface Manual. The interface is made available by including +@code{<altivec.h>} and using @option{-maltivec} and +@option{-mabi=altivec}. The interface supports the following vector +types. -The following machine modes are available for use with AltiVec built-in -functions (@pxref{Vector Extensions}): @code{V4SI} for a vector of four -32-bit integers, @code{V4SF} for a vector of four 32-bit floating point -numbers, @code{V8HI} for a vector of eight 16-bit integers, and -@code{V16QI} for a vector of sixteen 8-bit integers. +@smallexample +vector unsigned char +vector signed char +vector bool char -The following functions are made available by including -@code{<altivec.h>} and using @option{-maltivec} and -@option{-mabi=altivec}. The functions implement the functionality -described in Motorola's AltiVec Programming Interface Manual. +vector unsigned short +vector signed short +vector bool short +vector pixel + +vector unsigned int +vector signed int +vector bool int +vector float +@end smallexample + +GCC's implementation of the high-level language interface available from +C and C++ code differs from Motorola's documentation in several ways. + +@itemize @bullet + +@item +A vector constant is a list of constant expressions within curly braces. + +@item +A vector initializer requires no cast if the vector constant is of the +same type as the variable it is initializing. -There are a few differences from Motorola's documentation and GCC's -implementation. Vector constants are done with curly braces (not -parentheses). Vector initializers require no casts if the vector -constant is of the same type as the variable it is initializing. The -@code{vector bool} type is deprecated and will be discontinued in -further revisions. Use @code{vector signed} instead. If @code{signed} -or @code{unsigned} is omitted, the vector type will default to -@code{signed}. Lastly, all overloaded functions are implemented with macros -for the C implementation. So code the following example will not work: +@item +If @code{signed} or @code{unsigned} is omitted, the vector type defaults +to @code{signed} for @code{vector int} or @code{vector short} and to +@code{unsigned} for @code{vector char}. + +@item +Compiling with @option{-maltivec} adds keywords @code{__vector}, +@code{__pixel}, and @code{__bool}. Macros @option{vector}, +@code{pixel}, and @code{bool} are defined in @code{<altivec.h>} and can +be undefined. + +@item +GCC allows using a @code{typedef} name as the type specifier for a +vector type. + +@item +For C, overloaded functions are implemented with macros so the following +does not work: @smallexample vec_add ((vector signed int)@{1, 2, 3, 4@}, foo); @end smallexample -Since vec_add is a macro, the vector constant in the above example will -be treated as four different arguments. Wrap the entire argument in -parentheses for this to work. The C++ implementation does not use -macros. +Since @code{vec_add} is a macro, the vector constant in the example +is treated as four separate arguments. Wrap the entire argument in +parentheses for this to work. +@end itemize @emph{Note:} Only the @code{<altivec.h>} interface is supported. Internally, GCC uses built-in functions to achieve the functionality in the aforementioned header file, but they are not supported and are subject to change without notice. -@smallexample -vector signed char vec_abs (vector signed char, vector signed char); -vector signed short vec_abs (vector signed short, vector signed short); -vector signed int vec_abs (vector signed int, vector signed int); -vector signed float vec_abs (vector signed float, vector signed float); +The following interfaces are supported for the generic and specific +AltiVec operations and the AltiVec predicates. In cases where there +is a direct mapping between generic and specific operations, only the +generic names are shown here, although the specific operations can also +be used. -vector signed char vec_abss (vector signed char, vector signed char); -vector signed short vec_abss (vector signed short, vector signed short); +Arguments that are documented as @code{const int} require literal +integral values within the range required for that operation. -vector signed char vec_add (vector signed char, vector signed char); -vector unsigned char vec_add (vector signed char, vector unsigned char); +@smallexample +vector signed char vec_abs (vector signed char); +vector signed short vec_abs (vector signed short); +vector signed int vec_abs (vector signed int); +vector float vec_abs (vector float); -vector unsigned char vec_add (vector unsigned char, vector signed char); +vector signed char vec_abss (vector signed char); +vector signed short vec_abss (vector signed short); +vector signed int vec_abss (vector signed int); +vector signed char vec_add (vector bool char, vector signed char); +vector signed char vec_add (vector signed char, vector bool char); +vector signed char vec_add (vector signed char, vector signed char); +vector unsigned char vec_add (vector bool char, vector unsigned char); +vector unsigned char vec_add (vector unsigned char, vector bool char); vector unsigned char vec_add (vector unsigned char, vector unsigned char); +vector signed short vec_add (vector bool short, vector signed short); +vector signed short vec_add (vector signed short, vector bool short); vector signed short vec_add (vector signed short, vector signed short); -vector unsigned short vec_add (vector signed short, +vector unsigned short vec_add (vector bool short, vector unsigned short); vector unsigned short vec_add (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_add (vector unsigned short, vector unsigned short); +vector signed int vec_add (vector bool int, vector signed int); +vector signed int vec_add (vector signed int, vector bool int); vector signed int vec_add (vector signed int, vector signed int); -vector unsigned int vec_add (vector signed int, vector unsigned int); -vector unsigned int vec_add (vector unsigned int, vector signed int); +vector unsigned int vec_add (vector bool int, vector unsigned int); +vector unsigned int vec_add (vector unsigned int, vector bool int); vector unsigned int vec_add (vector unsigned int, vector unsigned int); vector float vec_add (vector float, vector float); +vector float vec_vaddfp (vector float, vector float); + +vector signed int vec_vadduwm (vector bool int, vector signed int); +vector signed int vec_vadduwm (vector signed int, vector bool int); +vector signed int vec_vadduwm (vector signed int, vector signed int); +vector unsigned int vec_vadduwm (vector bool int, vector unsigned int); +vector unsigned int vec_vadduwm (vector unsigned int, vector bool int); +vector unsigned int vec_vadduwm (vector unsigned int, + vector unsigned int); + +vector signed short vec_vadduhm (vector bool short, + vector signed short); +vector signed short vec_vadduhm (vector signed short, + vector bool short); +vector signed short vec_vadduhm (vector signed short, + vector signed short); +vector unsigned short vec_vadduhm (vector bool short, + vector unsigned short); +vector unsigned short vec_vadduhm (vector unsigned short, + vector bool short); +vector unsigned short vec_vadduhm (vector unsigned short, + vector unsigned short); + +vector signed char vec_vaddubm (vector bool char, vector signed char); +vector signed char vec_vaddubm (vector signed char, vector bool char); +vector signed char vec_vaddubm (vector signed char, vector signed char); +vector unsigned char vec_vaddubm (vector bool char, + vector unsigned char); +vector unsigned char vec_vaddubm (vector unsigned char, + vector bool char); +vector unsigned char vec_vaddubm (vector unsigned char, + vector unsigned char); + vector unsigned int vec_addc (vector unsigned int, vector unsigned int); -vector unsigned char vec_adds (vector signed char, - vector unsigned char); -vector unsigned char vec_adds (vector unsigned char, - vector signed char); +vector unsigned char vec_adds (vector bool char, vector unsigned char); +vector unsigned char vec_adds (vector unsigned char, vector bool char); vector unsigned char vec_adds (vector unsigned char, vector unsigned char); +vector signed char vec_adds (vector bool char, vector signed char); +vector signed char vec_adds (vector signed char, vector bool char); vector signed char vec_adds (vector signed char, vector signed char); -vector unsigned short vec_adds (vector signed short, +vector unsigned short vec_adds (vector bool short, vector unsigned short); vector unsigned short vec_adds (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_adds (vector unsigned short, vector unsigned short); +vector signed short vec_adds (vector bool short, vector signed short); +vector signed short vec_adds (vector signed short, vector bool short); vector signed short vec_adds (vector signed short, vector signed short); - -vector unsigned int vec_adds (vector signed int, vector unsigned int); -vector unsigned int vec_adds (vector unsigned int, vector signed int); +vector unsigned int vec_adds (vector bool int, vector unsigned int); +vector unsigned int vec_adds (vector unsigned int, vector bool int); vector unsigned int vec_adds (vector unsigned int, vector unsigned int); - +vector signed int vec_adds (vector bool int, vector signed int); +vector signed int vec_adds (vector signed int, vector bool int); vector signed int vec_adds (vector signed int, vector signed int); +vector signed int vec_vaddsws (vector bool int, vector signed int); +vector signed int vec_vaddsws (vector signed int, vector bool int); +vector signed int vec_vaddsws (vector signed int, vector signed int); + +vector unsigned int vec_vadduws (vector bool int, vector unsigned int); +vector unsigned int vec_vadduws (vector unsigned int, vector bool int); +vector unsigned int vec_vadduws (vector unsigned int, + vector unsigned int); + +vector signed short vec_vaddshs (vector bool short, + vector signed short); +vector signed short vec_vaddshs (vector signed short, + vector bool short); +vector signed short vec_vaddshs (vector signed short, + vector signed short); + +vector unsigned short vec_vadduhs (vector bool short, + vector unsigned short); +vector unsigned short vec_vadduhs (vector unsigned short, + vector bool short); +vector unsigned short vec_vadduhs (vector unsigned short, + vector unsigned short); + +vector signed char vec_vaddsbs (vector bool char, vector signed char); +vector signed char vec_vaddsbs (vector signed char, vector bool char); +vector signed char vec_vaddsbs (vector signed char, vector signed char); + +vector unsigned char vec_vaddubs (vector bool char, + vector unsigned char); +vector unsigned char vec_vaddubs (vector unsigned char, + vector bool char); +vector unsigned char vec_vaddubs (vector unsigned char, + vector unsigned char); + vector float vec_and (vector float, vector float); -vector float vec_and (vector float, vector signed int); -vector float vec_and (vector signed int, vector float); +vector float vec_and (vector float, vector bool int); +vector float vec_and (vector bool int, vector float); +vector bool int vec_and (vector bool int, vector bool int); +vector signed int vec_and (vector bool int, vector signed int); +vector signed int vec_and (vector signed int, vector bool int); vector signed int vec_and (vector signed int, vector signed int); -vector unsigned int vec_and (vector signed int, vector unsigned int); -vector unsigned int vec_and (vector unsigned int, vector signed int); +vector unsigned int vec_and (vector bool int, vector unsigned int); +vector unsigned int vec_and (vector unsigned int, vector bool int); vector unsigned int vec_and (vector unsigned int, vector unsigned int); +vector bool short vec_and (vector bool short, vector bool short); +vector signed short vec_and (vector bool short, vector signed short); +vector signed short vec_and (vector signed short, vector bool short); vector signed short vec_and (vector signed short, vector signed short); -vector unsigned short vec_and (vector signed short, +vector unsigned short vec_and (vector bool short, vector unsigned short); vector unsigned short vec_and (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_and (vector unsigned short, vector unsigned short); +vector signed char vec_and (vector bool char, vector signed char); +vector bool char vec_and (vector bool char, vector bool char); +vector signed char vec_and (vector signed char, vector bool char); vector signed char vec_and (vector signed char, vector signed char); -vector unsigned char vec_and (vector signed char, vector unsigned char); - -vector unsigned char vec_and (vector unsigned char, vector signed char); - +vector unsigned char vec_and (vector bool char, vector unsigned char); +vector unsigned char vec_and (vector unsigned char, vector bool char); vector unsigned char vec_and (vector unsigned char, vector unsigned char); vector float vec_andc (vector float, vector float); -vector float vec_andc (vector float, vector signed int); -vector float vec_andc (vector signed int, vector float); +vector float vec_andc (vector float, vector bool int); +vector float vec_andc (vector bool int, vector float); +vector bool int vec_andc (vector bool int, vector bool int); +vector signed int vec_andc (vector bool int, vector signed int); +vector signed int vec_andc (vector signed int, vector bool int); vector signed int vec_andc (vector signed int, vector signed int); -vector unsigned int vec_andc (vector signed int, vector unsigned int); -vector unsigned int vec_andc (vector unsigned int, vector signed int); +vector unsigned int vec_andc (vector bool int, vector unsigned int); +vector unsigned int vec_andc (vector unsigned int, vector bool int); vector unsigned int vec_andc (vector unsigned int, vector unsigned int); - +vector bool short vec_andc (vector bool short, vector bool short); +vector signed short vec_andc (vector bool short, vector signed short); +vector signed short vec_andc (vector signed short, vector bool short); vector signed short vec_andc (vector signed short, vector signed short); - -vector unsigned short vec_andc (vector signed short, +vector unsigned short vec_andc (vector bool short, vector unsigned short); vector unsigned short vec_andc (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_andc (vector unsigned short, vector unsigned short); +vector signed char vec_andc (vector bool char, vector signed char); +vector bool char vec_andc (vector bool char, vector bool char); +vector signed char vec_andc (vector signed char, vector bool char); vector signed char vec_andc (vector signed char, vector signed char); -vector unsigned char vec_andc (vector signed char, - vector unsigned char); -vector unsigned char vec_andc (vector unsigned char, - vector signed char); +vector unsigned char vec_andc (vector bool char, vector unsigned char); +vector unsigned char vec_andc (vector unsigned char, vector bool char); vector unsigned char vec_andc (vector unsigned char, vector unsigned char); @@ -6266,185 +6393,471 @@ vector signed short vec_avg (vector signed short, vector signed short); vector unsigned int vec_avg (vector unsigned int, vector unsigned int); vector signed int vec_avg (vector signed int, vector signed int); +vector signed int vec_vavgsw (vector signed int, vector signed int); + +vector unsigned int vec_vavguw (vector unsigned int, + vector unsigned int); + +vector signed short vec_vavgsh (vector signed short, + vector signed short); + +vector unsigned short vec_vavguh (vector unsigned short, + vector unsigned short); + +vector signed char vec_vavgsb (vector signed char, vector signed char); + +vector unsigned char vec_vavgub (vector unsigned char, + vector unsigned char); + vector float vec_ceil (vector float); vector signed int vec_cmpb (vector float, vector float); -vector signed char vec_cmpeq (vector signed char, vector signed char); -vector signed char vec_cmpeq (vector unsigned char, - vector unsigned char); -vector signed short vec_cmpeq (vector signed short, - vector signed short); -vector signed short vec_cmpeq (vector unsigned short, - vector unsigned short); -vector signed int vec_cmpeq (vector signed int, vector signed int); -vector signed int vec_cmpeq (vector unsigned int, vector unsigned int); -vector signed int vec_cmpeq (vector float, vector float); +vector bool char vec_cmpeq (vector signed char, vector signed char); +vector bool char vec_cmpeq (vector unsigned char, vector unsigned char); +vector bool short vec_cmpeq (vector signed short, vector signed short); +vector bool short vec_cmpeq (vector unsigned short, + vector unsigned short); +vector bool int vec_cmpeq (vector signed int, vector signed int); +vector bool int vec_cmpeq (vector unsigned int, vector unsigned int); +vector bool int vec_cmpeq (vector float, vector float); -vector signed int vec_cmpge (vector float, vector float); +vector bool int vec_vcmpeqfp (vector float, vector float); -vector signed char vec_cmpgt (vector unsigned char, - vector unsigned char); -vector signed char vec_cmpgt (vector signed char, vector signed char); -vector signed short vec_cmpgt (vector unsigned short, - vector unsigned short); -vector signed short vec_cmpgt (vector signed short, - vector signed short); -vector signed int vec_cmpgt (vector unsigned int, vector unsigned int); -vector signed int vec_cmpgt (vector signed int, vector signed int); -vector signed int vec_cmpgt (vector float, vector float); +vector bool int vec_vcmpequw (vector signed int, vector signed int); +vector bool int vec_vcmpequw (vector unsigned int, vector unsigned int); -vector signed int vec_cmple (vector float, vector float); +vector bool short vec_vcmpequh (vector signed short, + vector signed short); +vector bool short vec_vcmpequh (vector unsigned short, + vector unsigned short); -vector signed char vec_cmplt (vector unsigned char, - vector unsigned char); -vector signed char vec_cmplt (vector signed char, vector signed char); -vector signed short vec_cmplt (vector unsigned short, - vector unsigned short); -vector signed short vec_cmplt (vector signed short, - vector signed short); -vector signed int vec_cmplt (vector unsigned int, vector unsigned int); -vector signed int vec_cmplt (vector signed int, vector signed int); -vector signed int vec_cmplt (vector float, vector float); +vector bool char vec_vcmpequb (vector signed char, vector signed char); +vector bool char vec_vcmpequb (vector unsigned char, + vector unsigned char); + +vector bool int vec_cmpge (vector float, vector float); + +vector bool char vec_cmpgt (vector unsigned char, vector unsigned char); +vector bool char vec_cmpgt (vector signed char, vector signed char); +vector bool short vec_cmpgt (vector unsigned short, + vector unsigned short); +vector bool short vec_cmpgt (vector signed short, vector signed short); +vector bool int vec_cmpgt (vector unsigned int, vector unsigned int); +vector bool int vec_cmpgt (vector signed int, vector signed int); +vector bool int vec_cmpgt (vector float, vector float); -vector float vec_ctf (vector unsigned int, const char); -vector float vec_ctf (vector signed int, const char); +vector bool int vec_vcmpgtfp (vector float, vector float); -vector signed int vec_cts (vector float, const char); +vector bool int vec_vcmpgtsw (vector signed int, vector signed int); -vector unsigned int vec_ctu (vector float, const char); +vector bool int vec_vcmpgtuw (vector unsigned int, vector unsigned int); -void vec_dss (const char); +vector bool short vec_vcmpgtsh (vector signed short, + vector signed short); + +vector bool short vec_vcmpgtuh (vector unsigned short, + vector unsigned short); + +vector bool char vec_vcmpgtsb (vector signed char, vector signed char); + +vector bool char vec_vcmpgtub (vector unsigned char, + vector unsigned char); + +vector bool int vec_cmple (vector float, vector float); + +vector bool char vec_cmplt (vector unsigned char, vector unsigned char); +vector bool char vec_cmplt (vector signed char, vector signed char); +vector bool short vec_cmplt (vector unsigned short, + vector unsigned short); +vector bool short vec_cmplt (vector signed short, vector signed short); +vector bool int vec_cmplt (vector unsigned int, vector unsigned int); +vector bool int vec_cmplt (vector signed int, vector signed int); +vector bool int vec_cmplt (vector float, vector float); + +vector float vec_ctf (vector unsigned int, const int); +vector float vec_ctf (vector signed int, const int); + +vector float vec_vcfsx (vector signed int, const int); + +vector float vec_vcfux (vector unsigned int, const int); + +vector signed int vec_cts (vector float, const int); + +vector unsigned int vec_ctu (vector float, const int); + +void vec_dss (const int); void vec_dssall (void); -void vec_dst (void *, int, const char); - -void vec_dstst (void *, int, const char); - -void vec_dststt (void *, int, const char); - -void vec_dstt (void *, int, const char); - -vector float vec_expte (vector float, vector float); - -vector float vec_floor (vector float, vector float); - -vector float vec_ld (int, vector float *); -vector float vec_ld (int, float *): -vector signed int vec_ld (int, int *); -vector signed int vec_ld (int, vector signed int *); -vector unsigned int vec_ld (int, vector unsigned int *); -vector unsigned int vec_ld (int, unsigned int *); -vector signed short vec_ld (int, short *, vector signed short *); -vector unsigned short vec_ld (int, unsigned short *, - vector unsigned short *); -vector signed char vec_ld (int, signed char *); -vector signed char vec_ld (int, vector signed char *); -vector unsigned char vec_ld (int, unsigned char *); -vector unsigned char vec_ld (int, vector unsigned char *); - -vector signed char vec_lde (int, signed char *); -vector unsigned char vec_lde (int, unsigned char *); -vector signed short vec_lde (int, short *); -vector unsigned short vec_lde (int, unsigned short *); -vector float vec_lde (int, float *); -vector signed int vec_lde (int, int *); -vector unsigned int vec_lde (int, unsigned int *); - -void float vec_ldl (int, float *); -void float vec_ldl (int, vector float *); -void signed int vec_ldl (int, vector signed int *); -void signed int vec_ldl (int, int *); -void unsigned int vec_ldl (int, unsigned int *); -void unsigned int vec_ldl (int, vector unsigned int *); -void signed short vec_ldl (int, vector signed short *); -void signed short vec_ldl (int, short *); -void unsigned short vec_ldl (int, vector unsigned short *); -void unsigned short vec_ldl (int, unsigned short *); -void signed char vec_ldl (int, vector signed char *); -void signed char vec_ldl (int, signed char *); -void unsigned char vec_ldl (int, vector unsigned char *); -void unsigned char vec_ldl (int, unsigned char *); +void vec_dst (const vector unsigned char *, int, const int); +void vec_dst (const vector signed char *, int, const int); +void vec_dst (const vector bool char *, int, const int); +void vec_dst (const vector unsigned short *, int, const int); +void vec_dst (const vector signed short *, int, const int); +void vec_dst (const vector bool short *, int, const int); +void vec_dst (const vector pixel *, int, const int); +void vec_dst (const vector unsigned int *, int, const int); +void vec_dst (const vector signed int *, int, const int); +void vec_dst (const vector bool int *, int, const int); +void vec_dst (const vector float *, int, const int); +void vec_dst (const unsigned char *, int, const int); +void vec_dst (const signed char *, int, const int); +void vec_dst (const unsigned short *, int, const int); +void vec_dst (const short *, int, const int); +void vec_dst (const unsigned int *, int, const int); +void vec_dst (const int *, int, const int); +void vec_dst (const unsigned long *, int, const int); +void vec_dst (const long *, int, const int); +void vec_dst (const float *, int, const int); + +void vec_dstst (const vector unsigned char *, int, const int); +void vec_dstst (const vector signed char *, int, const int); +void vec_dstst (const vector bool char *, int, const int); +void vec_dstst (const vector unsigned short *, int, const int); +void vec_dstst (const vector signed short *, int, const int); +void vec_dstst (const vector bool short *, int, const int); +void vec_dstst (const vector pixel *, int, const int); +void vec_dstst (const vector unsigned int *, int, const int); +void vec_dstst (const vector signed int *, int, const int); +void vec_dstst (const vector bool int *, int, const int); +void vec_dstst (const vector float *, int, const int); +void vec_dstst (const unsigned char *, int, const int); +void vec_dstst (const signed char *, int, const int); +void vec_dstst (const unsigned short *, int, const int); +void vec_dstst (const short *, int, const int); +void vec_dstst (const unsigned int *, int, const int); +void vec_dstst (const int *, int, const int); +void vec_dstst (const unsigned long *, int, const int); +void vec_dstst (const long *, int, const int); +void vec_dstst (const float *, int, const int); + +void vec_dststt (const vector unsigned char *, int, const int); +void vec_dststt (const vector signed char *, int, const int); +void vec_dststt (const vector bool char *, int, const int); +void vec_dststt (const vector unsigned short *, int, const int); +void vec_dststt (const vector signed short *, int, const int); +void vec_dststt (const vector bool short *, int, const int); +void vec_dststt (const vector pixel *, int, const int); +void vec_dststt (const vector unsigned int *, int, const int); +void vec_dststt (const vector signed int *, int, const int); +void vec_dststt (const vector bool int *, int, const int); +void vec_dststt (const vector float *, int, const int); +void vec_dststt (const unsigned char *, int, const int); +void vec_dststt (const signed char *, int, const int); +void vec_dststt (const unsigned short *, int, const int); +void vec_dststt (const short *, int, const int); +void vec_dststt (const unsigned int *, int, const int); +void vec_dststt (const int *, int, const int); +void vec_dststt (const unsigned long *, int, const int); +void vec_dststt (const long *, int, const int); +void vec_dststt (const float *, int, const int); + +void vec_dstt (const vector unsigned char *, int, const int); +void vec_dstt (const vector signed char *, int, const int); +void vec_dstt (const vector bool char *, int, const int); +void vec_dstt (const vector unsigned short *, int, const int); +void vec_dstt (const vector signed short *, int, const int); +void vec_dstt (const vector bool short *, int, const int); +void vec_dstt (const vector pixel *, int, const int); +void vec_dstt (const vector unsigned int *, int, const int); +void vec_dstt (const vector signed int *, int, const int); +void vec_dstt (const vector bool int *, int, const int); +void vec_dstt (const vector float *, int, const int); +void vec_dstt (const unsigned char *, int, const int); +void vec_dstt (const signed char *, int, const int); +void vec_dstt (const unsigned short *, int, const int); +void vec_dstt (const short *, int, const int); +void vec_dstt (const unsigned int *, int, const int); +void vec_dstt (const int *, int, const int); +void vec_dstt (const unsigned long *, int, const int); +void vec_dstt (const long *, int, const int); +void vec_dstt (const float *, int, const int); + +vector float vec_expte (vector float); + +vector float vec_floor (vector float); + +vector float vec_ld (int, const vector float *); +vector float vec_ld (int, const float *); +vector bool int vec_ld (int, const vector bool int *); +vector signed int vec_ld (int, const vector signed int *); +vector signed int vec_ld (int, const int *); +vector signed int vec_ld (int, const long *); +vector unsigned int vec_ld (int, const vector unsigned int *); +vector unsigned int vec_ld (int, const unsigned int *); +vector unsigned int vec_ld (int, const unsigned long *); +vector bool short vec_ld (int, const vector bool short *); +vector pixel vec_ld (int, const vector pixel *); +vector signed short vec_ld (int, const vector signed short *); +vector signed short vec_ld (int, const short *); +vector unsigned short vec_ld (int, const vector unsigned short *); +vector unsigned short vec_ld (int, const unsigned short *); +vector bool char vec_ld (int, const vector bool char *); +vector signed char vec_ld (int, const vector signed char *); +vector signed char vec_ld (int, const signed char *); +vector unsigned char vec_ld (int, const vector unsigned char *); +vector unsigned char vec_ld (int, const unsigned char *); + +vector signed char vec_lde (int, const signed char *); +vector unsigned char vec_lde (int, const unsigned char *); +vector signed short vec_lde (int, const short *); +vector unsigned short vec_lde (int, const unsigned short *); +vector float vec_lde (int, const float *); +vector signed int vec_lde (int, const int *); +vector unsigned int vec_lde (int, const unsigned int *); +vector signed int vec_lde (int, const long *); +vector unsigned int vec_lde (int, const unsigned long *); + +vector float vec_lvewx (int, float *); +vector signed int vec_lvewx (int, int *); +vector unsigned int vec_lvewx (int, unsigned int *); +vector signed int vec_lvewx (int, long *); +vector unsigned int vec_lvewx (int, unsigned long *); + +vector signed short vec_lvehx (int, short *); +vector unsigned short vec_lvehx (int, unsigned short *); + +vector signed char vec_lvebx (int, char *); +vector unsigned char vec_lvebx (int, unsigned char *); + +vector float vec_ldl (int, const vector float *); +vector float vec_ldl (int, const float *); +vector bool int vec_ldl (int, const vector bool int *); +vector signed int vec_ldl (int, const vector signed int *); +vector signed int vec_ldl (int, const int *); +vector signed int vec_ldl (int, const long *); +vector unsigned int vec_ldl (int, const vector unsigned int *); +vector unsigned int vec_ldl (int, const unsigned int *); +vector unsigned int vec_ldl (int, const unsigned long *); +vector bool short vec_ldl (int, const vector bool short *); +vector pixel vec_ldl (int, const vector pixel *); +vector signed short vec_ldl (int, const vector signed short *); +vector signed short vec_ldl (int, const short *); +vector unsigned short vec_ldl (int, const vector unsigned short *); +vector unsigned short vec_ldl (int, const unsigned short *); +vector bool char vec_ldl (int, const vector bool char *); +vector signed char vec_ldl (int, const vector signed char *); +vector signed char vec_ldl (int, const signed char *); +vector unsigned char vec_ldl (int, const vector unsigned char *); +vector unsigned char vec_ldl (int, const unsigned char *); vector float vec_loge (vector float); -vector unsigned char vec_lvsl (int, void *, int *); - -vector unsigned char vec_lvsr (int, void *, int *); +vector unsigned char vec_lvsl (int, const volatile unsigned char *); +vector unsigned char vec_lvsl (int, const volatile signed char *); +vector unsigned char vec_lvsl (int, const volatile unsigned short *); +vector unsigned char vec_lvsl (int, const volatile short *); +vector unsigned char vec_lvsl (int, const volatile unsigned int *); +vector unsigned char vec_lvsl (int, const volatile int *); +vector unsigned char vec_lvsl (int, const volatile unsigned long *); +vector unsigned char vec_lvsl (int, const volatile long *); +vector unsigned char vec_lvsl (int, const volatile float *); + +vector unsigned char vec_lvsr (int, const volatile unsigned char *); +vector unsigned char vec_lvsr (int, const volatile signed char *); +vector unsigned char vec_lvsr (int, const volatile unsigned short *); +vector unsigned char vec_lvsr (int, const volatile short *); +vector unsigned char vec_lvsr (int, const volatile unsigned int *); +vector unsigned char vec_lvsr (int, const volatile int *); +vector unsigned char vec_lvsr (int, const volatile unsigned long *); +vector unsigned char vec_lvsr (int, const volatile long *); +vector unsigned char vec_lvsr (int, const volatile float *); vector float vec_madd (vector float, vector float, vector float); -vector signed short vec_madds (vector signed short, vector signed short, +vector signed short vec_madds (vector signed short, + vector signed short, vector signed short); -vector unsigned char vec_max (vector signed char, vector unsigned char); - -vector unsigned char vec_max (vector unsigned char, vector signed char); - +vector unsigned char vec_max (vector bool char, vector unsigned char); +vector unsigned char vec_max (vector unsigned char, vector bool char); vector unsigned char vec_max (vector unsigned char, vector unsigned char); +vector signed char vec_max (vector bool char, vector signed char); +vector signed char vec_max (vector signed char, vector bool char); vector signed char vec_max (vector signed char, vector signed char); -vector unsigned short vec_max (vector signed short, +vector unsigned short vec_max (vector bool short, vector unsigned short); vector unsigned short vec_max (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_max (vector unsigned short, vector unsigned short); +vector signed short vec_max (vector bool short, vector signed short); +vector signed short vec_max (vector signed short, vector bool short); vector signed short vec_max (vector signed short, vector signed short); -vector unsigned int vec_max (vector signed int, vector unsigned int); -vector unsigned int vec_max (vector unsigned int, vector signed int); +vector unsigned int vec_max (vector bool int, vector unsigned int); +vector unsigned int vec_max (vector unsigned int, vector bool int); vector unsigned int vec_max (vector unsigned int, vector unsigned int); +vector signed int vec_max (vector bool int, vector signed int); +vector signed int vec_max (vector signed int, vector bool int); vector signed int vec_max (vector signed int, vector signed int); vector float vec_max (vector float, vector float); +vector float vec_vmaxfp (vector float, vector float); + +vector signed int vec_vmaxsw (vector bool int, vector signed int); +vector signed int vec_vmaxsw (vector signed int, vector bool int); +vector signed int vec_vmaxsw (vector signed int, vector signed int); + +vector unsigned int vec_vmaxuw (vector bool int, vector unsigned int); +vector unsigned int vec_vmaxuw (vector unsigned int, vector bool int); +vector unsigned int vec_vmaxuw (vector unsigned int, + vector unsigned int); + +vector signed short vec_vmaxsh (vector bool short, vector signed short); +vector signed short vec_vmaxsh (vector signed short, vector bool short); +vector signed short vec_vmaxsh (vector signed short, + vector signed short); + +vector unsigned short vec_vmaxuh (vector bool short, + vector unsigned short); +vector unsigned short vec_vmaxuh (vector unsigned short, + vector bool short); +vector unsigned short vec_vmaxuh (vector unsigned short, + vector unsigned short); + +vector signed char vec_vmaxsb (vector bool char, vector signed char); +vector signed char vec_vmaxsb (vector signed char, vector bool char); +vector signed char vec_vmaxsb (vector signed char, vector signed char); + +vector unsigned char vec_vmaxub (vector bool char, + vector unsigned char); +vector unsigned char vec_vmaxub (vector unsigned char, + vector bool char); +vector unsigned char vec_vmaxub (vector unsigned char, + vector unsigned char); + +vector bool char vec_mergeh (vector bool char, vector bool char); vector signed char vec_mergeh (vector signed char, vector signed char); vector unsigned char vec_mergeh (vector unsigned char, vector unsigned char); +vector bool short vec_mergeh (vector bool short, vector bool short); +vector pixel vec_mergeh (vector pixel, vector pixel); vector signed short vec_mergeh (vector signed short, vector signed short); vector unsigned short vec_mergeh (vector unsigned short, vector unsigned short); vector float vec_mergeh (vector float, vector float); +vector bool int vec_mergeh (vector bool int, vector bool int); vector signed int vec_mergeh (vector signed int, vector signed int); vector unsigned int vec_mergeh (vector unsigned int, vector unsigned int); +vector float vec_vmrghw (vector float, vector float); +vector bool int vec_vmrghw (vector bool int, vector bool int); +vector signed int vec_vmrghw (vector signed int, vector signed int); +vector unsigned int vec_vmrghw (vector unsigned int, + vector unsigned int); + +vector bool short vec_vmrghh (vector bool short, vector bool short); +vector signed short vec_vmrghh (vector signed short, + vector signed short); +vector unsigned short vec_vmrghh (vector unsigned short, + vector unsigned short); +vector pixel vec_vmrghh (vector pixel, vector pixel); + +vector bool char vec_vmrghb (vector bool char, vector bool char); +vector signed char vec_vmrghb (vector signed char, vector signed char); +vector unsigned char vec_vmrghb (vector unsigned char, + vector unsigned char); + +vector bool char vec_mergel (vector bool char, vector bool char); vector signed char vec_mergel (vector signed char, vector signed char); vector unsigned char vec_mergel (vector unsigned char, vector unsigned char); +vector bool short vec_mergel (vector bool short, vector bool short); +vector pixel vec_mergel (vector pixel, vector pixel); vector signed short vec_mergel (vector signed short, vector signed short); vector unsigned short vec_mergel (vector unsigned short, vector unsigned short); vector float vec_mergel (vector float, vector float); +vector bool int vec_mergel (vector bool int, vector bool int); vector signed int vec_mergel (vector signed int, vector signed int); vector unsigned int vec_mergel (vector unsigned int, vector unsigned int); -vector unsigned short vec_mfvscr (void); +vector float vec_vmrglw (vector float, vector float); +vector signed int vec_vmrglw (vector signed int, vector signed int); +vector unsigned int vec_vmrglw (vector unsigned int, + vector unsigned int); +vector bool int vec_vmrglw (vector bool int, vector bool int); + +vector bool short vec_vmrglh (vector bool short, vector bool short); +vector signed short vec_vmrglh (vector signed short, + vector signed short); +vector unsigned short vec_vmrglh (vector unsigned short, + vector unsigned short); +vector pixel vec_vmrglh (vector pixel, vector pixel); -vector unsigned char vec_min (vector signed char, vector unsigned char); +vector bool char vec_vmrglb (vector bool char, vector bool char); +vector signed char vec_vmrglb (vector signed char, vector signed char); +vector unsigned char vec_vmrglb (vector unsigned char, + vector unsigned char); -vector unsigned char vec_min (vector unsigned char, vector signed char); +vector unsigned short vec_mfvscr (void); +vector unsigned char vec_min (vector bool char, vector unsigned char); +vector unsigned char vec_min (vector unsigned char, vector bool char); vector unsigned char vec_min (vector unsigned char, vector unsigned char); +vector signed char vec_min (vector bool char, vector signed char); +vector signed char vec_min (vector signed char, vector bool char); vector signed char vec_min (vector signed char, vector signed char); -vector unsigned short vec_min (vector signed short, +vector unsigned short vec_min (vector bool short, vector unsigned short); vector unsigned short vec_min (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_min (vector unsigned short, vector unsigned short); +vector signed short vec_min (vector bool short, vector signed short); +vector signed short vec_min (vector signed short, vector bool short); vector signed short vec_min (vector signed short, vector signed short); -vector unsigned int vec_min (vector signed int, vector unsigned int); -vector unsigned int vec_min (vector unsigned int, vector signed int); +vector unsigned int vec_min (vector bool int, vector unsigned int); +vector unsigned int vec_min (vector unsigned int, vector bool int); vector unsigned int vec_min (vector unsigned int, vector unsigned int); +vector signed int vec_min (vector bool int, vector signed int); +vector signed int vec_min (vector signed int, vector bool int); vector signed int vec_min (vector signed int, vector signed int); vector float vec_min (vector float, vector float); -vector signed short vec_mladd (vector signed short, vector signed short, +vector float vec_vminfp (vector float, vector float); + +vector signed int vec_vminsw (vector bool int, vector signed int); +vector signed int vec_vminsw (vector signed int, vector bool int); +vector signed int vec_vminsw (vector signed int, vector signed int); + +vector unsigned int vec_vminuw (vector bool int, vector unsigned int); +vector unsigned int vec_vminuw (vector unsigned int, vector bool int); +vector unsigned int vec_vminuw (vector unsigned int, + vector unsigned int); + +vector signed short vec_vminsh (vector bool short, vector signed short); +vector signed short vec_vminsh (vector signed short, vector bool short); +vector signed short vec_vminsh (vector signed short, + vector signed short); + +vector unsigned short vec_vminuh (vector bool short, + vector unsigned short); +vector unsigned short vec_vminuh (vector unsigned short, + vector bool short); +vector unsigned short vec_vminuh (vector unsigned short, + vector unsigned short); + +vector signed char vec_vminsb (vector bool char, vector signed char); +vector signed char vec_vminsb (vector signed char, vector bool char); +vector signed char vec_vminsb (vector signed char, vector signed char); + +vector unsigned char vec_vminub (vector bool char, + vector unsigned char); +vector unsigned char vec_vminub (vector unsigned char, + vector bool char); +vector unsigned char vec_vminub (vector unsigned char, + vector unsigned char); + +vector signed short vec_mladd (vector signed short, + vector signed short, vector signed short); vector signed short vec_mladd (vector signed short, vector unsigned short, @@ -6463,34 +6876,78 @@ vector signed short vec_mradds (vector signed short, vector unsigned int vec_msum (vector unsigned char, vector unsigned char, vector unsigned int); -vector signed int vec_msum (vector signed char, vector unsigned char, +vector signed int vec_msum (vector signed char, + vector unsigned char, vector signed int); vector unsigned int vec_msum (vector unsigned short, vector unsigned short, vector unsigned int); -vector signed int vec_msum (vector signed short, vector signed short, +vector signed int vec_msum (vector signed short, + vector signed short, vector signed int); +vector signed int vec_vmsumshm (vector signed short, + vector signed short, + vector signed int); + +vector unsigned int vec_vmsumuhm (vector unsigned short, + vector unsigned short, + vector unsigned int); + +vector signed int vec_vmsummbm (vector signed char, + vector unsigned char, + vector signed int); + +vector unsigned int vec_vmsumubm (vector unsigned char, + vector unsigned char, + vector unsigned int); + vector unsigned int vec_msums (vector unsigned short, vector unsigned short, vector unsigned int); -vector signed int vec_msums (vector signed short, vector signed short, +vector signed int vec_msums (vector signed short, + vector signed short, vector signed int); +vector signed int vec_vmsumshs (vector signed short, + vector signed short, + vector signed int); + +vector unsigned int vec_vmsumuhs (vector unsigned short, + vector unsigned short, + vector unsigned int); + void vec_mtvscr (vector signed int); void vec_mtvscr (vector unsigned int); +void vec_mtvscr (vector bool int); void vec_mtvscr (vector signed short); void vec_mtvscr (vector unsigned short); +void vec_mtvscr (vector bool short); +void vec_mtvscr (vector pixel); void vec_mtvscr (vector signed char); void vec_mtvscr (vector unsigned char); +void vec_mtvscr (vector bool char); vector unsigned short vec_mule (vector unsigned char, vector unsigned char); -vector signed short vec_mule (vector signed char, vector signed char); +vector signed short vec_mule (vector signed char, + vector signed char); vector unsigned int vec_mule (vector unsigned short, vector unsigned short); vector signed int vec_mule (vector signed short, vector signed short); +vector signed int vec_vmulesh (vector signed short, + vector signed short); + +vector unsigned int vec_vmuleuh (vector unsigned short, + vector unsigned short); + +vector signed short vec_vmulesb (vector signed char, + vector signed char); + +vector unsigned short vec_vmuleub (vector unsigned char, + vector unsigned char); + vector unsigned short vec_mulo (vector unsigned char, vector unsigned char); vector signed short vec_mulo (vector signed char, vector signed char); @@ -6498,56 +6955,100 @@ vector unsigned int vec_mulo (vector unsigned short, vector unsigned short); vector signed int vec_mulo (vector signed short, vector signed short); +vector signed int vec_vmulosh (vector signed short, + vector signed short); + +vector unsigned int vec_vmulouh (vector unsigned short, + vector unsigned short); + +vector signed short vec_vmulosb (vector signed char, + vector signed char); + +vector unsigned short vec_vmuloub (vector unsigned char, + vector unsigned char); + vector float vec_nmsub (vector float, vector float, vector float); vector float vec_nor (vector float, vector float); vector signed int vec_nor (vector signed int, vector signed int); vector unsigned int vec_nor (vector unsigned int, vector unsigned int); +vector bool int vec_nor (vector bool int, vector bool int); vector signed short vec_nor (vector signed short, vector signed short); vector unsigned short vec_nor (vector unsigned short, vector unsigned short); +vector bool short vec_nor (vector bool short, vector bool short); vector signed char vec_nor (vector signed char, vector signed char); vector unsigned char vec_nor (vector unsigned char, vector unsigned char); +vector bool char vec_nor (vector bool char, vector bool char); vector float vec_or (vector float, vector float); -vector float vec_or (vector float, vector signed int); -vector float vec_or (vector signed int, vector float); +vector float vec_or (vector float, vector bool int); +vector float vec_or (vector bool int, vector float); +vector bool int vec_or (vector bool int, vector bool int); +vector signed int vec_or (vector bool int, vector signed int); +vector signed int vec_or (vector signed int, vector bool int); vector signed int vec_or (vector signed int, vector signed int); -vector unsigned int vec_or (vector signed int, vector unsigned int); -vector unsigned int vec_or (vector unsigned int, vector signed int); +vector unsigned int vec_or (vector bool int, vector unsigned int); +vector unsigned int vec_or (vector unsigned int, vector bool int); vector unsigned int vec_or (vector unsigned int, vector unsigned int); +vector bool short vec_or (vector bool short, vector bool short); +vector signed short vec_or (vector bool short, vector signed short); +vector signed short vec_or (vector signed short, vector bool short); vector signed short vec_or (vector signed short, vector signed short); -vector unsigned short vec_or (vector signed short, - vector unsigned short); -vector unsigned short vec_or (vector unsigned short, - vector signed short); +vector unsigned short vec_or (vector bool short, vector unsigned short); +vector unsigned short vec_or (vector unsigned short, vector bool short); vector unsigned short vec_or (vector unsigned short, vector unsigned short); +vector signed char vec_or (vector bool char, vector signed char); +vector bool char vec_or (vector bool char, vector bool char); +vector signed char vec_or (vector signed char, vector bool char); vector signed char vec_or (vector signed char, vector signed char); -vector unsigned char vec_or (vector signed char, vector unsigned char); -vector unsigned char vec_or (vector unsigned char, vector signed char); +vector unsigned char vec_or (vector bool char, vector unsigned char); +vector unsigned char vec_or (vector unsigned char, vector bool char); vector unsigned char vec_or (vector unsigned char, vector unsigned char); vector signed char vec_pack (vector signed short, vector signed short); vector unsigned char vec_pack (vector unsigned short, vector unsigned short); +vector bool char vec_pack (vector bool short, vector bool short); vector signed short vec_pack (vector signed int, vector signed int); vector unsigned short vec_pack (vector unsigned int, vector unsigned int); +vector bool short vec_pack (vector bool int, vector bool int); -vector signed short vec_packpx (vector unsigned int, - vector unsigned int); +vector bool short vec_vpkuwum (vector bool int, vector bool int); +vector signed short vec_vpkuwum (vector signed int, vector signed int); +vector unsigned short vec_vpkuwum (vector unsigned int, + vector unsigned int); + +vector bool char vec_vpkuhum (vector bool short, vector bool short); +vector signed char vec_vpkuhum (vector signed short, + vector signed short); +vector unsigned char vec_vpkuhum (vector unsigned short, + vector unsigned short); + +vector pixel vec_packpx (vector unsigned int, vector unsigned int); vector unsigned char vec_packs (vector unsigned short, vector unsigned short); vector signed char vec_packs (vector signed short, vector signed short); - vector unsigned short vec_packs (vector unsigned int, vector unsigned int); vector signed short vec_packs (vector signed int, vector signed int); +vector signed short vec_vpkswss (vector signed int, vector signed int); + +vector unsigned short vec_vpkuwus (vector unsigned int, + vector unsigned int); + +vector signed char vec_vpkshss (vector signed short, + vector signed short); + +vector unsigned char vec_vpkuhus (vector unsigned short, + vector unsigned short); + vector unsigned char vec_packsu (vector unsigned short, vector unsigned short); vector unsigned char vec_packsu (vector signed short, @@ -6556,114 +7057,221 @@ vector unsigned short vec_packsu (vector unsigned int, vector unsigned int); vector unsigned short vec_packsu (vector signed int, vector signed int); -vector float vec_perm (vector float, vector float, +vector unsigned short vec_vpkswus (vector signed int, + vector signed int); + +vector unsigned char vec_vpkshus (vector signed short, + vector signed short); + +vector float vec_perm (vector float, + vector float, vector unsigned char); -vector signed int vec_perm (vector signed int, vector signed int, +vector signed int vec_perm (vector signed int, + vector signed int, vector unsigned char); -vector unsigned int vec_perm (vector unsigned int, vector unsigned int, +vector unsigned int vec_perm (vector unsigned int, + vector unsigned int, vector unsigned char); -vector signed short vec_perm (vector signed short, vector signed short, +vector bool int vec_perm (vector bool int, + vector bool int, + vector unsigned char); +vector signed short vec_perm (vector signed short, + vector signed short, vector unsigned char); vector unsigned short vec_perm (vector unsigned short, vector unsigned short, vector unsigned char); -vector signed char vec_perm (vector signed char, vector signed char, +vector bool short vec_perm (vector bool short, + vector bool short, + vector unsigned char); +vector pixel vec_perm (vector pixel, + vector pixel, + vector unsigned char); +vector signed char vec_perm (vector signed char, + vector signed char, vector unsigned char); vector unsigned char vec_perm (vector unsigned char, vector unsigned char, vector unsigned char); +vector bool char vec_perm (vector bool char, + vector bool char, + vector unsigned char); vector float vec_re (vector float); -vector signed char vec_rl (vector signed char, vector unsigned char); +vector signed char vec_rl (vector signed char, + vector unsigned char); vector unsigned char vec_rl (vector unsigned char, vector unsigned char); vector signed short vec_rl (vector signed short, vector unsigned short); - vector unsigned short vec_rl (vector unsigned short, vector unsigned short); vector signed int vec_rl (vector signed int, vector unsigned int); vector unsigned int vec_rl (vector unsigned int, vector unsigned int); +vector signed int vec_vrlw (vector signed int, vector unsigned int); +vector unsigned int vec_vrlw (vector unsigned int, vector unsigned int); + +vector signed short vec_vrlh (vector signed short, + vector unsigned short); +vector unsigned short vec_vrlh (vector unsigned short, + vector unsigned short); + +vector signed char vec_vrlb (vector signed char, vector unsigned char); +vector unsigned char vec_vrlb (vector unsigned char, + vector unsigned char); + vector float vec_round (vector float); vector float vec_rsqrte (vector float); -vector float vec_sel (vector float, vector float, vector signed int); +vector float vec_sel (vector float, vector float, vector bool int); vector float vec_sel (vector float, vector float, vector unsigned int); -vector signed int vec_sel (vector signed int, vector signed int, - vector signed int); -vector signed int vec_sel (vector signed int, vector signed int, +vector signed int vec_sel (vector signed int, + vector signed int, + vector bool int); +vector signed int vec_sel (vector signed int, + vector signed int, vector unsigned int); -vector unsigned int vec_sel (vector unsigned int, vector unsigned int, - vector signed int); -vector unsigned int vec_sel (vector unsigned int, vector unsigned int, +vector unsigned int vec_sel (vector unsigned int, + vector unsigned int, + vector bool int); +vector unsigned int vec_sel (vector unsigned int, + vector unsigned int, vector unsigned int); -vector signed short vec_sel (vector signed short, vector signed short, - vector signed short); -vector signed short vec_sel (vector signed short, vector signed short, +vector bool int vec_sel (vector bool int, + vector bool int, + vector bool int); +vector bool int vec_sel (vector bool int, + vector bool int, + vector unsigned int); +vector signed short vec_sel (vector signed short, + vector signed short, + vector bool short); +vector signed short vec_sel (vector signed short, + vector signed short, vector unsigned short); vector unsigned short vec_sel (vector unsigned short, vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_sel (vector unsigned short, vector unsigned short, vector unsigned short); -vector signed char vec_sel (vector signed char, vector signed char, - vector signed char); -vector signed char vec_sel (vector signed char, vector signed char, +vector bool short vec_sel (vector bool short, + vector bool short, + vector bool short); +vector bool short vec_sel (vector bool short, + vector bool short, + vector unsigned short); +vector signed char vec_sel (vector signed char, + vector signed char, + vector bool char); +vector signed char vec_sel (vector signed char, + vector signed char, vector unsigned char); vector unsigned char vec_sel (vector unsigned char, vector unsigned char, - vector signed char); + vector bool char); vector unsigned char vec_sel (vector unsigned char, vector unsigned char, vector unsigned char); - -vector signed char vec_sl (vector signed char, vector unsigned char); +vector bool char vec_sel (vector bool char, + vector bool char, + vector bool char); +vector bool char vec_sel (vector bool char, + vector bool char, + vector unsigned char); + +vector signed char vec_sl (vector signed char, + vector unsigned char); vector unsigned char vec_sl (vector unsigned char, vector unsigned char); vector signed short vec_sl (vector signed short, vector unsigned short); - vector unsigned short vec_sl (vector unsigned short, vector unsigned short); vector signed int vec_sl (vector signed int, vector unsigned int); vector unsigned int vec_sl (vector unsigned int, vector unsigned int); -vector float vec_sld (vector float, vector float, const char); -vector signed int vec_sld (vector signed int, vector signed int, - const char); -vector unsigned int vec_sld (vector unsigned int, vector unsigned int, - const char); -vector signed short vec_sld (vector signed short, vector signed short, - const char); +vector signed int vec_vslw (vector signed int, vector unsigned int); +vector unsigned int vec_vslw (vector unsigned int, vector unsigned int); + +vector signed short vec_vslh (vector signed short, + vector unsigned short); +vector unsigned short vec_vslh (vector unsigned short, + vector unsigned short); + +vector signed char vec_vslb (vector signed char, vector unsigned char); +vector unsigned char vec_vslb (vector unsigned char, + vector unsigned char); + +vector float vec_sld (vector float, vector float, const int); +vector signed int vec_sld (vector signed int, + vector signed int, + const int); +vector unsigned int vec_sld (vector unsigned int, + vector unsigned int, + const int); +vector bool int vec_sld (vector bool int, + vector bool int, + const int); +vector signed short vec_sld (vector signed short, + vector signed short, + const int); vector unsigned short vec_sld (vector unsigned short, - vector unsigned short, const char); -vector signed char vec_sld (vector signed char, vector signed char, - const char); + vector unsigned short, + const int); +vector bool short vec_sld (vector bool short, + vector bool short, + const int); +vector pixel vec_sld (vector pixel, + vector pixel, + const int); +vector signed char vec_sld (vector signed char, + vector signed char, + const int); vector unsigned char vec_sld (vector unsigned char, vector unsigned char, - const char); + const int); +vector bool char vec_sld (vector bool char, + vector bool char, + const int); -vector signed int vec_sll (vector signed int, vector unsigned int); -vector signed int vec_sll (vector signed int, vector unsigned short); -vector signed int vec_sll (vector signed int, vector unsigned char); -vector unsigned int vec_sll (vector unsigned int, vector unsigned int); +vector signed int vec_sll (vector signed int, + vector unsigned int); +vector signed int vec_sll (vector signed int, + vector unsigned short); +vector signed int vec_sll (vector signed int, + vector unsigned char); +vector unsigned int vec_sll (vector unsigned int, + vector unsigned int); vector unsigned int vec_sll (vector unsigned int, vector unsigned short); -vector unsigned int vec_sll (vector unsigned int, vector unsigned char); - -vector signed short vec_sll (vector signed short, vector unsigned int); +vector unsigned int vec_sll (vector unsigned int, + vector unsigned char); +vector bool int vec_sll (vector bool int, + vector unsigned int); +vector bool int vec_sll (vector bool int, + vector unsigned short); +vector bool int vec_sll (vector bool int, + vector unsigned char); +vector signed short vec_sll (vector signed short, + vector unsigned int); vector signed short vec_sll (vector signed short, vector unsigned short); -vector signed short vec_sll (vector signed short, vector unsigned char); - +vector signed short vec_sll (vector signed short, + vector unsigned char); vector unsigned short vec_sll (vector unsigned short, vector unsigned int); vector unsigned short vec_sll (vector unsigned short, vector unsigned short); vector unsigned short vec_sll (vector unsigned short, vector unsigned char); +vector bool short vec_sll (vector bool short, vector unsigned int); +vector bool short vec_sll (vector bool short, vector unsigned short); +vector bool short vec_sll (vector bool short, vector unsigned char); +vector pixel vec_sll (vector pixel, vector unsigned int); +vector pixel vec_sll (vector pixel, vector unsigned short); +vector pixel vec_sll (vector pixel, vector unsigned char); vector signed char vec_sll (vector signed char, vector unsigned int); vector signed char vec_sll (vector signed char, vector unsigned short); vector signed char vec_sll (vector signed char, vector unsigned char); @@ -6673,6 +7281,9 @@ vector unsigned char vec_sll (vector unsigned char, vector unsigned short); vector unsigned char vec_sll (vector unsigned char, vector unsigned char); +vector bool char vec_sll (vector bool char, vector unsigned int); +vector bool char vec_sll (vector bool char, vector unsigned short); +vector bool char vec_sll (vector bool char, vector unsigned char); vector float vec_slo (vector float, vector signed char); vector float vec_slo (vector float, vector unsigned char); @@ -6680,51 +7291,80 @@ vector signed int vec_slo (vector signed int, vector signed char); vector signed int vec_slo (vector signed int, vector unsigned char); vector unsigned int vec_slo (vector unsigned int, vector signed char); vector unsigned int vec_slo (vector unsigned int, vector unsigned char); - vector signed short vec_slo (vector signed short, vector signed char); vector signed short vec_slo (vector signed short, vector unsigned char); - vector unsigned short vec_slo (vector unsigned short, vector signed char); vector unsigned short vec_slo (vector unsigned short, vector unsigned char); +vector pixel vec_slo (vector pixel, vector signed char); +vector pixel vec_slo (vector pixel, vector unsigned char); vector signed char vec_slo (vector signed char, vector signed char); vector signed char vec_slo (vector signed char, vector unsigned char); vector unsigned char vec_slo (vector unsigned char, vector signed char); - vector unsigned char vec_slo (vector unsigned char, vector unsigned char); -vector signed char vec_splat (vector signed char, const char); -vector unsigned char vec_splat (vector unsigned char, const char); -vector signed short vec_splat (vector signed short, const char); -vector unsigned short vec_splat (vector unsigned short, const char); -vector float vec_splat (vector float, const char); -vector signed int vec_splat (vector signed int, const char); -vector unsigned int vec_splat (vector unsigned int, const char); +vector signed char vec_splat (vector signed char, const int); +vector unsigned char vec_splat (vector unsigned char, const int); +vector bool char vec_splat (vector bool char, const int); +vector signed short vec_splat (vector signed short, const int); +vector unsigned short vec_splat (vector unsigned short, const int); +vector bool short vec_splat (vector bool short, const int); +vector pixel vec_splat (vector pixel, const int); +vector float vec_splat (vector float, const int); +vector signed int vec_splat (vector signed int, const int); +vector unsigned int vec_splat (vector unsigned int, const int); +vector bool int vec_splat (vector bool int, const int); + +vector float vec_vspltw (vector float, const int); +vector signed int vec_vspltw (vector signed int, const int); +vector unsigned int vec_vspltw (vector unsigned int, const int); +vector bool int vec_vspltw (vector bool int, const int); + +vector bool short vec_vsplth (vector bool short, const int); +vector signed short vec_vsplth (vector signed short, const int); +vector unsigned short vec_vsplth (vector unsigned short, const int); +vector pixel vec_vsplth (vector pixel, const int); -vector signed char vec_splat_s8 (const char); +vector signed char vec_vspltb (vector signed char, const int); +vector unsigned char vec_vspltb (vector unsigned char, const int); +vector bool char vec_vspltb (vector bool char, const int); -vector signed short vec_splat_s16 (const char); +vector signed char vec_splat_s8 (const int); -vector signed int vec_splat_s32 (const char); +vector signed short vec_splat_s16 (const int); -vector unsigned char vec_splat_u8 (const char); +vector signed int vec_splat_s32 (const int); -vector unsigned short vec_splat_u16 (const char); +vector unsigned char vec_splat_u8 (const int); -vector unsigned int vec_splat_u32 (const char); +vector unsigned short vec_splat_u16 (const int); + +vector unsigned int vec_splat_u32 (const int); vector signed char vec_sr (vector signed char, vector unsigned char); vector unsigned char vec_sr (vector unsigned char, vector unsigned char); -vector signed short vec_sr (vector signed short, vector unsigned short); - +vector signed short vec_sr (vector signed short, + vector unsigned short); vector unsigned short vec_sr (vector unsigned short, vector unsigned short); vector signed int vec_sr (vector signed int, vector unsigned int); vector unsigned int vec_sr (vector unsigned int, vector unsigned int); +vector signed int vec_vsrw (vector signed int, vector unsigned int); +vector unsigned int vec_vsrw (vector unsigned int, vector unsigned int); + +vector signed short vec_vsrh (vector signed short, + vector unsigned short); +vector unsigned short vec_vsrh (vector unsigned short, + vector unsigned short); + +vector signed char vec_vsrb (vector signed char, vector unsigned char); +vector unsigned char vec_vsrb (vector unsigned char, + vector unsigned char); + vector signed char vec_sra (vector signed char, vector unsigned char); vector unsigned char vec_sra (vector unsigned char, vector unsigned char); @@ -6735,6 +7375,19 @@ vector unsigned short vec_sra (vector unsigned short, vector signed int vec_sra (vector signed int, vector unsigned int); vector unsigned int vec_sra (vector unsigned int, vector unsigned int); +vector signed int vec_vsraw (vector signed int, vector unsigned int); +vector unsigned int vec_vsraw (vector unsigned int, + vector unsigned int); + +vector signed short vec_vsrah (vector signed short, + vector unsigned short); +vector unsigned short vec_vsrah (vector unsigned short, + vector unsigned short); + +vector signed char vec_vsrab (vector signed char, vector unsigned char); +vector unsigned char vec_vsrab (vector unsigned char, + vector unsigned char); + vector signed int vec_srl (vector signed int, vector unsigned int); vector signed int vec_srl (vector signed int, vector unsigned short); vector signed int vec_srl (vector signed int, vector unsigned char); @@ -6742,18 +7395,25 @@ vector unsigned int vec_srl (vector unsigned int, vector unsigned int); vector unsigned int vec_srl (vector unsigned int, vector unsigned short); vector unsigned int vec_srl (vector unsigned int, vector unsigned char); - +vector bool int vec_srl (vector bool int, vector unsigned int); +vector bool int vec_srl (vector bool int, vector unsigned short); +vector bool int vec_srl (vector bool int, vector unsigned char); vector signed short vec_srl (vector signed short, vector unsigned int); vector signed short vec_srl (vector signed short, vector unsigned short); vector signed short vec_srl (vector signed short, vector unsigned char); - vector unsigned short vec_srl (vector unsigned short, vector unsigned int); vector unsigned short vec_srl (vector unsigned short, vector unsigned short); vector unsigned short vec_srl (vector unsigned short, vector unsigned char); +vector bool short vec_srl (vector bool short, vector unsigned int); +vector bool short vec_srl (vector bool short, vector unsigned short); +vector bool short vec_srl (vector bool short, vector unsigned char); +vector pixel vec_srl (vector pixel, vector unsigned int); +vector pixel vec_srl (vector pixel, vector unsigned short); +vector pixel vec_srl (vector pixel, vector unsigned char); vector signed char vec_srl (vector signed char, vector unsigned int); vector signed char vec_srl (vector signed char, vector unsigned short); vector signed char vec_srl (vector signed char, vector unsigned char); @@ -6763,6 +7423,9 @@ vector unsigned char vec_srl (vector unsigned char, vector unsigned short); vector unsigned char vec_srl (vector unsigned char, vector unsigned char); +vector bool char vec_srl (vector bool char, vector unsigned int); +vector bool char vec_srl (vector bool char, vector unsigned short); +vector bool char vec_srl (vector bool char, vector unsigned char); vector float vec_sro (vector float, vector signed char); vector float vec_sro (vector float, vector unsigned char); @@ -6770,115 +7433,236 @@ vector signed int vec_sro (vector signed int, vector signed char); vector signed int vec_sro (vector signed int, vector unsigned char); vector unsigned int vec_sro (vector unsigned int, vector signed char); vector unsigned int vec_sro (vector unsigned int, vector unsigned char); - vector signed short vec_sro (vector signed short, vector signed char); vector signed short vec_sro (vector signed short, vector unsigned char); - vector unsigned short vec_sro (vector unsigned short, vector signed char); vector unsigned short vec_sro (vector unsigned short, vector unsigned char); +vector pixel vec_sro (vector pixel, vector signed char); +vector pixel vec_sro (vector pixel, vector unsigned char); vector signed char vec_sro (vector signed char, vector signed char); vector signed char vec_sro (vector signed char, vector unsigned char); vector unsigned char vec_sro (vector unsigned char, vector signed char); - vector unsigned char vec_sro (vector unsigned char, vector unsigned char); -void vec_st (vector float, int, float *); void vec_st (vector float, int, vector float *); +void vec_st (vector float, int, float *); +void vec_st (vector signed int, int, vector signed int *); void vec_st (vector signed int, int, int *); -void vec_st (vector signed int, int, unsigned int *); -void vec_st (vector unsigned int, int, unsigned int *); void vec_st (vector unsigned int, int, vector unsigned int *); -void vec_st (vector signed short, int, short *); -void vec_st (vector signed short, int, vector unsigned short *); +void vec_st (vector unsigned int, int, unsigned int *); +void vec_st (vector bool int, int, vector bool int *); +void vec_st (vector bool int, int, unsigned int *); +void vec_st (vector bool int, int, int *); void vec_st (vector signed short, int, vector signed short *); -void vec_st (vector unsigned short, int, unsigned short *); +void vec_st (vector signed short, int, short *); void vec_st (vector unsigned short, int, vector unsigned short *); -void vec_st (vector signed char, int, signed char *); -void vec_st (vector signed char, int, unsigned char *); +void vec_st (vector unsigned short, int, unsigned short *); +void vec_st (vector bool short, int, vector bool short *); +void vec_st (vector bool short, int, unsigned short *); +void vec_st (vector pixel, int, vector pixel *); +void vec_st (vector pixel, int, unsigned short *); +void vec_st (vector pixel, int, short *); +void vec_st (vector bool short, int, short *); void vec_st (vector signed char, int, vector signed char *); -void vec_st (vector unsigned char, int, unsigned char *); +void vec_st (vector signed char, int, signed char *); void vec_st (vector unsigned char, int, vector unsigned char *); +void vec_st (vector unsigned char, int, unsigned char *); +void vec_st (vector bool char, int, vector bool char *); +void vec_st (vector bool char, int, unsigned char *); +void vec_st (vector bool char, int, signed char *); -void vec_ste (vector signed char, int, unsigned char *); void vec_ste (vector signed char, int, signed char *); void vec_ste (vector unsigned char, int, unsigned char *); +void vec_ste (vector bool char, int, signed char *); +void vec_ste (vector bool char, int, unsigned char *); void vec_ste (vector signed short, int, short *); -void vec_ste (vector signed short, int, unsigned short *); -void vec_ste (vector unsigned short, int, void *); -void vec_ste (vector signed int, int, unsigned int *); +void vec_ste (vector unsigned short, int, unsigned short *); +void vec_ste (vector bool short, int, short *); +void vec_ste (vector bool short, int, unsigned short *); +void vec_ste (vector pixel, int, short *); +void vec_ste (vector pixel, int, unsigned short *); +void vec_ste (vector float, int, float *); void vec_ste (vector signed int, int, int *); void vec_ste (vector unsigned int, int, unsigned int *); -void vec_ste (vector float, int, float *); +void vec_ste (vector bool int, int, int *); +void vec_ste (vector bool int, int, unsigned int *); + +void vec_stvewx (vector float, int, float *); +void vec_stvewx (vector signed int, int, int *); +void vec_stvewx (vector unsigned int, int, unsigned int *); +void vec_stvewx (vector bool int, int, int *); +void vec_stvewx (vector bool int, int, unsigned int *); + +void vec_stvehx (vector signed short, int, short *); +void vec_stvehx (vector unsigned short, int, unsigned short *); +void vec_stvehx (vector bool short, int, short *); +void vec_stvehx (vector bool short, int, unsigned short *); +void vec_stvehx (vector pixel, int, short *); +void vec_stvehx (vector pixel, int, unsigned short *); + +void vec_stvebx (vector signed char, int, signed char *); +void vec_stvebx (vector unsigned char, int, unsigned char *); +void vec_stvebx (vector bool char, int, signed char *); +void vec_stvebx (vector bool char, int, unsigned char *); void vec_stl (vector float, int, vector float *); void vec_stl (vector float, int, float *); void vec_stl (vector signed int, int, vector signed int *); void vec_stl (vector signed int, int, int *); -void vec_stl (vector signed int, int, unsigned int *); void vec_stl (vector unsigned int, int, vector unsigned int *); void vec_stl (vector unsigned int, int, unsigned int *); -void vec_stl (vector signed short, int, short *); -void vec_stl (vector signed short, int, unsigned short *); +void vec_stl (vector bool int, int, vector bool int *); +void vec_stl (vector bool int, int, unsigned int *); +void vec_stl (vector bool int, int, int *); void vec_stl (vector signed short, int, vector signed short *); +void vec_stl (vector signed short, int, short *); +void vec_stl (vector unsigned short, int, vector unsigned short *); void vec_stl (vector unsigned short, int, unsigned short *); -void vec_stl (vector unsigned short, int, vector signed short *); -void vec_stl (vector signed char, int, signed char *); -void vec_stl (vector signed char, int, unsigned char *); +void vec_stl (vector bool short, int, vector bool short *); +void vec_stl (vector bool short, int, unsigned short *); +void vec_stl (vector bool short, int, short *); +void vec_stl (vector pixel, int, vector pixel *); +void vec_stl (vector pixel, int, unsigned short *); +void vec_stl (vector pixel, int, short *); void vec_stl (vector signed char, int, vector signed char *); -void vec_stl (vector unsigned char, int, unsigned char *); +void vec_stl (vector signed char, int, signed char *); void vec_stl (vector unsigned char, int, vector unsigned char *); +void vec_stl (vector unsigned char, int, unsigned char *); +void vec_stl (vector bool char, int, vector bool char *); +void vec_stl (vector bool char, int, unsigned char *); +void vec_stl (vector bool char, int, signed char *); +vector signed char vec_sub (vector bool char, vector signed char); +vector signed char vec_sub (vector signed char, vector bool char); vector signed char vec_sub (vector signed char, vector signed char); -vector unsigned char vec_sub (vector signed char, vector unsigned char); - -vector unsigned char vec_sub (vector unsigned char, vector signed char); - +vector unsigned char vec_sub (vector bool char, vector unsigned char); +vector unsigned char vec_sub (vector unsigned char, vector bool char); vector unsigned char vec_sub (vector unsigned char, vector unsigned char); +vector signed short vec_sub (vector bool short, vector signed short); +vector signed short vec_sub (vector signed short, vector bool short); vector signed short vec_sub (vector signed short, vector signed short); -vector unsigned short vec_sub (vector signed short, +vector unsigned short vec_sub (vector bool short, vector unsigned short); vector unsigned short vec_sub (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_sub (vector unsigned short, vector unsigned short); +vector signed int vec_sub (vector bool int, vector signed int); +vector signed int vec_sub (vector signed int, vector bool int); vector signed int vec_sub (vector signed int, vector signed int); -vector unsigned int vec_sub (vector signed int, vector unsigned int); -vector unsigned int vec_sub (vector unsigned int, vector signed int); +vector unsigned int vec_sub (vector bool int, vector unsigned int); +vector unsigned int vec_sub (vector unsigned int, vector bool int); vector unsigned int vec_sub (vector unsigned int, vector unsigned int); vector float vec_sub (vector float, vector float); +vector float vec_vsubfp (vector float, vector float); + +vector signed int vec_vsubuwm (vector bool int, vector signed int); +vector signed int vec_vsubuwm (vector signed int, vector bool int); +vector signed int vec_vsubuwm (vector signed int, vector signed int); +vector unsigned int vec_vsubuwm (vector bool int, vector unsigned int); +vector unsigned int vec_vsubuwm (vector unsigned int, vector bool int); +vector unsigned int vec_vsubuwm (vector unsigned int, + vector unsigned int); + +vector signed short vec_vsubuhm (vector bool short, + vector signed short); +vector signed short vec_vsubuhm (vector signed short, + vector bool short); +vector signed short vec_vsubuhm (vector signed short, + vector signed short); +vector unsigned short vec_vsubuhm (vector bool short, + vector unsigned short); +vector unsigned short vec_vsubuhm (vector unsigned short, + vector bool short); +vector unsigned short vec_vsubuhm (vector unsigned short, + vector unsigned short); + +vector signed char vec_vsububm (vector bool char, vector signed char); +vector signed char vec_vsububm (vector signed char, vector bool char); +vector signed char vec_vsububm (vector signed char, vector signed char); +vector unsigned char vec_vsububm (vector bool char, + vector unsigned char); +vector unsigned char vec_vsububm (vector unsigned char, + vector bool char); +vector unsigned char vec_vsububm (vector unsigned char, + vector unsigned char); + vector unsigned int vec_subc (vector unsigned int, vector unsigned int); -vector unsigned char vec_subs (vector signed char, - vector unsigned char); -vector unsigned char vec_subs (vector unsigned char, - vector signed char); +vector unsigned char vec_subs (vector bool char, vector unsigned char); +vector unsigned char vec_subs (vector unsigned char, vector bool char); vector unsigned char vec_subs (vector unsigned char, vector unsigned char); +vector signed char vec_subs (vector bool char, vector signed char); +vector signed char vec_subs (vector signed char, vector bool char); vector signed char vec_subs (vector signed char, vector signed char); -vector unsigned short vec_subs (vector signed short, +vector unsigned short vec_subs (vector bool short, vector unsigned short); vector unsigned short vec_subs (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_subs (vector unsigned short, vector unsigned short); +vector signed short vec_subs (vector bool short, vector signed short); +vector signed short vec_subs (vector signed short, vector bool short); vector signed short vec_subs (vector signed short, vector signed short); - -vector unsigned int vec_subs (vector signed int, vector unsigned int); -vector unsigned int vec_subs (vector unsigned int, vector signed int); +vector unsigned int vec_subs (vector bool int, vector unsigned int); +vector unsigned int vec_subs (vector unsigned int, vector bool int); vector unsigned int vec_subs (vector unsigned int, vector unsigned int); - +vector signed int vec_subs (vector bool int, vector signed int); +vector signed int vec_subs (vector signed int, vector bool int); vector signed int vec_subs (vector signed int, vector signed int); +vector signed int vec_vsubsws (vector bool int, vector signed int); +vector signed int vec_vsubsws (vector signed int, vector bool int); +vector signed int vec_vsubsws (vector signed int, vector signed int); + +vector unsigned int vec_vsubuws (vector bool int, vector unsigned int); +vector unsigned int vec_vsubuws (vector unsigned int, vector bool int); +vector unsigned int vec_vsubuws (vector unsigned int, + vector unsigned int); + +vector signed short vec_vsubshs (vector bool short, + vector signed short); +vector signed short vec_vsubshs (vector signed short, + vector bool short); +vector signed short vec_vsubshs (vector signed short, + vector signed short); + +vector unsigned short vec_vsubuhs (vector bool short, + vector unsigned short); +vector unsigned short vec_vsubuhs (vector unsigned short, + vector bool short); +vector unsigned short vec_vsubuhs (vector unsigned short, + vector unsigned short); + +vector signed char vec_vsubsbs (vector bool char, vector signed char); +vector signed char vec_vsubsbs (vector signed char, vector bool char); +vector signed char vec_vsubsbs (vector signed char, vector signed char); + +vector unsigned char vec_vsububs (vector bool char, + vector unsigned char); +vector unsigned char vec_vsububs (vector unsigned char, + vector bool char); +vector unsigned char vec_vsububs (vector unsigned char, + vector unsigned char); + vector unsigned int vec_sum4s (vector unsigned char, vector unsigned int); vector signed int vec_sum4s (vector signed char, vector signed int); vector signed int vec_sum4s (vector signed short, vector signed int); +vector signed int vec_vsum4shs (vector signed short, vector signed int); + +vector signed int vec_vsum4sbs (vector signed char, vector signed int); + +vector unsigned int vec_vsum4ubs (vector unsigned char, + vector unsigned int); + vector signed int vec_sum2s (vector signed int, vector signed int); vector signed int vec_sums (vector signed int, vector signed int); @@ -6886,326 +7670,345 @@ vector signed int vec_sums (vector signed int, vector signed int); vector float vec_trunc (vector float); vector signed short vec_unpackh (vector signed char); -vector unsigned int vec_unpackh (vector signed short); +vector bool short vec_unpackh (vector bool char); vector signed int vec_unpackh (vector signed short); +vector bool int vec_unpackh (vector bool short); +vector unsigned int vec_unpackh (vector pixel); + +vector bool int vec_vupkhsh (vector bool short); +vector signed int vec_vupkhsh (vector signed short); + +vector unsigned int vec_vupkhpx (vector pixel); + +vector bool short vec_vupkhsb (vector bool char); +vector signed short vec_vupkhsb (vector signed char); vector signed short vec_unpackl (vector signed char); -vector unsigned int vec_unpackl (vector signed short); +vector bool short vec_unpackl (vector bool char); +vector unsigned int vec_unpackl (vector pixel); vector signed int vec_unpackl (vector signed short); +vector bool int vec_unpackl (vector bool short); + +vector unsigned int vec_vupklpx (vector pixel); + +vector bool int vec_vupklsh (vector bool short); +vector signed int vec_vupklsh (vector signed short); + +vector bool short vec_vupklsb (vector bool char); +vector signed short vec_vupklsb (vector signed char); vector float vec_xor (vector float, vector float); -vector float vec_xor (vector float, vector signed int); -vector float vec_xor (vector signed int, vector float); +vector float vec_xor (vector float, vector bool int); +vector float vec_xor (vector bool int, vector float); +vector bool int vec_xor (vector bool int, vector bool int); +vector signed int vec_xor (vector bool int, vector signed int); +vector signed int vec_xor (vector signed int, vector bool int); vector signed int vec_xor (vector signed int, vector signed int); -vector unsigned int vec_xor (vector signed int, vector unsigned int); -vector unsigned int vec_xor (vector unsigned int, vector signed int); +vector unsigned int vec_xor (vector bool int, vector unsigned int); +vector unsigned int vec_xor (vector unsigned int, vector bool int); vector unsigned int vec_xor (vector unsigned int, vector unsigned int); +vector bool short vec_xor (vector bool short, vector bool short); +vector signed short vec_xor (vector bool short, vector signed short); +vector signed short vec_xor (vector signed short, vector bool short); vector signed short vec_xor (vector signed short, vector signed short); -vector unsigned short vec_xor (vector signed short, +vector unsigned short vec_xor (vector bool short, vector unsigned short); vector unsigned short vec_xor (vector unsigned short, - vector signed short); + vector bool short); vector unsigned short vec_xor (vector unsigned short, vector unsigned short); +vector signed char vec_xor (vector bool char, vector signed char); +vector bool char vec_xor (vector bool char, vector bool char); +vector signed char vec_xor (vector signed char, vector bool char); vector signed char vec_xor (vector signed char, vector signed char); -vector unsigned char vec_xor (vector signed char, vector unsigned char); - -vector unsigned char vec_xor (vector unsigned char, vector signed char); - +vector unsigned char vec_xor (vector bool char, vector unsigned char); +vector unsigned char vec_xor (vector unsigned char, vector bool char); vector unsigned char vec_xor (vector unsigned char, vector unsigned char); -vector signed int vec_all_eq (vector signed char, vector unsigned char); - -vector signed int vec_all_eq (vector signed char, vector signed char); -vector signed int vec_all_eq (vector unsigned char, vector signed char); - -vector signed int vec_all_eq (vector unsigned char, - vector unsigned char); -vector signed int vec_all_eq (vector signed short, - vector unsigned short); -vector signed int vec_all_eq (vector signed short, vector signed short); - -vector signed int vec_all_eq (vector unsigned short, - vector signed short); -vector signed int vec_all_eq (vector unsigned short, - vector unsigned short); -vector signed int vec_all_eq (vector signed int, vector unsigned int); -vector signed int vec_all_eq (vector signed int, vector signed int); -vector signed int vec_all_eq (vector unsigned int, vector signed int); -vector signed int vec_all_eq (vector unsigned int, vector unsigned int); - -vector signed int vec_all_eq (vector float, vector float); - -vector signed int vec_all_ge (vector signed char, vector unsigned char); - -vector signed int vec_all_ge (vector unsigned char, vector signed char); - -vector signed int vec_all_ge (vector unsigned char, - vector unsigned char); -vector signed int vec_all_ge (vector signed char, vector signed char); -vector signed int vec_all_ge (vector signed short, - vector unsigned short); -vector signed int vec_all_ge (vector unsigned short, - vector signed short); -vector signed int vec_all_ge (vector unsigned short, - vector unsigned short); -vector signed int vec_all_ge (vector signed short, vector signed short); - -vector signed int vec_all_ge (vector signed int, vector unsigned int); -vector signed int vec_all_ge (vector unsigned int, vector signed int); -vector signed int vec_all_ge (vector unsigned int, vector unsigned int); - -vector signed int vec_all_ge (vector signed int, vector signed int); -vector signed int vec_all_ge (vector float, vector float); - -vector signed int vec_all_gt (vector signed char, vector unsigned char); - -vector signed int vec_all_gt (vector unsigned char, vector signed char); - -vector signed int vec_all_gt (vector unsigned char, - vector unsigned char); -vector signed int vec_all_gt (vector signed char, vector signed char); -vector signed int vec_all_gt (vector signed short, - vector unsigned short); -vector signed int vec_all_gt (vector unsigned short, - vector signed short); -vector signed int vec_all_gt (vector unsigned short, - vector unsigned short); -vector signed int vec_all_gt (vector signed short, vector signed short); - -vector signed int vec_all_gt (vector signed int, vector unsigned int); -vector signed int vec_all_gt (vector unsigned int, vector signed int); -vector signed int vec_all_gt (vector unsigned int, vector unsigned int); - -vector signed int vec_all_gt (vector signed int, vector signed int); -vector signed int vec_all_gt (vector float, vector float); - -vector signed int vec_all_in (vector float, vector float); - -vector signed int vec_all_le (vector signed char, vector unsigned char); - -vector signed int vec_all_le (vector unsigned char, vector signed char); - -vector signed int vec_all_le (vector unsigned char, - vector unsigned char); -vector signed int vec_all_le (vector signed char, vector signed char); -vector signed int vec_all_le (vector signed short, - vector unsigned short); -vector signed int vec_all_le (vector unsigned short, - vector signed short); -vector signed int vec_all_le (vector unsigned short, - vector unsigned short); -vector signed int vec_all_le (vector signed short, vector signed short); - -vector signed int vec_all_le (vector signed int, vector unsigned int); -vector signed int vec_all_le (vector unsigned int, vector signed int); -vector signed int vec_all_le (vector unsigned int, vector unsigned int); - -vector signed int vec_all_le (vector signed int, vector signed int); -vector signed int vec_all_le (vector float, vector float); - -vector signed int vec_all_lt (vector signed char, vector unsigned char); - -vector signed int vec_all_lt (vector unsigned char, vector signed char); - -vector signed int vec_all_lt (vector unsigned char, - vector unsigned char); -vector signed int vec_all_lt (vector signed char, vector signed char); -vector signed int vec_all_lt (vector signed short, - vector unsigned short); -vector signed int vec_all_lt (vector unsigned short, - vector signed short); -vector signed int vec_all_lt (vector unsigned short, - vector unsigned short); -vector signed int vec_all_lt (vector signed short, vector signed short); - -vector signed int vec_all_lt (vector signed int, vector unsigned int); -vector signed int vec_all_lt (vector unsigned int, vector signed int); -vector signed int vec_all_lt (vector unsigned int, vector unsigned int); - -vector signed int vec_all_lt (vector signed int, vector signed int); -vector signed int vec_all_lt (vector float, vector float); - -vector signed int vec_all_nan (vector float); - -vector signed int vec_all_ne (vector signed char, vector unsigned char); - -vector signed int vec_all_ne (vector signed char, vector signed char); -vector signed int vec_all_ne (vector unsigned char, vector signed char); - -vector signed int vec_all_ne (vector unsigned char, - vector unsigned char); -vector signed int vec_all_ne (vector signed short, - vector unsigned short); -vector signed int vec_all_ne (vector signed short, vector signed short); - -vector signed int vec_all_ne (vector unsigned short, - vector signed short); -vector signed int vec_all_ne (vector unsigned short, - vector unsigned short); -vector signed int vec_all_ne (vector signed int, vector unsigned int); -vector signed int vec_all_ne (vector signed int, vector signed int); -vector signed int vec_all_ne (vector unsigned int, vector signed int); -vector signed int vec_all_ne (vector unsigned int, vector unsigned int); - -vector signed int vec_all_ne (vector float, vector float); - -vector signed int vec_all_nge (vector float, vector float); - -vector signed int vec_all_ngt (vector float, vector float); - -vector signed int vec_all_nle (vector float, vector float); - -vector signed int vec_all_nlt (vector float, vector float); - -vector signed int vec_all_numeric (vector float); - -vector signed int vec_any_eq (vector signed char, vector unsigned char); - -vector signed int vec_any_eq (vector signed char, vector signed char); -vector signed int vec_any_eq (vector unsigned char, vector signed char); - -vector signed int vec_any_eq (vector unsigned char, - vector unsigned char); -vector signed int vec_any_eq (vector signed short, - vector unsigned short); -vector signed int vec_any_eq (vector signed short, vector signed short); - -vector signed int vec_any_eq (vector unsigned short, - vector signed short); -vector signed int vec_any_eq (vector unsigned short, - vector unsigned short); -vector signed int vec_any_eq (vector signed int, vector unsigned int); -vector signed int vec_any_eq (vector signed int, vector signed int); -vector signed int vec_any_eq (vector unsigned int, vector signed int); -vector signed int vec_any_eq (vector unsigned int, vector unsigned int); - -vector signed int vec_any_eq (vector float, vector float); - -vector signed int vec_any_ge (vector signed char, vector unsigned char); - -vector signed int vec_any_ge (vector unsigned char, vector signed char); - -vector signed int vec_any_ge (vector unsigned char, - vector unsigned char); -vector signed int vec_any_ge (vector signed char, vector signed char); -vector signed int vec_any_ge (vector signed short, - vector unsigned short); -vector signed int vec_any_ge (vector unsigned short, - vector signed short); -vector signed int vec_any_ge (vector unsigned short, - vector unsigned short); -vector signed int vec_any_ge (vector signed short, vector signed short); - -vector signed int vec_any_ge (vector signed int, vector unsigned int); -vector signed int vec_any_ge (vector unsigned int, vector signed int); -vector signed int vec_any_ge (vector unsigned int, vector unsigned int); - -vector signed int vec_any_ge (vector signed int, vector signed int); -vector signed int vec_any_ge (vector float, vector float); - -vector signed int vec_any_gt (vector signed char, vector unsigned char); - -vector signed int vec_any_gt (vector unsigned char, vector signed char); - -vector signed int vec_any_gt (vector unsigned char, - vector unsigned char); -vector signed int vec_any_gt (vector signed char, vector signed char); -vector signed int vec_any_gt (vector signed short, - vector unsigned short); -vector signed int vec_any_gt (vector unsigned short, - vector signed short); -vector signed int vec_any_gt (vector unsigned short, - vector unsigned short); -vector signed int vec_any_gt (vector signed short, vector signed short); - -vector signed int vec_any_gt (vector signed int, vector unsigned int); -vector signed int vec_any_gt (vector unsigned int, vector signed int); -vector signed int vec_any_gt (vector unsigned int, vector unsigned int); - -vector signed int vec_any_gt (vector signed int, vector signed int); -vector signed int vec_any_gt (vector float, vector float); - -vector signed int vec_any_le (vector signed char, vector unsigned char); - -vector signed int vec_any_le (vector unsigned char, vector signed char); - -vector signed int vec_any_le (vector unsigned char, - vector unsigned char); -vector signed int vec_any_le (vector signed char, vector signed char); -vector signed int vec_any_le (vector signed short, - vector unsigned short); -vector signed int vec_any_le (vector unsigned short, - vector signed short); -vector signed int vec_any_le (vector unsigned short, - vector unsigned short); -vector signed int vec_any_le (vector signed short, vector signed short); - -vector signed int vec_any_le (vector signed int, vector unsigned int); -vector signed int vec_any_le (vector unsigned int, vector signed int); -vector signed int vec_any_le (vector unsigned int, vector unsigned int); - -vector signed int vec_any_le (vector signed int, vector signed int); -vector signed int vec_any_le (vector float, vector float); - -vector signed int vec_any_lt (vector signed char, vector unsigned char); - -vector signed int vec_any_lt (vector unsigned char, vector signed char); - -vector signed int vec_any_lt (vector unsigned char, - vector unsigned char); -vector signed int vec_any_lt (vector signed char, vector signed char); -vector signed int vec_any_lt (vector signed short, - vector unsigned short); -vector signed int vec_any_lt (vector unsigned short, - vector signed short); -vector signed int vec_any_lt (vector unsigned short, - vector unsigned short); -vector signed int vec_any_lt (vector signed short, vector signed short); - -vector signed int vec_any_lt (vector signed int, vector unsigned int); -vector signed int vec_any_lt (vector unsigned int, vector signed int); -vector signed int vec_any_lt (vector unsigned int, vector unsigned int); - -vector signed int vec_any_lt (vector signed int, vector signed int); -vector signed int vec_any_lt (vector float, vector float); - -vector signed int vec_any_nan (vector float); - -vector signed int vec_any_ne (vector signed char, vector unsigned char); - -vector signed int vec_any_ne (vector signed char, vector signed char); -vector signed int vec_any_ne (vector unsigned char, vector signed char); - -vector signed int vec_any_ne (vector unsigned char, - vector unsigned char); -vector signed int vec_any_ne (vector signed short, - vector unsigned short); -vector signed int vec_any_ne (vector signed short, vector signed short); - -vector signed int vec_any_ne (vector unsigned short, - vector signed short); -vector signed int vec_any_ne (vector unsigned short, - vector unsigned short); -vector signed int vec_any_ne (vector signed int, vector unsigned int); -vector signed int vec_any_ne (vector signed int, vector signed int); -vector signed int vec_any_ne (vector unsigned int, vector signed int); -vector signed int vec_any_ne (vector unsigned int, vector unsigned int); - -vector signed int vec_any_ne (vector float, vector float); - -vector signed int vec_any_nge (vector float, vector float); - -vector signed int vec_any_ngt (vector float, vector float); - -vector signed int vec_any_nle (vector float, vector float); - -vector signed int vec_any_nlt (vector float, vector float); - -vector signed int vec_any_numeric (vector float); - -vector signed int vec_any_out (vector float, vector float); +int vec_all_eq (vector signed char, vector bool char); +int vec_all_eq (vector signed char, vector signed char); +int vec_all_eq (vector unsigned char, vector bool char); +int vec_all_eq (vector unsigned char, vector unsigned char); +int vec_all_eq (vector bool char, vector bool char); +int vec_all_eq (vector bool char, vector unsigned char); +int vec_all_eq (vector bool char, vector signed char); +int vec_all_eq (vector signed short, vector bool short); +int vec_all_eq (vector signed short, vector signed short); +int vec_all_eq (vector unsigned short, vector bool short); +int vec_all_eq (vector unsigned short, vector unsigned short); +int vec_all_eq (vector bool short, vector bool short); +int vec_all_eq (vector bool short, vector unsigned short); +int vec_all_eq (vector bool short, vector signed short); +int vec_all_eq (vector pixel, vector pixel); +int vec_all_eq (vector signed int, vector bool int); +int vec_all_eq (vector signed int, vector signed int); +int vec_all_eq (vector unsigned int, vector bool int); +int vec_all_eq (vector unsigned int, vector unsigned int); +int vec_all_eq (vector bool int, vector bool int); +int vec_all_eq (vector bool int, vector unsigned int); +int vec_all_eq (vector bool int, vector signed int); +int vec_all_eq (vector float, vector float); + +int vec_all_ge (vector bool char, vector unsigned char); +int vec_all_ge (vector unsigned char, vector bool char); +int vec_all_ge (vector unsigned char, vector unsigned char); +int vec_all_ge (vector bool char, vector signed char); +int vec_all_ge (vector signed char, vector bool char); +int vec_all_ge (vector signed char, vector signed char); +int vec_all_ge (vector bool short, vector unsigned short); +int vec_all_ge (vector unsigned short, vector bool short); +int vec_all_ge (vector unsigned short, vector unsigned short); +int vec_all_ge (vector signed short, vector signed short); +int vec_all_ge (vector bool short, vector signed short); +int vec_all_ge (vector signed short, vector bool short); +int vec_all_ge (vector bool int, vector unsigned int); +int vec_all_ge (vector unsigned int, vector bool int); +int vec_all_ge (vector unsigned int, vector unsigned int); +int vec_all_ge (vector bool int, vector signed int); +int vec_all_ge (vector signed int, vector bool int); +int vec_all_ge (vector signed int, vector signed int); +int vec_all_ge (vector float, vector float); + +int vec_all_gt (vector bool char, vector unsigned char); +int vec_all_gt (vector unsigned char, vector bool char); +int vec_all_gt (vector unsigned char, vector unsigned char); +int vec_all_gt (vector bool char, vector signed char); +int vec_all_gt (vector signed char, vector bool char); +int vec_all_gt (vector signed char, vector signed char); +int vec_all_gt (vector bool short, vector unsigned short); +int vec_all_gt (vector unsigned short, vector bool short); +int vec_all_gt (vector unsigned short, vector unsigned short); +int vec_all_gt (vector bool short, vector signed short); +int vec_all_gt (vector signed short, vector bool short); +int vec_all_gt (vector signed short, vector signed short); +int vec_all_gt (vector bool int, vector unsigned int); +int vec_all_gt (vector unsigned int, vector bool int); +int vec_all_gt (vector unsigned int, vector unsigned int); +int vec_all_gt (vector bool int, vector signed int); +int vec_all_gt (vector signed int, vector bool int); +int vec_all_gt (vector signed int, vector signed int); +int vec_all_gt (vector float, vector float); + +int vec_all_in (vector float, vector float); + +int vec_all_le (vector bool char, vector unsigned char); +int vec_all_le (vector unsigned char, vector bool char); +int vec_all_le (vector unsigned char, vector unsigned char); +int vec_all_le (vector bool char, vector signed char); +int vec_all_le (vector signed char, vector bool char); +int vec_all_le (vector signed char, vector signed char); +int vec_all_le (vector bool short, vector unsigned short); +int vec_all_le (vector unsigned short, vector bool short); +int vec_all_le (vector unsigned short, vector unsigned short); +int vec_all_le (vector bool short, vector signed short); +int vec_all_le (vector signed short, vector bool short); +int vec_all_le (vector signed short, vector signed short); +int vec_all_le (vector bool int, vector unsigned int); +int vec_all_le (vector unsigned int, vector bool int); +int vec_all_le (vector unsigned int, vector unsigned int); +int vec_all_le (vector bool int, vector signed int); +int vec_all_le (vector signed int, vector bool int); +int vec_all_le (vector signed int, vector signed int); +int vec_all_le (vector float, vector float); + +int vec_all_lt (vector bool char, vector unsigned char); +int vec_all_lt (vector unsigned char, vector bool char); +int vec_all_lt (vector unsigned char, vector unsigned char); +int vec_all_lt (vector bool char, vector signed char); +int vec_all_lt (vector signed char, vector bool char); +int vec_all_lt (vector signed char, vector signed char); +int vec_all_lt (vector bool short, vector unsigned short); +int vec_all_lt (vector unsigned short, vector bool short); +int vec_all_lt (vector unsigned short, vector unsigned short); +int vec_all_lt (vector bool short, vector signed short); +int vec_all_lt (vector signed short, vector bool short); +int vec_all_lt (vector signed short, vector signed short); +int vec_all_lt (vector bool int, vector unsigned int); +int vec_all_lt (vector unsigned int, vector bool int); +int vec_all_lt (vector unsigned int, vector unsigned int); +int vec_all_lt (vector bool int, vector signed int); +int vec_all_lt (vector signed int, vector bool int); +int vec_all_lt (vector signed int, vector signed int); +int vec_all_lt (vector float, vector float); + +int vec_all_nan (vector float); + +int vec_all_ne (vector signed char, vector bool char); +int vec_all_ne (vector signed char, vector signed char); +int vec_all_ne (vector unsigned char, vector bool char); +int vec_all_ne (vector unsigned char, vector unsigned char); +int vec_all_ne (vector bool char, vector bool char); +int vec_all_ne (vector bool char, vector unsigned char); +int vec_all_ne (vector bool char, vector signed char); +int vec_all_ne (vector signed short, vector bool short); +int vec_all_ne (vector signed short, vector signed short); +int vec_all_ne (vector unsigned short, vector bool short); +int vec_all_ne (vector unsigned short, vector unsigned short); +int vec_all_ne (vector bool short, vector bool short); +int vec_all_ne (vector bool short, vector unsigned short); +int vec_all_ne (vector bool short, vector signed short); +int vec_all_ne (vector pixel, vector pixel); +int vec_all_ne (vector signed int, vector bool int); +int vec_all_ne (vector signed int, vector signed int); +int vec_all_ne (vector unsigned int, vector bool int); +int vec_all_ne (vector unsigned int, vector unsigned int); +int vec_all_ne (vector bool int, vector bool int); +int vec_all_ne (vector bool int, vector unsigned int); +int vec_all_ne (vector bool int, vector signed int); +int vec_all_ne (vector float, vector float); + +int vec_all_nge (vector float, vector float); + +int vec_all_ngt (vector float, vector float); + +int vec_all_nle (vector float, vector float); + +int vec_all_nlt (vector float, vector float); + +int vec_all_numeric (vector float); + +int vec_any_eq (vector signed char, vector bool char); +int vec_any_eq (vector signed char, vector signed char); +int vec_any_eq (vector unsigned char, vector bool char); +int vec_any_eq (vector unsigned char, vector unsigned char); +int vec_any_eq (vector bool char, vector bool char); +int vec_any_eq (vector bool char, vector unsigned char); +int vec_any_eq (vector bool char, vector signed char); +int vec_any_eq (vector signed short, vector bool short); +int vec_any_eq (vector signed short, vector signed short); +int vec_any_eq (vector unsigned short, vector bool short); +int vec_any_eq (vector unsigned short, vector unsigned short); +int vec_any_eq (vector bool short, vector bool short); +int vec_any_eq (vector bool short, vector unsigned short); +int vec_any_eq (vector bool short, vector signed short); +int vec_any_eq (vector pixel, vector pixel); +int vec_any_eq (vector signed int, vector bool int); +int vec_any_eq (vector signed int, vector signed int); +int vec_any_eq (vector unsigned int, vector bool int); +int vec_any_eq (vector unsigned int, vector unsigned int); +int vec_any_eq (vector bool int, vector bool int); +int vec_any_eq (vector bool int, vector unsigned int); +int vec_any_eq (vector bool int, vector signed int); +int vec_any_eq (vector float, vector float); + +int vec_any_ge (vector signed char, vector bool char); +int vec_any_ge (vector unsigned char, vector bool char); +int vec_any_ge (vector unsigned char, vector unsigned char); +int vec_any_ge (vector signed char, vector signed char); +int vec_any_ge (vector bool char, vector unsigned char); +int vec_any_ge (vector bool char, vector signed char); +int vec_any_ge (vector unsigned short, vector bool short); +int vec_any_ge (vector unsigned short, vector unsigned short); +int vec_any_ge (vector signed short, vector signed short); +int vec_any_ge (vector signed short, vector bool short); +int vec_any_ge (vector bool short, vector unsigned short); +int vec_any_ge (vector bool short, vector signed short); +int vec_any_ge (vector signed int, vector bool int); +int vec_any_ge (vector unsigned int, vector bool int); +int vec_any_ge (vector unsigned int, vector unsigned int); +int vec_any_ge (vector signed int, vector signed int); +int vec_any_ge (vector bool int, vector unsigned int); +int vec_any_ge (vector bool int, vector signed int); +int vec_any_ge (vector float, vector float); + +int vec_any_gt (vector bool char, vector unsigned char); +int vec_any_gt (vector unsigned char, vector bool char); +int vec_any_gt (vector unsigned char, vector unsigned char); +int vec_any_gt (vector bool char, vector signed char); +int vec_any_gt (vector signed char, vector bool char); +int vec_any_gt (vector signed char, vector signed char); +int vec_any_gt (vector bool short, vector unsigned short); +int vec_any_gt (vector unsigned short, vector bool short); +int vec_any_gt (vector unsigned short, vector unsigned short); +int vec_any_gt (vector bool short, vector signed short); +int vec_any_gt (vector signed short, vector bool short); +int vec_any_gt (vector signed short, vector signed short); +int vec_any_gt (vector bool int, vector unsigned int); +int vec_any_gt (vector unsigned int, vector bool int); +int vec_any_gt (vector unsigned int, vector unsigned int); +int vec_any_gt (vector bool int, vector signed int); +int vec_any_gt (vector signed int, vector bool int); +int vec_any_gt (vector signed int, vector signed int); +int vec_any_gt (vector float, vector float); + +int vec_any_le (vector bool char, vector unsigned char); +int vec_any_le (vector unsigned char, vector bool char); +int vec_any_le (vector unsigned char, vector unsigned char); +int vec_any_le (vector bool char, vector signed char); +int vec_any_le (vector signed char, vector bool char); +int vec_any_le (vector signed char, vector signed char); +int vec_any_le (vector bool short, vector unsigned short); +int vec_any_le (vector unsigned short, vector bool short); +int vec_any_le (vector unsigned short, vector unsigned short); +int vec_any_le (vector bool short, vector signed short); +int vec_any_le (vector signed short, vector bool short); +int vec_any_le (vector signed short, vector signed short); +int vec_any_le (vector bool int, vector unsigned int); +int vec_any_le (vector unsigned int, vector bool int); +int vec_any_le (vector unsigned int, vector unsigned int); +int vec_any_le (vector bool int, vector signed int); +int vec_any_le (vector signed int, vector bool int); +int vec_any_le (vector signed int, vector signed int); +int vec_any_le (vector float, vector float); + +int vec_any_lt (vector bool char, vector unsigned char); +int vec_any_lt (vector unsigned char, vector bool char); +int vec_any_lt (vector unsigned char, vector unsigned char); +int vec_any_lt (vector bool char, vector signed char); +int vec_any_lt (vector signed char, vector bool char); +int vec_any_lt (vector signed char, vector signed char); +int vec_any_lt (vector bool short, vector unsigned short); +int vec_any_lt (vector unsigned short, vector bool short); +int vec_any_lt (vector unsigned short, vector unsigned short); +int vec_any_lt (vector bool short, vector signed short); +int vec_any_lt (vector signed short, vector bool short); +int vec_any_lt (vector signed short, vector signed short); +int vec_any_lt (vector bool int, vector unsigned int); +int vec_any_lt (vector unsigned int, vector bool int); +int vec_any_lt (vector unsigned int, vector unsigned int); +int vec_any_lt (vector bool int, vector signed int); +int vec_any_lt (vector signed int, vector bool int); +int vec_any_lt (vector signed int, vector signed int); +int vec_any_lt (vector float, vector float); + +int vec_any_nan (vector float); + +int vec_any_ne (vector signed char, vector bool char); +int vec_any_ne (vector signed char, vector signed char); +int vec_any_ne (vector unsigned char, vector bool char); +int vec_any_ne (vector unsigned char, vector unsigned char); +int vec_any_ne (vector bool char, vector bool char); +int vec_any_ne (vector bool char, vector unsigned char); +int vec_any_ne (vector bool char, vector signed char); +int vec_any_ne (vector signed short, vector bool short); +int vec_any_ne (vector signed short, vector signed short); +int vec_any_ne (vector unsigned short, vector bool short); +int vec_any_ne (vector unsigned short, vector unsigned short); +int vec_any_ne (vector bool short, vector bool short); +int vec_any_ne (vector bool short, vector unsigned short); +int vec_any_ne (vector bool short, vector signed short); +int vec_any_ne (vector pixel, vector pixel); +int vec_any_ne (vector signed int, vector bool int); +int vec_any_ne (vector signed int, vector signed int); +int vec_any_ne (vector unsigned int, vector bool int); +int vec_any_ne (vector unsigned int, vector unsigned int); +int vec_any_ne (vector bool int, vector bool int); +int vec_any_ne (vector bool int, vector unsigned int); +int vec_any_ne (vector bool int, vector signed int); +int vec_any_ne (vector float, vector float); + +int vec_any_nge (vector float, vector float); + +int vec_any_ngt (vector float, vector float); + +int vec_any_nle (vector float, vector float); + +int vec_any_nlt (vector float, vector float); + +int vec_any_numeric (vector float); + +int vec_any_out (vector float, vector float); @end smallexample @node Pragmas diff --git a/contrib/gcc/doc/include/gcc-common.texi b/contrib/gcc/doc/include/gcc-common.texi index 49725ab..b5e8891 100644 --- a/contrib/gcc/doc/include/gcc-common.texi +++ b/contrib/gcc/doc/include/gcc-common.texi @@ -4,7 +4,7 @@ @c Common values used in the GCC manuals: -@set version-GCC 3.4.2 +@set version-GCC 3.4.4 @c DEVELOPMENT is set to indicate an in-development version, @c as compared to a release version. When making a release diff --git a/contrib/gcc/doc/invoke.texi b/contrib/gcc/doc/invoke.texi index 7e88bd5..3475408 100644 --- a/contrib/gcc/doc/invoke.texi +++ b/contrib/gcc/doc/invoke.texi @@ -1,12 +1,12 @@ @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -@c 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +@c 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @ignore @c man begin COPYRIGHT Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, -1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or @@ -188,7 +188,7 @@ in the following sections. -Weffc++ -Wno-deprecated @gol -Wno-non-template-friend -Wold-style-cast @gol -Woverloaded-virtual -Wno-pmf-conversions @gol --Wsign-promo -Wsynth} +-Wsign-promo} @item Objective-C Language Options @xref{Objective-C Dialect Options,,Options Controlling Objective-C Dialect}. @@ -421,7 +421,7 @@ in the following sections. -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol -mnew-mnemonics -mold-mnemonics @gol -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol --m64 -m32 -mxl-call -mno-xl-call -mpe @gol +-m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol -malign-power -malign-natural @gol -msoft-float -mhard-float -mmultiple -mno-multiple @gol -mstring -mno-string -mupdate -mno-update @gol @@ -605,8 +605,11 @@ in the following sections. -mconstant-gp -mauto-pic -minline-float-divide-min-latency @gol -minline-float-divide-max-throughput @gol -minline-int-divide-min-latency @gol --minline-int-divide-max-throughput -mno-dwarf2-asm @gol --mfixed-range=@var{register-range}} +-minline-int-divide-max-throughput @gol +-minline-sqrt-min-latency -minline-sqrt-max-throughput @gol +-mno-dwarf2-asm -mearly-stop-bits @gol +-mfixed-range=@var{register-range} -mtls-size=@var{tls-size} @gol +-mtune=@var{cpu-type} -mt -pthread -milp32 -mlp64} @emph{D30V Options} @gccoptlist{-mextmem -mextmemory -monchip -mno-asm-optimize @gol @@ -1701,13 +1704,6 @@ enumerated type to a signed type, over a conversion to an unsigned type of the same size. Previous versions of G++ would try to preserve unsignedness, but the standard mandates the current behavior. -@item -Wsynth @r{(C++ only)} -@opindex Wsynth -@cindex warning for synthesized methods -@cindex synthesized methods, warning -Warn when G++'s synthesis behavior does not match that of cfront. For -instance: - @smallexample struct A @{ operator int (); @@ -4198,8 +4194,8 @@ Enabled at levels @option{-O2}, @option{-O3}. @opindex freorder-functions Reorder basic blocks in the compiled function in order to reduce number of taken branches and improve code locality. This is implemented by using special -subsections @code{text.hot} for most frequently executed functions and -@code{text.unlikely} for unlikely executed functions. Reordering is done by +subsections @code{.text.hot} for most frequently executed functions and +@code{.text.unlikely} for unlikely executed functions. Reordering is done by the linker so object file format must support named sections and linker must place them in a reasonable way. @@ -4829,6 +4825,12 @@ order to make tracer effective. Maximum number of basic blocks on path that cse considers. +@item max-last-value-rtl + +The maximum size measured as number of RTLs that can be recorded in an +expression in combiner for a pseudo register as last known value of that +register. The default is 10000. + @item ggc-min-expand GCC uses a garbage collector to manage its own memory allocation. This @@ -6161,7 +6163,7 @@ These @samp{-m} options are supported on the SPARC: @opindex mapp-regs Specify @option{-mapp-regs} to generate output using the global registers 2 through 4, which the SPARC SVR4 ABI reserves for applications. This -is the default. +is the default, except on Solaris. To be fully SVR4 ABI compliant at the cost of some performance loss, specify @option{-mno-app-regs}. You should compile libraries and system @@ -6384,7 +6386,7 @@ on SPARC-V9 processors in 64-bit environments: @item -mlittle-endian @opindex mlittle-endian Generate code for a processor running in little-endian mode. It is only -available for a few configurations and most notably not on Solaris. +available for a few configurations and most notably not on Solaris and Linux. @item -m32 @itemx -m64 @@ -7050,7 +7052,7 @@ Supported values for @var{cpu_type} are @samp{401}, @samp{403}, @samp{601}, @samp{602}, @samp{603}, @samp{603e}, @samp{604}, @samp{604e}, @samp{620}, @samp{630}, @samp{740}, @samp{7400}, @samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823}, -@samp{860}, @samp{970}, @samp{common}, @samp{ec603e}, @samp{G3}, +@samp{860}, @samp{970}, @samp{8540}, @samp{common}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5}, @samp{power}, @samp{power2}, @samp{power3}, @samp{power4}, @samp{power5}, @samp{powerpc}, @samp{powerpc64}, @samp{rios}, @samp{rios1}, @samp{rios2}, @samp{rsc}, and @samp{rs64a}. @@ -7178,13 +7180,17 @@ Specifying @option{-maix64} implies @option{-mpowerpc64} and @option{-mpowerpc}, while @option{-maix32} disables the 64-bit ABI and implies @option{-mno-powerpc64}. GCC defaults to @option{-maix32}. -@item -mxl-call -@itemx -mno-xl-call -@opindex mxl-call -@opindex mno-xl-call -On AIX, pass floating-point arguments to prototyped functions beyond the -register save area (RSA) on the stack in addition to argument FPRs. The -AIX calling convention was extended but not initially documented to +@item -mxl-compat +@itemx -mno-xl-compat +@opindex mxl-compat +@opindex mno-xl-compat +Produce code that conforms more closely to IBM XLC semantics when using +AIX-compatible ABI. Pass floating-point arguments to prototyped +functions beyond the register save area (RSA) on the stack in addition +to argument FPRs. Do not assume that most significant double in 128 +bit long double value is properly rounded when comparing values. + +The AIX calling convention was extended but not initially documented to handle an obscure K&R C case of calling a function that takes the address of its arguments with fewer arguments than declared. AIX XL compilers access floating point arguments which do not fit in the @@ -10031,6 +10037,16 @@ using the minimum latency algorithm. Generate code for inline divides of integer values using the maximum throughput algorithm. +@item -minline-sqrt-min-latency +@opindex minline-sqrt-min-latency +Generate code for inline square roots +using the minimum latency algorithm. + +@item -minline-sqrt-max-throughput +@opindex minline-sqrt-max-throughput +Generate code for inline square roots +using the maximum throughput algorithm. + @item -mno-dwarf2-asm @itemx -mdwarf2-asm @opindex mno-dwarf2-asm @@ -10038,6 +10054,14 @@ using the maximum throughput algorithm. Don't (or do) generate assembler code for the DWARF2 line number debugging info. This may be useful when not using the GNU assembler. +@item -mearly-stop-bits +@itemx -mno-early-stop-bits +@opindex mearly-stop-bits +@opindex mno-early-stop-bits +Allow stop bits to be placed earlier than immediately preceding the +instruction that triggered the stop bit. This can improve instruction +scheduling, but does not always do so. + @item -mfixed-range=@var{register-range} @opindex mfixed-range Generate code treating the given register range as fixed registers. @@ -10046,13 +10070,34 @@ useful when compiling kernel code. A register range is specified as two registers separated by a dash. Multiple register ranges can be specified separated by a comma. -@item -mearly-stop-bits -@itemx -mno-early-stop-bits -@opindex mearly-stop-bits -@opindex mno-early-stop-bits -Allow stop bits to be placed earlier than immediately preceding the -instruction that triggered the stop bit. This can improve instruction -scheduling, but does not always do so. +@item -mtls-size=@var{tls-size} +@opindex mtls-size +Specify bit size of immediate TLS offsets. Valid values are 14, 22, and +64. + +@item -mtune-arch=@var{cpu-type} +@opindex mtune-arch +Tune the instruction scheduling for a particular CPU, Valid values are +itanium, itanium1, merced, itanium2, and mckinley. + +@item -mt +@itemx -pthread +@opindex mt +@opindex pthread +Add support for multithreading using the POSIX threads library. This +option sets flags for both the preprocessor and linker. It does +not affect the thread safety of object code produced by the compiler or +that of libraries supplied with it. These are HP-UX specific flags. + +@item -milp32 +@itemx -mlp64 +@opindex milp32 +@opindex mlp64 +Generate code for a 32-bit or 64-bit environment. +The 32-bit environment sets int, long and pointer to 32 bits. +The 64-bit environment sets int to 32 bits and long and pointer +to 64 bits. These are HP-UX specific flags. + @end table @node D30V Options @@ -11269,8 +11314,8 @@ localization information that allow GCC to work with different national conventions. GCC inspects the locale categories @env{LC_CTYPE} and @env{LC_MESSAGES} if it has been configured to do so. These locale categories can be set to any value supported by your -installation. A typical value is @samp{en_UK} for English in the United -Kingdom. +installation. A typical value is @samp{en_GB.UTF-8} for English in the United +Kingdom encoded in UTF-8. The @env{LC_CTYPE} environment variable specifies character classification. GCC uses it to determine the character boundaries in diff --git a/contrib/gcc/doc/md.texi b/contrib/gcc/doc/md.texi index 11e2915..b73f325 100644 --- a/contrib/gcc/doc/md.texi +++ b/contrib/gcc/doc/md.texi @@ -1257,7 +1257,9 @@ instruction is defined: @end smallexample @end ifset GCC can only handle one commutative pair in an asm; if you use more, -the compiler may fail. +the compiler may fail. Note that you need not use the modifier if +the two alternatives are strictly identical; this would only waste +time in the reload pass. @cindex @samp{#} in constraint @item # diff --git a/contrib/gcc/doc/tm.texi b/contrib/gcc/doc/tm.texi index 03c1c4e..73b8ec2 100644 --- a/contrib/gcc/doc/tm.texi +++ b/contrib/gcc/doc/tm.texi @@ -291,6 +291,26 @@ the value of @code{LIB_SPEC}. If this macro is not defined, the GCC driver provides a default that passes the string @option{-lgcc} to the linker. + +By default, if @code{ENABLE_SHARED_LIBGCC} is defined, the +@code{LIBGCC_SPEC} is not directly used by the driver program but is +instead modified to refer to different versions of @file{libgcc.a} +depending on the values of the command line flags @option{-static}, +@option{-shared}, @option{-static-libgcc}, and @option{-shared-libgcc}. +@end defmac + +@defmac USE_LD_AS_NEEDED +A macro that controls the modifications to @code{LIBGCC_SPEC}. +If nonzero, a spec will be +generated that uses --as-needed and the shared libgcc in place of the +static exception handler library, when linking without any of +@code{-static}, @code{-static-libgcc}, or @code{-shared-libgcc}. +@end defmac + +@defmac LINK_EH_SPEC +If defined, this C string constant is added to @code{LINK_SPEC}. +When @code{USE_LD_AS_NEEDED} is zero or undefined, it also affects +the modifications to @code{LIBGCC_SPEC}. @end defmac @defmac STARTFILE_SPEC @@ -1502,6 +1522,34 @@ precedence for that field, but the alignment of the rest of the structure may affect its placement. @end deftypefn +@deftypefn {Target Hook} {const char *} TARGET_MANGLE_FUNDAMENTAL_TYPE (tree @var{type}) +If your target defines any fundamental types, define this hook to +return the appropriate encoding for these types as part of a C++ +mangled name. The @var{type} argument is the tree structure +representing the type to be mangled. The hook may be applied to trees +which are not target-specific fundamental types; it should return +@code{NULL} for all such types, as well as arguments it does not +recognize. If the return value is not @code{NULL}, it must point to +a statically-allocated string constant. + +Target-specific fundamental types might be new fundamental types or +qualified versions of ordinary fundamental types. Encode new +fundamental types as @samp{@w{u @var{n} @var{name}}}, where @var{name} +is the name used for the type in source code, and @var{n} is the +length of @var{name} in decimal. Encode qualified versions of +ordinary types as @samp{@w{U @var{n} @var{name} @var{code}}}, where +@var{name} is the name used for the type qualifier in source code, +@var{n} is the length of @var{name} as above, and @var{code} is the +code used to represent the unqualified version of this type. (See +@code{write_builtin_type} in @file{cp/mangle.c} for the list of +codes.) In both cases the spaces are for clarity; do not include any +spaces in your string. + +The default version of this hook always returns @code{NULL}, which is +appropriate for a target that does not define any new fundamental +types. +@end deftypefn + @node Type Layout @section Layout of Source Language Data Types @@ -2929,6 +2977,14 @@ general register, but an alternate column needs to be used for signal frames. @end defmac +@defmac DWARF_ZERO_REG +A C expression whose value is an integer giving a DWARF 2 register +number that is considered to always have the value zero. This should +only be defined if the target has an architected zero register, and +someone decided it was a good idea to use that register number to +terminate the stack backtrace. New ports should avoid this. +@end defmac + @defmac INCOMING_FRAME_SP_OFFSET A C expression whose value is an integer giving the offset, in bytes, from the value of the stack pointer register to the top of the stack @@ -4278,7 +4334,7 @@ You need not define this macro if you did not define @code{DELAY_SLOTS_FOR_EPILOGUE}. @end defmac -@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, tree @var{function}) +@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function}) A function that outputs the assembler code for a thunk function, used to implement C++ virtual function calls with multiple inheritance. The thunk acts as a wrapper around a virtual function, @@ -4292,7 +4348,15 @@ in C++. This is the incoming argument @emph{before} the function prologue, e.g.@: @samp{%o0} on a sparc. The addition must preserve the values of all other incoming arguments. -After the addition, emit code to jump to @var{function}, which is a +Then, if @var{vcall_offset} is nonzero, an additional adjustment should be +made after adding @code{delta}. In particular, if @var{p} is the +adjusted pointer, the following adjustment should be made: + +@smallexample +p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)] +@end smallexample + +After the additions, emit code to jump to @var{function}, which is a @code{FUNCTION_DECL}. This is a direct pure jump, not a call, and does not touch the return address. Hence returning from @var{FUNCTION} will return to whoever called the current @samp{thunk}. @@ -4312,19 +4376,12 @@ front end will generate a less efficient heavyweight thunk that calls not support varargs. @end deftypefn -@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_VCALL_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, int @var{vcall_offset}, tree @var{function}) -A function like @code{TARGET_ASM_OUTPUT_MI_THUNK}, except that if -@var{vcall_offset} is nonzero, an additional adjustment should be made -after adding @code{delta}. In particular, if @var{p} is the -adjusted pointer, the following adjustment should be made: - -@smallexample -p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)] -@end smallexample - -@noindent -If this function is defined, it will always be used in place of -@code{TARGET_ASM_OUTPUT_MI_THUNK}. +@deftypefn {Target Hook} bool TARGET_ASM_CAN_OUTPUT_MI_THUNK (tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function}) +A function that returns true if TARGET_ASM_OUTPUT_MI_THUNK would be able +to output the assembler code for the thunk function specified by the +arguments it is passed, and false otherwise. In the latter case, the +generic approach will be used by the C++ front end, with the limitations +previously exposed. @end deftypefn @node Profiling @@ -6896,6 +6953,15 @@ If @code{SET_ASM_OP} is defined, a default definition is provided which is correct for most systems. @end defmac +@defmac TARGET_DEFERRED_OUTPUT_DEFS (@var{decl_of_name}, @var{decl_of_value}) +A C statement that evaluates to true if the assembler code which defines +(equates) the symbol whose tree node is @var{decl_of_name} to have the value +of the tree node @var{decl_of_value} should be emitted near the end of the +current compilation unit. The default is to not defer output of defines. +This macro affects defines output by @samp{ASM_OUTPUT_DEF} and +@samp{ASM_OUTPUT_DEF_FROM_DECLS}. +@end defmac + @defmac ASM_OUTPUT_WEAK_ALIAS (@var{stream}, @var{name}, @var{value}) A C statement to output to the stdio stream @var{stream} assembler code which defines (equates) the weak symbol @var{name} to have the value diff --git a/contrib/gcc/doc/trouble.texi b/contrib/gcc/doc/trouble.texi index a1b86bc..170bbad 100644 --- a/contrib/gcc/doc/trouble.texi +++ b/contrib/gcc/doc/trouble.texi @@ -1067,7 +1067,7 @@ forces it to remain until the end of the scope of the name. For example: @smallexample -string& tmp = strfunc (); +const string& tmp = strfunc (); charfunc (tmp.c_str ()); @end smallexample diff --git a/contrib/gcc/dojump.c b/contrib/gcc/dojump.c index 6b9569b..b232576 100644 --- a/contrib/gcc/dojump.c +++ b/contrib/gcc/dojump.c @@ -1,6 +1,6 @@ /* Convert tree expression to rtl instructions, for GNU compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -33,7 +33,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "expr.h" #include "optabs.h" #include "langhooks.h" +#include "ggc.h" +static bool prefer_and_bit_test (enum machine_mode, int); static void do_jump_by_parts_greater (tree, int, rtx, rtx); static void do_jump_by_parts_equality (tree, rtx, rtx); static void do_compare_and_jump (tree, enum rtx_code, enum rtx_code, rtx, @@ -48,6 +50,15 @@ init_pending_stack_adjust (void) pending_stack_adjust = 0; } +/* Discard any pending stack adjustment. This avoid relying on the + RTL optimizers to remove useless adjustments when we know the + stack pointer value is dead. */ +void discard_pending_stack_adjust (void) +{ + stack_pointer_delta -= pending_stack_adjust; + pending_stack_adjust = 0; +} + /* When exiting from function, if safe, clear out any pending stack adjust so the adjustment won't get done. @@ -62,10 +73,7 @@ clear_pending_stack_adjust (void) && EXIT_IGNORE_STACK && ! (DECL_INLINE (current_function_decl) && ! flag_no_inline) && ! flag_inline_functions) - { - stack_pointer_delta -= pending_stack_adjust, - pending_stack_adjust = 0; - } + discard_pending_stack_adjust (); } /* Pop any previously-pushed arguments that have not been popped yet. */ @@ -101,6 +109,45 @@ jumpif (tree exp, rtx label) do_jump (exp, NULL_RTX, label); } +/* Used internally by prefer_and_bit_test. */ + +static GTY(()) rtx and_reg; +static GTY(()) rtx and_test; +static GTY(()) rtx shift_test; + +/* Compare the relative costs of "(X & (1 << BITNUM))" and "(X >> BITNUM) & 1" + where X is an arbitrary register of mode MODE. Return true if the former + is preferred. */ + +static bool +prefer_and_bit_test (enum machine_mode mode, int bitnum) +{ + if (and_test == 0) + { + /* Set up rtxes for the two variations. Use NULL as a placeholder + for the BITNUM-based constants. */ + and_reg = gen_rtx_REG (mode, FIRST_PSEUDO_REGISTER); + and_test = gen_rtx_AND (mode, and_reg, NULL); + shift_test = gen_rtx_AND (mode, gen_rtx_ASHIFTRT (mode, and_reg, NULL), + const1_rtx); + } + else + { + /* Change the mode of the previously-created rtxes. */ + PUT_MODE (and_reg, mode); + PUT_MODE (and_test, mode); + PUT_MODE (shift_test, mode); + PUT_MODE (XEXP (shift_test, 0), mode); + } + + /* Fill in the integers. */ + XEXP (and_test, 1) = GEN_INT ((unsigned HOST_WIDE_INT) 1 << bitnum); + XEXP (XEXP (shift_test, 0), 1) = GEN_INT (bitnum); + + return (rtx_cost (and_test, IF_THEN_ELSE) + <= rtx_cost (shift_test, IF_THEN_ELSE)); +} + /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if the result is zero, or IF_TRUE_LABEL if the result is one. Either of IF_FALSE_LABEL and IF_TRUE_LABEL may be zero, @@ -206,6 +253,59 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label) break; case BIT_AND_EXPR: + /* fold_single_bit_test() converts (X & (1 << C)) into (X >> C) & 1. + See if the former is preferred for jump tests and restore it + if so. */ + if (integer_onep (TREE_OPERAND (exp, 1))) + { + tree exp0 = TREE_OPERAND (exp, 0); + rtx set_label, clr_label; + + /* Strip narrowing integral type conversions. */ + while ((TREE_CODE (exp0) == NOP_EXPR + || TREE_CODE (exp0) == CONVERT_EXPR + || TREE_CODE (exp0) == NON_LVALUE_EXPR) + && TREE_OPERAND (exp0, 0) != error_mark_node + && TYPE_PRECISION (TREE_TYPE (exp0)) + <= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (exp0, 0)))) + exp0 = TREE_OPERAND (exp0, 0); + + /* "exp0 ^ 1" inverts the sense of the single bit test. */ + if (TREE_CODE (exp0) == BIT_XOR_EXPR + && integer_onep (TREE_OPERAND (exp0, 1))) + { + exp0 = TREE_OPERAND (exp0, 0); + clr_label = if_true_label; + set_label = if_false_label; + } + else + { + clr_label = if_false_label; + set_label = if_true_label; + } + + if (TREE_CODE (exp0) == RSHIFT_EXPR) + { + tree arg = TREE_OPERAND (exp0, 0); + tree shift = TREE_OPERAND (exp0, 1); + tree argtype = TREE_TYPE (arg); + if (TREE_CODE (shift) == INTEGER_CST + && compare_tree_int (shift, 0) >= 0 + && compare_tree_int (shift, HOST_BITS_PER_WIDE_INT) < 0 + && prefer_and_bit_test (TYPE_MODE (argtype), + TREE_INT_CST_LOW (shift))) + { + HOST_WIDE_INT mask = (HOST_WIDE_INT) 1 + << TREE_INT_CST_LOW (shift); + tree t = build_int_2 (mask, 0); + TREE_TYPE (t) = argtype; + do_jump (build (BIT_AND_EXPR, argtype, arg, t), + clr_label, set_label); + break; + } + } + } + /* If we are AND'ing with a small constant, do this comparison in the smallest type that fits. If the machine doesn't have comparisons that small, it will be converted back to the wider comparison. @@ -997,3 +1097,5 @@ do_compare_and_jump (tree exp, enum rtx_code signed_code, ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX), if_false_label, if_true_label); } + +#include "gt-dojump.h" diff --git a/contrib/gcc/dwarf2out.c b/contrib/gcc/dwarf2out.c index a2d8669..d59cc1d 100644 --- a/contrib/gcc/dwarf2out.c +++ b/contrib/gcc/dwarf2out.c @@ -1,6 +1,6 @@ /* Output Dwarf2 format symbol table information from GCC. Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004 Free Software Foundation, Inc. + 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Gary Funck (gary@intrepid.com). Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com). Extensively modified by Jason Merrill (jason@cygnus.com). @@ -3649,6 +3649,7 @@ static bool is_java (void); static bool is_fortran (void); static bool is_ada (void); static void remove_AT (dw_die_ref, enum dwarf_attribute); +static void remove_child_TAG (dw_die_ref, enum dwarf_tag); static inline void free_die (dw_die_ref); static void remove_children (dw_die_ref); static void add_child_die (dw_die_ref, dw_die_ref); @@ -5055,6 +5056,34 @@ remove_AT (dw_die_ref die, enum dwarf_attribute attr_kind) } } +/* Remove child die whose die_tag is specified tag. */ + +static void +remove_child_TAG (dw_die_ref die, enum dwarf_tag tag) +{ + dw_die_ref current, prev, next; + current = die->die_child; + prev = NULL; + while (current != NULL) + { + if (current->die_tag == tag) + { + next = current->die_sib; + if (prev == NULL) + die->die_child = next; + else + prev->die_sib = next; + free_die (current); + current = next; + } + else + { + prev = current; + current = current->die_sib; + } + } +} + /* Free up the memory used by DIE. */ static inline void @@ -8851,6 +8880,12 @@ loc_descriptor_from_tree (tree loc, int addressp) case EXPR_WITH_FILE_LOCATION: return loc_descriptor_from_tree (EXPR_WFL_NODE (loc), addressp); + case FIX_TRUNC_EXPR: + case FIX_CEIL_EXPR: + case FIX_FLOOR_EXPR: + case FIX_ROUND_EXPR: + return 0; + default: /* Leave front-end specific codes as simply unknown. This comes up, for instance, with the C STMT_EXPR. */ @@ -8858,9 +8893,15 @@ loc_descriptor_from_tree (tree loc, int addressp) >= (unsigned int) LAST_AND_UNUSED_TREE_CODE) return 0; +#ifdef ENABLE_CHECKING /* Otherwise this is a generic code; we should just lists all of these explicitly. Aborting means we forgot one. */ abort (); +#else + /* In a release build, we want to degrade gracefully: better to + generate incomplete debugging information than to crash. */ + return NULL; +#endif } /* Show if we can't fill the request for an address. */ @@ -9457,19 +9498,33 @@ rtl_for_decl_location (tree decl) { if (rtl == NULL_RTX || is_pseudo_reg (rtl)) { - tree declared_type = type_main_variant (TREE_TYPE (decl)); - tree passed_type = type_main_variant (DECL_ARG_TYPE (decl)); + tree declared_type = TREE_TYPE (decl); + tree passed_type = DECL_ARG_TYPE (decl); + enum machine_mode dmode = TYPE_MODE (declared_type); + enum machine_mode pmode = TYPE_MODE (passed_type); /* This decl represents a formal parameter which was optimized out. Note that DECL_INCOMING_RTL may be NULL in here, but we handle all cases where (rtl == NULL_RTX) just below. */ - if (declared_type == passed_type) - rtl = DECL_INCOMING_RTL (decl); - else if (! BYTES_BIG_ENDIAN - && TREE_CODE (declared_type) == INTEGER_TYPE - && (GET_MODE_SIZE (TYPE_MODE (declared_type)) - <= GET_MODE_SIZE (TYPE_MODE (passed_type)))) + if (dmode == pmode) rtl = DECL_INCOMING_RTL (decl); + else if (SCALAR_INT_MODE_P (dmode) + && GET_MODE_SIZE (dmode) <= GET_MODE_SIZE (pmode) + && DECL_INCOMING_RTL (decl)) + { + rtx inc = DECL_INCOMING_RTL (decl); + if (REG_P (inc)) + rtl = inc; + else if (GET_CODE (inc) == MEM) + { + if (BYTES_BIG_ENDIAN) + rtl = adjust_address_nv (inc, dmode, + GET_MODE_SIZE (pmode) + - GET_MODE_SIZE (dmode)); + else + rtl = inc; + } + } } /* If the parm was passed in registers, but lives on the stack, then @@ -10209,7 +10264,8 @@ scope_die_for (tree t, dw_die_ref context_die) if (containing_scope && TREE_CODE (containing_scope) == FUNCTION_TYPE) containing_scope = NULL_TREE; - if (containing_scope == NULL_TREE) + if (containing_scope == NULL_TREE + || TREE_CODE (containing_scope) == TRANSLATION_UNIT_DECL) scope_die = comp_unit_die; else if (TYPE_P (containing_scope)) { @@ -10846,9 +10902,9 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) { subr_die = old_die; - /* Clear out the declaration attribute and the parm types. */ + /* Clear out the declaration attribute and the formal parameters. */ remove_AT (subr_die, DW_AT_declaration); - remove_children (subr_die); + remove_child_TAG (subr_die, DW_TAG_formal_parameter); } else { diff --git a/contrib/gcc/emit-rtl.c b/contrib/gcc/emit-rtl.c index f6e44f9..9df2d6c 100644 --- a/contrib/gcc/emit-rtl.c +++ b/contrib/gcc/emit-rtl.c @@ -2910,11 +2910,19 @@ get_first_nonnote_insn (void) { rtx insn = first_insn; - while (insn) + if (insn) { - insn = next_insn (insn); - if (insn == 0 || GET_CODE (insn) != NOTE) - break; + if (NOTE_P (insn)) + for (insn = next_insn (insn); + insn && NOTE_P (insn); + insn = next_insn (insn)) + continue; + else + { + if (GET_CODE (insn) == INSN + && GET_CODE (PATTERN (insn)) == SEQUENCE) + insn = XVECEXP (PATTERN (insn), 0, 0); + } } return insn; @@ -2928,11 +2936,20 @@ get_last_nonnote_insn (void) { rtx insn = last_insn; - while (insn) + if (insn) { - insn = previous_insn (insn); - if (insn == 0 || GET_CODE (insn) != NOTE) - break; + if (NOTE_P (insn)) + for (insn = previous_insn (insn); + insn && NOTE_P (insn); + insn = previous_insn (insn)) + continue; + else + { + if (GET_CODE (insn) == INSN + && GET_CODE (PATTERN (insn)) == SEQUENCE) + insn = XVECEXP (PATTERN (insn), 0, + XVECLEN (PATTERN (insn), 0) - 1); + } } return insn; diff --git a/contrib/gcc/explow.c b/contrib/gcc/explow.c index c1de4c8..01eda84 100644 --- a/contrib/gcc/explow.c +++ b/contrib/gcc/explow.c @@ -951,6 +951,7 @@ emit_stack_save (enum save_level save_level, rtx *psave, rtx after) rtx seq; start_sequence (); + do_pending_stack_adjust (); /* We must validize inside the sequence, to ensure that any instructions created by the validize call also get moved to the right place. */ if (sa != 0) @@ -962,6 +963,7 @@ emit_stack_save (enum save_level save_level, rtx *psave, rtx after) } else { + do_pending_stack_adjust (); if (sa != 0) sa = validize_mem (sa); emit_insn (fcn (sa, stack_pointer_rtx)); @@ -1018,6 +1020,8 @@ emit_stack_restore (enum save_level save_level, rtx sa, rtx after) gen_rtx_MEM (BLKmode, stack_pointer_rtx))); } + discard_pending_stack_adjust (); + if (after) { rtx seq; diff --git a/contrib/gcc/expmed.c b/contrib/gcc/expmed.c index e8b508b..a803934 100644 --- a/contrib/gcc/expmed.c +++ b/contrib/gcc/expmed.c @@ -289,6 +289,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, unsigned HOST_WIDE_INT bitpos = bitnum % unit; rtx op0 = str_rtx; int byte_offset; + rtx orig_value; enum machine_mode op_mode = mode_for_extraction (EP_insv, 3); @@ -568,6 +569,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, corresponding size. This can occur on a machine with 64 bit registers that uses SFmode for float. This can also occur for unaligned float structure fields. */ + orig_value = value; if (GET_MODE_CLASS (GET_MODE (value)) != MODE_INT && GET_MODE_CLASS (GET_MODE (value)) != MODE_PARTIAL_INT) value = gen_lowpart ((GET_MODE (value) == VOIDmode @@ -634,7 +636,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, /* Fetch that unit, store the bitfield in it, then store the unit. */ tempreg = copy_to_reg (op0); - store_bit_field (tempreg, bitsize, bitpos, fieldmode, value, + store_bit_field (tempreg, bitsize, bitpos, fieldmode, orig_value, total_size); emit_move_insn (op0, tempreg); return value; diff --git a/contrib/gcc/expr.c b/contrib/gcc/expr.c index aa80ae6..fcb5b0c 100644 --- a/contrib/gcc/expr.c +++ b/contrib/gcc/expr.c @@ -8107,7 +8107,7 @@ expand_expr_real (tree exp, rtx target, enum machine_mode tmode, /* At this point, a MEM target is no longer useful; we will get better code without it. */ - if (GET_CODE (target) == MEM) + if (! REG_P (target)) target = gen_reg_rtx (mode); /* If op1 was placed in target, swap op0 and op1. */ @@ -8118,6 +8118,11 @@ expand_expr_real (tree exp, rtx target, enum machine_mode tmode, op1 = tem; } + /* We generate better code and avoid problems with op1 mentioning + target by forcing op1 into a pseudo if it isn't a constant. */ + if (! CONSTANT_P (op1)) + op1 = force_reg (mode, op1); + if (target != op0) emit_move_insn (target, op0); diff --git a/contrib/gcc/expr.h b/contrib/gcc/expr.h index dd7ac9c..ccf3a10 100644 --- a/contrib/gcc/expr.h +++ b/contrib/gcc/expr.h @@ -526,6 +526,9 @@ extern rtx expand_expr_real (tree, rtx, enum machine_mode, arguments waiting to be popped. */ extern void init_pending_stack_adjust (void); +/* Discard any pending stack adjustment. */ +extern void discard_pending_stack_adjust (void); + /* When exiting from function, if safe, clear out any pending stack adjust so the adjustment won't get done. */ extern void clear_pending_stack_adjust (void); diff --git a/contrib/gcc/f/ChangeLog b/contrib/gcc/f/ChangeLog index d671c1e..bf48201 100644 --- a/contrib/gcc/f/ChangeLog +++ b/contrib/gcc/f/ChangeLog @@ -1,3 +1,41 @@ +2005-05-19 Release Manager + + * GCC 3.4.4 released. + +2004-12-30 Toon Moene <toon@moene.indiv.nluug.nl> + + * news.texi: Change GCC 3.5 to GCC 4.0 + +2004-11-04 Release Manager + + * GCC 3.4.3 released. + +2004-09-21 Bud Davis <bdavis9659@comcast.net> + + PR fortran/17541 + * bld.c (ffebld_constant_new_real2_val): Fix typo, + +2004-09-06 Release Manager + + * GCC 3.4.2 released. + +2004-09-02 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR fortran/17180 + * malloc.c (MALLOC_ALIGNMENT): Rename into MAX_ALIGNMENT + and use a host-based heuristics to determine it. + (ROUNDED_AREA_SIZE): Adjust. + +2004-09-01 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR fortran/17180 + * malloc.c (MALLOC_ALIGNMENT): New constant. + (ROUNDED_AREA_SIZE): Likewise. + (malloc_kill_area_): Use ROUNDED_AREA_SIZE. + (malloc_find_inpool_): Likewise. + (malloc_new_inpool_): Likewise. + (malloc_resize_inpool_): Likewise. + 2004-07-12 Bud Davis <bdavis9659@comcast.net> * bld.c (ffebld_constant_new_character1, ffebld_constant_new_complex{1,2}, diff --git a/contrib/gcc/f/bld.c b/contrib/gcc/f/bld.c index ec7c5cd6..d300069 100644 --- a/contrib/gcc/f/bld.c +++ b/contrib/gcc/f/bld.c @@ -1333,7 +1333,7 @@ ffebld_constant_new_real2_val (ffetargetReal2 val) nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constREAL2", sizeof (*nc)); - nc->consttype = FFEBLD_constREAL1; + nc->consttype = FFEBLD_constREAL2; nc->u.real2 = val; nc->hook = FFECOM_constantNULL; nc->llink = NULL; diff --git a/contrib/gcc/f/malloc.c b/contrib/gcc/f/malloc.c index 8c85511..b9addb8 100644 --- a/contrib/gcc/f/malloc.c +++ b/contrib/gcc/f/malloc.c @@ -83,6 +83,17 @@ static void malloc_verify_area_ (mallocPool pool, mallocArea_ a); /* Internal macros. */ +struct max_alignment { + char c; + union { + HOST_WIDEST_INT i; + long double d; + } u; +}; + +#define MAX_ALIGNMENT (offsetof (struct max_alignment, u)) +#define ROUNDED_AREA_SIZE (MAX_ALIGNMENT * ((sizeof(mallocArea_) + MAX_ALIGNMENT - 1) / MAX_ALIGNMENT)) + #if MALLOC_DEBUG #define malloc_kill_(ptr,s) do {memset((ptr),127,(s));free((ptr));} while(0) #else @@ -101,7 +112,7 @@ malloc_kill_area_ (mallocPool pool UNUSED, mallocArea_ a) #if MALLOC_DEBUG assert (strcmp (a->name, ((char *) (a->where)) + a->size) == 0); #endif - malloc_kill_ (a->where - sizeof(mallocArea_*), a->size); + malloc_kill_ (a->where - ROUNDED_AREA_SIZE, a->size); a->next->previous = a->previous; a->previous->next = a->next; #if MALLOC_DEBUG @@ -302,10 +313,10 @@ malloc_display_ (mallocArea_ a UNUSED) Search for object in list of mallocArea_s, die if not found. */ mallocArea_ -malloc_find_inpool_ (mallocPool pool, void *ptr) +malloc_find_inpool_ (mallocPool pool UNUSED, void *ptr) { mallocArea_ *t; - t = (mallocArea_ *) (ptr - sizeof(mallocArea_)); + t = (mallocArea_ *) (ptr - ROUNDED_AREA_SIZE); return *t; } @@ -387,14 +398,14 @@ malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name, mallocS || malloc_pool_find_ (pool, malloc_pool_image ())); #endif - ptr = malloc_new_ (sizeof(mallocArea_*) + s + (i = (MALLOC_DEBUG ? strlen (name) + 1 : 0))); + ptr = malloc_new_ (ROUNDED_AREA_SIZE + s + (i = (MALLOC_DEBUG ? strlen (name) + 1 : 0))); #if MALLOC_DEBUG strcpy (((char *) (ptr)) + s, name); #endif a = malloc_new_ (offsetof (struct _malloc_area_, name) + i); temp = (mallocArea_ *) ptr; *temp = a; - ptr = ptr + sizeof(mallocArea_*); + ptr = ptr + ROUNDED_AREA_SIZE; switch (type) { /* A little optimization to speed up killing of non-permanent stuff. */ @@ -487,10 +498,10 @@ malloc_resize_inpool_ (mallocPool pool, mallocType_ type UNUSED, assert (a->size == os); assert (strcmp (a->name, ((char *) (ptr)) + os) == 0); #endif - ptr = malloc_resize_ (ptr - sizeof(mallocArea_*), sizeof(mallocArea_*) + ns + (MALLOC_DEBUG ? strlen (a->name) + 1: 0)); + ptr = malloc_resize_ (ptr - ROUNDED_AREA_SIZE, ROUNDED_AREA_SIZE + ns + (MALLOC_DEBUG ? strlen (a->name) + 1: 0)); temp = (mallocArea_ *) ptr; *temp = a; - ptr = ptr + sizeof(mallocArea_*); + ptr = ptr + ROUNDED_AREA_SIZE; a->where = ptr; #if MALLOC_DEBUG a->size = ns; diff --git a/contrib/gcc/f/news.texi b/contrib/gcc/f/news.texi index 9b34df0..fcba273 100644 --- a/contrib/gcc/f/news.texi +++ b/contrib/gcc/f/news.texi @@ -11,7 +11,7 @@ @c in the standalone derivations of this file (e.g. NEWS). @set copyrights-news 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 -@set last-update-news 2004-06-17 +@set last-update-news 2004-12-29 @ifset DOC-NEWS @include root.texi @@ -62,7 +62,7 @@ such changes to @command{g77}. @ifclear USERVISONLY -@emph{@code{GCC} 3.4.x is the last edition of @code{GCC} to contain @command{g77} - from @code{GCC} 3.5 onwards, use @command{gfortran}} +@emph{@code{GCC} 3.4.x is the last edition of @code{GCC} to contain @command{g77} - from @code{GCC} 4.0 onwards, use @command{gfortran}} Changes made to recent versions of GNU Fortran are listed below, with the most recent version first. diff --git a/contrib/gcc/flow.c b/contrib/gcc/flow.c index 90bc5f8..fed908d 100644 --- a/contrib/gcc/flow.c +++ b/contrib/gcc/flow.c @@ -407,7 +407,7 @@ life_analysis (rtx f, FILE *file, int flags) #ifdef CANNOT_CHANGE_MODE_CLASS if (flags & PROP_REG_INFO) - bitmap_initialize (&subregs_of_mode, 1); + init_subregs_of_mode (); #endif if (! optimize) @@ -1591,7 +1591,7 @@ propagate_one_insn (struct propagate_block_info *pbi, rtx insn) pbi->cc0_live = 0; if (libcall_is_dead) - prev = propagate_block_delete_libcall ( insn, note); + prev = propagate_block_delete_libcall (insn, note); else { @@ -2268,7 +2268,7 @@ libcall_dead_p (struct propagate_block_info *pbi, rtx note, rtx insn) { rtx r = SET_SRC (x); - if (GET_CODE (r) == REG) + if (GET_CODE (r) == REG || GET_CODE (r) == SUBREG) { rtx call = XEXP (note, 0); rtx call_pat; @@ -2302,10 +2302,20 @@ libcall_dead_p (struct propagate_block_info *pbi, rtx note, rtx insn) call_pat = XVECEXP (call_pat, 0, i); } - return insn_dead_p (pbi, call_pat, 1, REG_NOTES (call)); + if (! insn_dead_p (pbi, call_pat, 1, REG_NOTES (call))) + return 0; + + while ((insn = PREV_INSN (insn)) != call) + { + if (! INSN_P (insn)) + continue; + if (! insn_dead_p (pbi, PATTERN (insn), 0, REG_NOTES (insn))) + return 0; + } + return 1; } } - return 1; + return 0; } /* Return 1 if register REGNO was used before it was set, i.e. if it is @@ -3776,12 +3786,8 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) case SUBREG: #ifdef CANNOT_CHANGE_MODE_CLASS - if ((flags & PROP_REG_INFO) - && GET_CODE (SUBREG_REG (x)) == REG - && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER) - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (x)) - * MAX_MACHINE_MODE - + GET_MODE (x)); + if (flags & PROP_REG_INFO) + record_subregs_of_mode (x); #endif /* While we're here, optimize this case. */ @@ -3826,13 +3832,8 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) || GET_CODE (testreg) == SUBREG) { #ifdef CANNOT_CHANGE_MODE_CLASS - if ((flags & PROP_REG_INFO) - && GET_CODE (testreg) == SUBREG - && GET_CODE (SUBREG_REG (testreg)) == REG - && REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER) - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (testreg)) - * MAX_MACHINE_MODE - + GET_MODE (testreg)); + if ((flags & PROP_REG_INFO) && GET_CODE (testreg) == SUBREG) + record_subregs_of_mode (testreg); #endif /* Modifying a single register in an alternate mode diff --git a/contrib/gcc/fold-const.c b/contrib/gcc/fold-const.c index 2c0f813..b34422f 100644 --- a/contrib/gcc/fold-const.c +++ b/contrib/gcc/fold-const.c @@ -1828,7 +1828,8 @@ fold_convert (tree type, tree arg) if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (orig)) return fold (build1 (NOP_EXPR, type, arg)); - if (INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type)) + if (INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type) + || TREE_CODE (type) == OFFSET_TYPE) { if (TREE_CODE (arg) == INTEGER_CST) { @@ -1836,7 +1837,8 @@ fold_convert (tree type, tree arg) if (tem != NULL_TREE) return tem; } - if (INTEGRAL_TYPE_P (orig) || POINTER_TYPE_P (orig)) + if (INTEGRAL_TYPE_P (orig) || POINTER_TYPE_P (orig) + || TREE_CODE (orig) == OFFSET_TYPE) return fold (build1 (NOP_EXPR, type, arg)); if (TREE_CODE (orig) == COMPLEX_TYPE) { @@ -2187,10 +2189,21 @@ operand_equal_p (tree arg0, tree arg1, int only_const) { case '1': /* Two conversions are equal only if signedness and modes match. */ - if ((TREE_CODE (arg0) == NOP_EXPR || TREE_CODE (arg0) == CONVERT_EXPR) - && (TREE_UNSIGNED (TREE_TYPE (arg0)) - != TREE_UNSIGNED (TREE_TYPE (arg1)))) - return 0; + switch (TREE_CODE (arg0)) + { + case NOP_EXPR: + case CONVERT_EXPR: + case FIX_CEIL_EXPR: + case FIX_TRUNC_EXPR: + case FIX_FLOOR_EXPR: + case FIX_ROUND_EXPR: + if (TREE_UNSIGNED (TREE_TYPE (arg0)) + != TREE_UNSIGNED (TREE_TYPE (arg1))) + return 0; + break; + default: + break; + } return operand_equal_p (TREE_OPERAND (arg0, 0), TREE_OPERAND (arg1, 0), 0); @@ -4452,9 +4465,9 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type) && TYPE_IS_SIZETYPE (TREE_TYPE (op0))) && (GET_MODE_SIZE (TYPE_MODE (ctype)) > GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (op0))))) - /* ... or its type is larger than ctype, - then we cannot pass through this truncation. */ - || (GET_MODE_SIZE (TYPE_MODE (ctype)) + /* ... or this is a truncation (t is narrower than op0), + then we cannot pass through this narrowing. */ + || (GET_MODE_SIZE (TYPE_MODE (type)) < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (op0)))) /* ... or signedness changes for division or modulus, then we cannot pass through this conversion. */ @@ -4475,7 +4488,21 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type) return t1; break; - case NEGATE_EXPR: case ABS_EXPR: + case ABS_EXPR: + /* If widening the type changes it from signed to unsigned, then we + must avoid building ABS_EXPR itself as unsigned. */ + if (TREE_UNSIGNED (ctype) && !TREE_UNSIGNED (type)) + { + tree cstype = (*lang_hooks.types.signed_type) (ctype); + if ((t1 = extract_muldiv (op0, c, code, cstype)) != 0) + { + t1 = fold (build1 (tcode, cstype, fold_convert (cstype, t1))); + return fold_convert (ctype, t1); + } + break; + } + /* FALLTHROUGH */ + case NEGATE_EXPR: if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0) return fold (build1 (tcode, ctype, fold_convert (ctype, t1))); break; diff --git a/contrib/gcc/function.c b/contrib/gcc/function.c index dcd972c..087467c 100644 --- a/contrib/gcc/function.c +++ b/contrib/gcc/function.c @@ -236,7 +236,7 @@ static rtx assign_stack_local_1 (enum machine_mode, HOST_WIDE_INT, int, struct function *); static struct temp_slot *find_temp_slot_from_address (rtx); static void put_reg_into_stack (struct function *, rtx, tree, enum machine_mode, - enum machine_mode, int, unsigned int, int, htab_t); + unsigned int, bool, bool, bool, htab_t); static void schedule_fixup_var_refs (struct function *, rtx, tree, enum machine_mode, htab_t); static void fixup_var_refs (rtx, enum machine_mode, int, rtx, htab_t); @@ -506,6 +506,7 @@ get_frame_size (void) ALIGN controls the amount of alignment for the address of the slot: 0 means according to MODE, -1 means use BIGGEST_ALIGNMENT and round size to multiple of that, + -2 means use BITS_PER_UNIT, positive specifies alignment boundary in bits. We do not round to stack_boundary here. @@ -543,6 +544,8 @@ assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align, alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT; size = CEIL_ROUND (size, alignment); } + else if (align == -2) + alignment = 1; /* BITS_PER_UNIT / BITS_PER_UNIT */ else alignment = align / BITS_PER_UNIT; @@ -1291,9 +1294,9 @@ put_var_into_stack (tree decl, int rescan) enum machine_mode promoted_mode, decl_mode; struct function *function = 0; tree context; - int can_use_addressof; - int volatilep = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl); - int usedp = (TREE_USED (decl) + bool can_use_addressof_p; + bool volatile_p = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl); + bool used_p = (TREE_USED (decl) || (TREE_CODE (decl) != SAVE_EXPR && DECL_INITIAL (decl) != 0)); context = decl_function_context (decl); @@ -1340,7 +1343,7 @@ put_var_into_stack (tree decl, int rescan) /* If this variable lives in the current function and we don't need to put it in the stack for the sake of setjmp or the non-locality, try to keep it in a register until we know we actually need the address. */ - can_use_addressof + can_use_addressof_p = (function == 0 && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl)) && optimize > 0 @@ -1353,7 +1356,8 @@ put_var_into_stack (tree decl, int rescan) /* If we can't use ADDRESSOF, make sure we see through one we already generated. */ - if (! can_use_addressof && GET_CODE (reg) == MEM + if (! can_use_addressof_p + && GET_CODE (reg) == MEM && GET_CODE (XEXP (reg, 0)) == ADDRESSOF) reg = XEXP (XEXP (reg, 0), 0); @@ -1361,11 +1365,11 @@ put_var_into_stack (tree decl, int rescan) if (GET_CODE (reg) == REG) { - if (can_use_addressof) + if (can_use_addressof_p) gen_mem_addressof (reg, decl, rescan); else - put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode, - decl_mode, volatilep, 0, usedp, 0); + put_reg_into_stack (function, reg, TREE_TYPE (decl), decl_mode, + 0, volatile_p, used_p, false, 0); } else if (GET_CODE (reg) == CONCAT) { @@ -1381,14 +1385,14 @@ put_var_into_stack (tree decl, int rescan) #ifdef FRAME_GROWS_DOWNWARD /* Since part 0 should have a lower address, do it second. */ put_reg_into_stack (function, hipart, part_type, part_mode, - part_mode, volatilep, 0, 0, 0); + 0, volatile_p, false, false, 0); put_reg_into_stack (function, lopart, part_type, part_mode, - part_mode, volatilep, 0, 0, 0); + 0, volatile_p, false, true, 0); #else put_reg_into_stack (function, lopart, part_type, part_mode, - part_mode, volatilep, 0, 0, 0); + 0, volatile_p, false, false, 0); put_reg_into_stack (function, hipart, part_type, part_mode, - part_mode, volatilep, 0, 0, 0); + 0, volatile_p, false, true, 0); #endif /* Change the CONCAT into a combined MEM for both parts. */ @@ -1409,7 +1413,7 @@ put_var_into_stack (tree decl, int rescan) /* Prevent sharing of rtl that might lose. */ if (GET_CODE (XEXP (reg, 0)) == PLUS) XEXP (reg, 0) = copy_rtx (XEXP (reg, 0)); - if (usedp && rescan) + if (used_p && rescan) { schedule_fixup_var_refs (function, reg, TREE_TYPE (decl), promoted_mode, 0); @@ -1423,20 +1427,24 @@ put_var_into_stack (tree decl, int rescan) /* Subroutine of put_var_into_stack. This puts a single pseudo reg REG into the stack frame of FUNCTION (0 means the current function). + TYPE is the user-level data type of the value hold in the register. DECL_MODE is the machine mode of the user-level data type. - PROMOTED_MODE is the machine mode of the register. - VOLATILE_P is nonzero if this is for a "volatile" decl. - USED_P is nonzero if this reg might have already been used in an insn. */ + ORIGINAL_REGNO must be set if the real regno is not visible in REG. + VOLATILE_P is true if this is for a "volatile" decl. + USED_P is true if this reg might have already been used in an insn. + CONSECUTIVE_P is true if the stack slot assigned to reg must be + consecutive with the previous stack slot. */ static void put_reg_into_stack (struct function *function, rtx reg, tree type, - enum machine_mode promoted_mode, - enum machine_mode decl_mode, int volatile_p, - unsigned int original_regno, int used_p, htab_t ht) + enum machine_mode decl_mode, unsigned int original_regno, + bool volatile_p, bool used_p, bool consecutive_p, + htab_t ht) { struct function *func = function ? function : cfun; - rtx new = 0; + enum machine_mode mode = GET_MODE (reg); unsigned int regno = original_regno; + rtx new = 0; if (regno == 0) regno = REGNO (reg); @@ -1449,7 +1457,8 @@ put_reg_into_stack (struct function *function, rtx reg, tree type, } if (new == 0) - new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func); + new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), + consecutive_p ? -2 : 0, func); PUT_CODE (reg, MEM); PUT_MODE (reg, decl_mode); @@ -1471,7 +1480,7 @@ put_reg_into_stack (struct function *function, rtx reg, tree type, } if (used_p) - schedule_fixup_var_refs (function, reg, type, promoted_mode, ht); + schedule_fixup_var_refs (function, reg, type, mode, ht); } /* Make sure that all refs to the variable, previously made @@ -1639,7 +1648,7 @@ fixup_var_refs_insns_with_hash (htab_t ht, rtx var, enum machine_mode promoted_m tmp.key = var; ime = htab_find (ht, &tmp); for (insn_list = ime->insns; insn_list != 0; insn_list = XEXP (insn_list, 1)) - if (INSN_P (XEXP (insn_list, 0))) + if (INSN_P (XEXP (insn_list, 0)) && !INSN_DELETED_P (XEXP (insn_list, 0))) fixup_var_refs_insn (XEXP (insn_list, 0), var, promoted_mode, unsignedp, 1, may_share); } @@ -2907,7 +2916,7 @@ static void put_addressof_into_stack (rtx r, htab_t ht) { tree decl, type; - int volatile_p, used_p; + bool volatile_p, used_p; rtx reg = XEXP (r, 0); @@ -2926,12 +2935,12 @@ put_addressof_into_stack (rtx r, htab_t ht) else { type = NULL_TREE; - volatile_p = 0; - used_p = 1; + volatile_p = false; + used_p = true; } - put_reg_into_stack (0, reg, type, GET_MODE (reg), GET_MODE (reg), - volatile_p, ADDRESSOF_REGNO (r), used_p, ht); + put_reg_into_stack (0, reg, type, GET_MODE (reg), ADDRESSOF_REGNO (r), + volatile_p, used_p, false, ht); } /* List of replacements made below in purge_addressof_1 when creating @@ -3651,10 +3660,20 @@ instantiate_decl (rtx x, HOST_WIDE_INT size, int valid_only) enum machine_mode mode; rtx addr; + if (x == 0) + return; + + /* If this is a CONCAT, recurse for the pieces. */ + if (GET_CODE (x) == CONCAT) + { + instantiate_decl (XEXP (x, 0), size / 2, valid_only); + instantiate_decl (XEXP (x, 1), size / 2, valid_only); + return; + } + /* If this is not a MEM, no need to do anything. Similarly if the address is a constant or a register that is not a virtual register. */ - - if (x == 0 || GET_CODE (x) != MEM) + if (GET_CODE (x) != MEM) return; addr = XEXP (x, 0); diff --git a/contrib/gcc/gcc.c b/contrib/gcc/gcc.c index c9af5d9..5d77e23 100644 --- a/contrib/gcc/gcc.c +++ b/contrib/gcc/gcc.c @@ -746,7 +746,7 @@ static const char *cpp_unique_options = %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\ %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\ %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\ - %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\ + %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\ %{E|M|MM:%W{o*}}"; /* This contains cpp options which are common with cc1_options and are passed @@ -755,8 +755,9 @@ static const char *cpp_unique_options = options used to set target flags. Those special target flags settings may 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*}\ - %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef}"; +"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ + %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*}\ + %{undef}"; /* This contains cpp options which are not passed when the preprocessor output will be used by another program. */ @@ -767,7 +768,7 @@ static const char *cc1_options = "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\ %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}\ - %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi}\ + %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\ %{v:-version} %{pg:-p} %{p} %{f*} %{undef}\ %{Qn:-fno-ident} %{--help:--help}\ %{--target-help:--target-help}\ @@ -912,7 +913,7 @@ static const struct compiler default_compilers[] = cc1 %(cpp_unique_options) %(cc1_options)}}}\ %{!fsyntax-only:%(invoke_as)}}}}", 0}, {"-", - "%{!E:%e-E required when input is from standard input}\ + "%{!E:%e-E or -x required when input is from standard input}\ %(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)", 0}, {".h", "@c-header", 0}, {"@c-header", @@ -1640,11 +1641,18 @@ init_spec (void) #else "-lgcc_s%M" #endif +#ifdef USE_LIBUNWIND_EXCEPTIONS + " -lunwind" +#endif , "-lgcc", "-lgcc_eh" #ifdef USE_LIBUNWIND_EXCEPTIONS +# ifdef HAVE_LD_STATIC_DYNAMIC + " %{!static:-Bstatic} -lunwind %{!static:-Bdynamic}" +# else " -lunwind" +# endif #endif ); diff --git a/contrib/gcc/gcov-io.h b/contrib/gcc/gcov-io.h index e83c516..6879829 100644 --- a/contrib/gcc/gcov-io.h +++ b/contrib/gcc/gcov-io.h @@ -230,11 +230,15 @@ typedef HOST_WIDEST_INT gcov_type; #endif /* !IN_LIBGCOV */ -/* In gcov we want function linkage to be static. In libgcov we need - these functions to be extern, so prefix them with __gcov. In the - compiler we want it extern, so that they can be accessed from - elsewhere. */ +/* In gcov we want function linkage to be static. In the compiler we want + it extern, so that they can be accessed from elsewhere. In libgcov we + need these functions to be extern, so prefix them with __gcov. In + libgcov they must also be hidden so that the instance in the executable + is not also used in a DSO. */ #if IN_LIBGCOV + +#include "auto-host.h" /* for HAVE_GAS_HIDDEN */ + #define gcov_var __gcov_var #define gcov_open __gcov_open #define gcov_close __gcov_close @@ -255,6 +259,16 @@ typedef HOST_WIDEST_INT gcov_type; #pragma GCC poison gcov_write_string gcov_write_tag gcov_write_length #pragma GCC poison gcov_read_string gcov_sync gcov_time gcov_magic +#ifdef HAVE_GAS_HIDDEN +#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden"))) +#else +#define ATTRIBUTE_HIDDEN +#endif + +#else + +#define ATTRIBUTE_HIDDEN + #endif #ifndef GCOV_LINKAGE @@ -433,20 +447,20 @@ struct gcov_info }; /* Register a new object file module. */ -extern void __gcov_init (struct gcov_info *); +extern void __gcov_init (struct gcov_info *) ATTRIBUTE_HIDDEN; /* Called before fork, to avoid double counting. */ -extern void __gcov_flush (void); +extern void __gcov_flush (void) ATTRIBUTE_HIDDEN; /* The merge function that just sums the counters. */ -extern void __gcov_merge_add (gcov_type *, unsigned); +extern void __gcov_merge_add (gcov_type *, unsigned) ATTRIBUTE_HIDDEN; /* The merge function to choose the most common value. */ -extern void __gcov_merge_single (gcov_type *, unsigned); +extern void __gcov_merge_single (gcov_type *, unsigned) ATTRIBUTE_HIDDEN; /* The merge function to choose the most common difference between consecutive values. */ -extern void __gcov_merge_delta (gcov_type *, unsigned); +extern void __gcov_merge_delta (gcov_type *, unsigned) ATTRIBUTE_HIDDEN; #endif /* IN_LIBGCOV */ #if IN_LIBGCOV >= 0 @@ -476,7 +490,7 @@ GCOV_LINKAGE struct gcov_var size_t alloc; gcov_unsigned_t *buffer; #endif -} gcov_var; +} gcov_var ATTRIBUTE_HIDDEN; /* Functions for reading and writing gcov files. In libgcov you can open the file for reading then writing. Elsewhere you can open the @@ -488,31 +502,33 @@ GCOV_LINKAGE struct gcov_var functions for writing. Your file may become corrupted if you break these invariants. */ #if IN_LIBGCOV -GCOV_LINKAGE int gcov_open (const char */*name*/); +GCOV_LINKAGE int gcov_open (const char */*name*/) ATTRIBUTE_HIDDEN; #else GCOV_LINKAGE int gcov_open (const char */*name*/, int /*direction*/); GCOV_LINKAGE int gcov_magic (gcov_unsigned_t, gcov_unsigned_t); #endif -GCOV_LINKAGE int gcov_close (void); +GCOV_LINKAGE int gcov_close (void) ATTRIBUTE_HIDDEN; /* Available everywhere. */ static gcov_position_t gcov_position (void); static int gcov_is_error (void); static int gcov_is_eof (void); -GCOV_LINKAGE gcov_unsigned_t gcov_read_unsigned (void); -GCOV_LINKAGE gcov_type gcov_read_counter (void); -GCOV_LINKAGE void gcov_read_summary (struct gcov_summary *); +GCOV_LINKAGE gcov_unsigned_t gcov_read_unsigned (void) ATTRIBUTE_HIDDEN; +GCOV_LINKAGE gcov_type gcov_read_counter (void) ATTRIBUTE_HIDDEN; +GCOV_LINKAGE void gcov_read_summary (struct gcov_summary *) ATTRIBUTE_HIDDEN; #if IN_LIBGCOV /* Available only in libgcov */ -GCOV_LINKAGE void gcov_write_counter (gcov_type); -GCOV_LINKAGE void gcov_write_tag_length (gcov_unsigned_t, gcov_unsigned_t); +GCOV_LINKAGE void gcov_write_counter (gcov_type) ATTRIBUTE_HIDDEN; +GCOV_LINKAGE void gcov_write_tag_length (gcov_unsigned_t, gcov_unsigned_t) + ATTRIBUTE_HIDDEN; GCOV_LINKAGE void gcov_write_summary (gcov_unsigned_t /*tag*/, - const struct gcov_summary *); + const struct gcov_summary *) + ATTRIBUTE_HIDDEN; static void gcov_truncate (void); static void gcov_rewrite (void); -GCOV_LINKAGE void gcov_seek (gcov_position_t /*position*/); +GCOV_LINKAGE void gcov_seek (gcov_position_t /*position*/) ATTRIBUTE_HIDDEN; #else /* Available outside libgcov */ GCOV_LINKAGE const char *gcov_read_string (void); @@ -522,7 +538,7 @@ GCOV_LINKAGE void gcov_sync (gcov_position_t /*base*/, #if !IN_GCOV /* Available outside gcov */ -GCOV_LINKAGE void gcov_write_unsigned (gcov_unsigned_t); +GCOV_LINKAGE void gcov_write_unsigned (gcov_unsigned_t) ATTRIBUTE_HIDDEN; #endif #if !IN_GCOV && !IN_LIBGCOV diff --git a/contrib/gcc/gcse.c b/contrib/gcc/gcse.c index c876738..d06a224 100644 --- a/contrib/gcc/gcse.c +++ b/contrib/gcc/gcse.c @@ -4303,7 +4303,8 @@ do_local_cprop (rtx x, rtx insn, int alter_jumps, rtx *libcall_sp) rtx this_rtx = l->loc; rtx note; - if (l->in_libcall) + /* Don't CSE non-constant values out of libcall blocks. */ + if (l->in_libcall && ! CONSTANT_P (this_rtx)) continue; if (gcse_constant_p (this_rtx)) @@ -4388,7 +4389,7 @@ adjust_libcall_notes (rtx oldreg, rtx newval, rtx insn, rtx *libcall_sp) return true; } } - XEXP (note, 0) = replace_rtx (XEXP (note, 0), oldreg, newval); + XEXP (note, 0) = simplify_replace_rtx (XEXP (note, 0), oldreg, newval); insn = end; } return true; @@ -7777,9 +7778,14 @@ remove_reachable_equiv_notes (basic_block bb, struct ls_expr *smexpr) } bb = act->dest; + /* We used to continue the loop without scanning this block if the + store expression was killed in this block. That is wrong as + we could have had a REG_EQUAL note with the store expression + appear in the block before the insn which killed the store + expression and that REG_EQUAL note needs to be removed as it + is invalid. */ if (bb == EXIT_BLOCK_PTR - || TEST_BIT (visited, bb->index) - || TEST_BIT (ae_kill[bb->index], smexpr->index)) + || TEST_BIT (visited, bb->index)) { act = act->succ_next; continue; @@ -7824,7 +7830,7 @@ remove_reachable_equiv_notes (basic_block bb, struct ls_expr *smexpr) static void replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr) { - rtx insn, mem, note, set, ptr; + rtx insn, mem, note, set, ptr, pair; mem = smexpr->pattern; insn = gen_move_insn (reg, SET_SRC (single_set (del))); @@ -7846,6 +7852,26 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr) XEXP (ptr, 0) = insn; break; } + + /* Move the notes from the deleted insn to its replacement, and patch + up the LIBCALL notes. */ + REG_NOTES (insn) = REG_NOTES (del); + + note = find_reg_note (insn, REG_RETVAL, NULL_RTX); + if (note) + { + pair = XEXP (note, 0); + note = find_reg_note (pair, REG_LIBCALL, NULL_RTX); + XEXP (note, 0) = insn; + } + note = find_reg_note (insn, REG_LIBCALL, NULL_RTX); + if (note) + { + pair = XEXP (note, 0); + note = find_reg_note (pair, REG_RETVAL, NULL_RTX); + XEXP (note, 0) = insn; + } + delete_insn (del); /* Now we must handle REG_EQUAL notes whose contents is equal to the mem; diff --git a/contrib/gcc/ginclude/stddef.h b/contrib/gcc/ginclude/stddef.h index 1bb3e90..03bfbf9 100644 --- a/contrib/gcc/ginclude/stddef.h +++ b/contrib/gcc/ginclude/stddef.h @@ -415,9 +415,9 @@ typedef __WINT_TYPE__ wint_t; #else /* The cast to "char &" below avoids problems with user-defined "operator &", which can appear in a POD type. */ -#define offsetof(TYPE, MEMBER) \ - (__offsetof__ (reinterpret_cast <size_t> \ - (&reinterpret_cast <char &> \ +#define offsetof(TYPE, MEMBER) \ + (__offsetof__ (reinterpret_cast <size_t> \ + (&reinterpret_cast <const volatile char &> \ (static_cast<TYPE *> (0)->MEMBER)))) #endif /* C++ */ #endif /* _STDDEF_H was defined this time */ diff --git a/contrib/gcc/gthr-win32.h b/contrib/gcc/gthr-win32.h index 93f1574..bd86b47 100644 --- a/contrib/gcc/gthr-win32.h +++ b/contrib/gcc/gthr-win32.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Mumit Khan <khan@xraylith.wisc.edu>. This file is part of GCC. @@ -54,10 +54,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA This may cause incorrect error return due to truncation values on hw where sizeof (DWORD) > sizeof (int). - 3. We might consider using Critical Sections instead of Windows32 - mutexes for better performance, but emulating __gthread_mutex_trylock - interface becomes more complicated (Win9x does not support - TryEnterCriticalSectioni, while NT does). + 3. We are currently using a special mutex instead of the Critical + Sections, since Win9x does not support TryEnterCriticalSection + (while NT does). The basic framework should work well enough. In the long term, GCC needs to use Structured Exception Handling on Windows32. */ @@ -339,11 +338,14 @@ typedef struct { long started; } __gthread_once_t; -typedef void* __gthread_mutex_t; +typedef struct { + long counter; + void *sema; +} __gthread_mutex_t; #define __GTHREAD_ONCE_INIT {0, -1} #define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function -#define __GTHREAD_MUTEX_INIT_DEFAULT 0 +#define __GTHREAD_MUTEX_INIT_DEFAULT {-1, 0} #if __MINGW32_MAJOR_VERSION >= 1 || \ (__MINGW32_MAJOR_VERSION == 0 && __MINGW32_MINOR_VERSION > 2) @@ -355,6 +357,29 @@ extern int _CRT_MT; extern int __mingwthr_key_dtor (unsigned long, void (*) (void *)); #endif /* __MINGW32__ version */ +#ifdef __GTHREAD_I486_INLINE_LOCK_PRIMITIVES + +static inline long +__gthr_i486_lock_cmp_xchg(long *dest, long xchg, long comperand) +{ + long result; + __asm__ __volatile__ ("\n\ + lock\n\ + cmpxchg{l} {%4, %1|%1, %4}\n" + : "=a" (result), "=m" (*dest) + : "0" (comperand), "m" (*dest), "r" (xchg) + : "cc"); + return result; +} + +#define __GTHR_W32_InterlockedCompareExchange __gthr_i486_lock_cmp_xchg + +#else /* __GTHREAD_I486_INLINE_LOCK_PRIMITIVES */ + +#define __GTHR_W32_InterlockedCompareExchange InterlockedCompareExchange + +#endif /* __GTHREAD_I486_INLINE_LOCK_PRIMITIVES */ + static inline int __gthread_active_p (void) { @@ -534,8 +559,8 @@ __gthread_setspecific (__gthread_key_t key, const void *ptr) static inline void __gthread_mutex_init_function (__gthread_mutex_t *mutex) { - /* Create unnamed mutex with default security attr and no initial owner. */ - *mutex = CreateMutex (NULL, 0, NULL); + mutex->counter = -1; + mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); } static inline int @@ -545,10 +570,16 @@ __gthread_mutex_lock (__gthread_mutex_t *mutex) if (__gthread_active_p ()) { - if (WaitForSingleObject (*mutex, INFINITE) == WAIT_OBJECT_0) + if (InterlockedIncrement (&mutex->counter) == 0 || + WaitForSingleObject (mutex->sema, INFINITE) == WAIT_OBJECT_0) status = 0; else - status = 1; + { + /* WaitForSingleObject returns WAIT_FAILED, and we can only do + some best-effort cleanup here. */ + InterlockedDecrement (&mutex->counter); + status = 1; + } } return status; } @@ -560,7 +591,7 @@ __gthread_mutex_trylock (__gthread_mutex_t *mutex) if (__gthread_active_p ()) { - if (WaitForSingleObject (*mutex, 0) == WAIT_OBJECT_0) + if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0) status = 0; else status = 1; @@ -572,9 +603,11 @@ static inline int __gthread_mutex_unlock (__gthread_mutex_t *mutex) { if (__gthread_active_p ()) - return (ReleaseMutex (*mutex) != 0) ? 0 : 1; - else - return 0; + { + if (InterlockedDecrement (&mutex->counter) >= 0) + return ReleaseSemaphore (mutex->sema, 1, NULL) ? 0 : 1; + } + return 0; } #endif /* __GTHREAD_HIDE_WIN32API */ diff --git a/contrib/gcc/hooks.c b/contrib/gcc/hooks.c index a8cd665..06a5732 100644 --- a/contrib/gcc/hooks.c +++ b/contrib/gcc/hooks.c @@ -227,3 +227,10 @@ hook_bool_voidp_size_t_false (void * a ATTRIBUTE_UNUSED, { return false; } + +/* Generic hook that takes a tree and returns a NULL string. */ +const char * +hook_constcharptr_tree_null (tree t ATTRIBUTE_UNUSED) +{ + return NULL; +} diff --git a/contrib/gcc/hooks.h b/contrib/gcc/hooks.h index 583b504..8f4c24f 100644 --- a/contrib/gcc/hooks.h +++ b/contrib/gcc/hooks.h @@ -60,5 +60,5 @@ extern rtx hook_rtx_rtx_null (rtx); extern rtx hook_rtx_tree_int_null (tree, int); extern void * hook_voidp_size_t_null (size_t); extern bool hook_bool_voidp_size_t_false (void *, size_t); - +extern const char *hook_constcharptr_tree_null (tree); #endif diff --git a/contrib/gcc/ifcvt.c b/contrib/gcc/ifcvt.c index 640ab2c..b9a5038 100644 --- a/contrib/gcc/ifcvt.c +++ b/contrib/gcc/ifcvt.c @@ -1193,6 +1193,7 @@ noce_try_cmove_arith (struct noce_if_info *if_info) rtx a = if_info->a; rtx b = if_info->b; rtx x = if_info->x; + rtx orig_a, orig_b; rtx insn_a, insn_b; rtx tmp, target; int is_mem = 0; @@ -1248,6 +1249,9 @@ noce_try_cmove_arith (struct noce_if_info *if_info) start_sequence (); + orig_a = a; + orig_b = b; + /* If either operand is complex, load it into a register first. The best way to do this is to copy the original insn. In this way we preserve any clobbers etc that the insn may have had. @@ -1279,7 +1283,7 @@ noce_try_cmove_arith (struct noce_if_info *if_info) } if (! general_operand (b, GET_MODE (b))) { - rtx set; + rtx set, last; if (no_new_pseudos) goto end_seq_and_fail; @@ -1287,9 +1291,7 @@ noce_try_cmove_arith (struct noce_if_info *if_info) if (is_mem) { tmp = gen_reg_rtx (GET_MODE (b)); - tmp = emit_insn (gen_rtx_SET (VOIDmode, - tmp, - b)); + tmp = gen_rtx_SET (VOIDmode, tmp, b); } else if (! insn_b) goto end_seq_and_fail; @@ -1299,8 +1301,22 @@ noce_try_cmove_arith (struct noce_if_info *if_info) tmp = copy_rtx (insn_b); set = single_set (tmp); SET_DEST (set) = b; - tmp = emit_insn (PATTERN (tmp)); + tmp = PATTERN (tmp); + } + + /* If insn to set up A clobbers any registers B depends on, try to + swap insn that sets up A with the one that sets up B. If even + that doesn't help, punt. */ + last = get_last_insn (); + if (last && modified_in_p (orig_b, last)) + { + tmp = emit_insn_before (tmp, get_insns ()); + if (modified_in_p (orig_a, tmp)) + goto end_seq_and_fail; } + else + tmp = emit_insn (tmp); + if (recog_memoized (tmp) < 0) goto end_seq_and_fail; } diff --git a/contrib/gcc/jump.c b/contrib/gcc/jump.c index d2b53f8..ce803a9 100644 --- a/contrib/gcc/jump.c +++ b/contrib/gcc/jump.c @@ -311,6 +311,23 @@ duplicate_loop_exit_test (rtx loop_start) int max_reg = max_reg_num (); rtx *reg_map = 0; rtx loop_pre_header_label; + int loop_depth; + + /* If EXITCODE is not in the loop, then this optimization is not + safe; we will emit a VTOP note entirely outside the loop. */ + for (insn = loop_start, loop_depth = 0; + insn != exitcode; + insn = NEXT_INSN (insn)) + { + if (GET_CODE (insn) != NOTE) + continue; + + if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) + ++loop_depth; + else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END + && --loop_depth == 0) + return 0; + } /* Scan the exit code. We do not perform this optimization if any insn: diff --git a/contrib/gcc/libgcc-darwin.ver b/contrib/gcc/libgcc-darwin.ver index a1038a8..7341cb3 100644 --- a/contrib/gcc/libgcc-darwin.ver +++ b/contrib/gcc/libgcc-darwin.ver @@ -217,3 +217,13 @@ GCC_3.4 { ___paritydi2 ___parityti2 } + +%inherit GCC_3.4.4 GCC_3.4 +GCC_3.4.4 { + # libgcc2 TImode arithmetic (for 64-bit targets). + __absvti2 + __addvti3 + __mulvti3 + __negvti2 + __subvti3 +} diff --git a/contrib/gcc/libgcc-std.ver b/contrib/gcc/libgcc-std.ver index 2dc7bb6..4f57e54 100644 --- a/contrib/gcc/libgcc-std.ver +++ b/contrib/gcc/libgcc-std.ver @@ -222,4 +222,15 @@ GCC_3.4 { GCC_3.4.2 { # Used to deal with trampoline initialization on some platforms __enable_execute_stack + __trampoline_setup +} + +%inherit GCC_3.4.4 GCC_3.4.2 +GCC_3.4.4 { + # libgcc2 TImode arithmetic (for 64-bit targets). + __absvti2 + __addvti3 + __mulvti3 + __negvti2 + __subvti3 } diff --git a/contrib/gcc/libgcc2.c b/contrib/gcc/libgcc2.c index 8d77a7e..4f45b09 100644 --- a/contrib/gcc/libgcc2.c +++ b/contrib/gcc/libgcc2.c @@ -73,7 +73,7 @@ __negdi2 (DWtype u) #ifdef L_addvsi3 Wtype -__addvsi3 (Wtype a, Wtype b) +__addvSI3 (Wtype a, Wtype b) { const Wtype w = a + b; @@ -82,11 +82,23 @@ __addvsi3 (Wtype a, Wtype b) return w; } +#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC +SItype +__addvsi3 (SItype a, SItype b) +{ + const SItype w = a + b; + + if (b >= 0 ? w < a : w > a) + abort (); + + return w; +} +#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */ #endif #ifdef L_addvdi3 DWtype -__addvdi3 (DWtype a, DWtype b) +__addvDI3 (DWtype a, DWtype b) { const DWtype w = a + b; @@ -99,20 +111,32 @@ __addvdi3 (DWtype a, DWtype b) #ifdef L_subvsi3 Wtype -__subvsi3 (Wtype a, Wtype b) +__subvSI3 (Wtype a, Wtype b) { - const DWtype w = a - b; + const Wtype w = a - b; if (b >= 0 ? w > a : w < a) abort (); return w; } +#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC +SItype +__subvsi3 (SItype a, SItype b) +{ + const SItype w = a - b; + + if (b >= 0 ? w > a : w < a) + abort (); + + return w; +} +#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */ #endif #ifdef L_subvdi3 DWtype -__subvdi3 (DWtype a, DWtype b) +__subvDI3 (DWtype a, DWtype b) { const DWtype w = a - b; @@ -126,22 +150,34 @@ __subvdi3 (DWtype a, DWtype b) #ifdef L_mulvsi3 #define WORD_SIZE (sizeof (Wtype) * BITS_PER_UNIT) Wtype -__mulvsi3 (Wtype a, Wtype b) +__mulvSI3 (Wtype a, Wtype b) { const DWtype w = (DWtype) a * (DWtype) b; - if (((a >= 0) == (b >= 0)) - ? (UDWtype) w > (UDWtype) (((DWtype) 1 << (WORD_SIZE - 1)) - 1) - : (UDWtype) w < (UDWtype) ((DWtype) -1 << (WORD_SIZE - 1))) + if ((Wtype) (w >> WORD_SIZE) != (Wtype) w >> (WORD_SIZE - 1)) + abort (); + + return w; +} +#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC +#undef WORD_SIZE +#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT) +SItype +__mulvsi3 (SItype a, SItype b) +{ + const DItype w = (DItype) a * (DItype) b; + + if ((SItype) (w >> WORD_SIZE) != (SItype) w >> (WORD_SIZE-1)) abort (); return w; } +#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */ #endif #ifdef L_negvsi2 Wtype -__negvsi2 (Wtype a) +__negvSI2 (Wtype a) { const Wtype w = -a; @@ -150,11 +186,23 @@ __negvsi2 (Wtype a) return w; } +#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC +SItype +__negvsi2 (SItype a) +{ + const SItype w = -a; + + if (a >= 0 ? w > 0 : w < 0) + abort (); + + return w; +} +#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */ #endif #ifdef L_negvdi2 DWtype -__negvdi2 (DWtype a) +__negvDI2 (DWtype a) { const DWtype w = -a; @@ -167,12 +215,30 @@ __negvdi2 (DWtype a) #ifdef L_absvsi2 Wtype -__absvsi2 (Wtype a) +__absvSI2 (Wtype a) { Wtype w = a; if (a < 0) #ifdef L_negvsi2 + w = __negvSI2 (a); +#else + w = -a; + + if (w < 0) + abort (); +#endif + + return w; +} +#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC +SItype +__absvsi2 (SItype a) +{ + SItype w = a; + + if (a < 0) +#ifdef L_negvsi2 w = __negvsi2 (a); #else w = -a; @@ -183,17 +249,18 @@ __absvsi2 (Wtype a) return w; } +#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */ #endif #ifdef L_absvdi2 DWtype -__absvdi2 (DWtype a) +__absvDI2 (DWtype a) { DWtype w = a; if (a < 0) #ifdef L_negvdi2 - w = __negvdi2 (a); + w = __negvDI2 (a); #else w = -a; @@ -208,7 +275,7 @@ __absvdi2 (DWtype a) #ifdef L_mulvdi3 #define WORD_SIZE (sizeof (Wtype) * BITS_PER_UNIT) DWtype -__mulvdi3 (DWtype u, DWtype v) +__mulvDI3 (DWtype u, DWtype v) { /* The unchecked multiplication needs 3 Wtype x Wtype multiplications, but the checked multiplication needs only two. */ diff --git a/contrib/gcc/libgcc2.h b/contrib/gcc/libgcc2.h index 0bd6d2e..3e4f687 100644 --- a/contrib/gcc/libgcc2.h +++ b/contrib/gcc/libgcc2.h @@ -135,6 +135,16 @@ typedef int word_type __attribute__ ((mode (__word__))); #define float bogus_type #define double bogus_type +/* Versions prior to 3.4.4 were not taking into account the word size for + the 5 trapping arithmetic functions absv, addv, subv, mulv and negv. As + a consequence, the si and di variants were always and the only ones emitted. + To maintain backward compatibility, COMPAT_SIMODE_TRAPPING_ARITHMETIC is + defined on platforms where it makes sense to still have the si variants + emitted. As a bonus, their implementation is now correct. Note that the + same mechanism should have been implemented for the di variants, but it + turns out that no platform would define COMPAT_DIMODE_TRAPPING_ARITHMETIC + if it existed. */ + #if MIN_UNITS_PER_WORD > 4 #define W_TYPE_SIZE (8 * BITS_PER_UNIT) #define Wtype DItype @@ -145,6 +155,7 @@ typedef int word_type __attribute__ ((mode (__word__))); #define UDWtype UTItype #define __NW(a,b) __ ## a ## di ## b #define __NDW(a,b) __ ## a ## ti ## b +#define COMPAT_SIMODE_TRAPPING_ARITHMETIC #elif MIN_UNITS_PER_WORD > 2 \ || (MIN_UNITS_PER_WORD > 1 && LONG_LONG_TYPE_SIZE > 32) #define W_TYPE_SIZE (4 * BITS_PER_UNIT) @@ -210,6 +221,17 @@ typedef int word_type __attribute__ ((mode (__word__))); #define __fixunsdfSI __NW(fixunsdf,) #define __fixunssfSI __NW(fixunssf,) +#define __absvSI2 __NW(absv,2) +#define __addvSI3 __NW(addv,3) +#define __subvSI3 __NW(subv,3) +#define __mulvSI3 __NW(mulv,3) +#define __negvSI2 __NW(negv,2) +#define __absvDI2 __NDW(absv,2) +#define __addvDI3 __NDW(addv,3) +#define __subvDI3 __NDW(subv,3) +#define __mulvDI3 __NDW(mulv,3) +#define __negvDI2 __NDW(negv,2) + #define __ffsSI2 __NW(ffs,2) #define __clzSI2 __NW(clz,2) #define __ctzSI2 __NW(ctz,2) @@ -251,16 +273,24 @@ extern UWtype __udiv_w_sdiv (UWtype *, UWtype, UWtype, UWtype); extern word_type __cmpdi2 (DWtype, DWtype); extern word_type __ucmpdi2 (DWtype, DWtype); -extern Wtype __absvsi2 (Wtype); -extern DWtype __absvdi2 (DWtype); -extern Wtype __addvsi3 (Wtype, Wtype); -extern DWtype __addvdi3 (DWtype, DWtype); -extern Wtype __subvsi3 (Wtype, Wtype); -extern DWtype __subvdi3 (DWtype, DWtype); -extern Wtype __mulvsi3 (Wtype, Wtype); -extern DWtype __mulvdi3 (DWtype, DWtype); -extern Wtype __negvsi2 (Wtype); -extern DWtype __negvdi2 (DWtype); +extern Wtype __absvSI2 (Wtype); +extern Wtype __addvSI3 (Wtype, Wtype); +extern Wtype __subvSI3 (Wtype, Wtype); +extern Wtype __mulvSI3 (Wtype, Wtype); +extern Wtype __negvSI2 (Wtype); +extern DWtype __absvDI2 (DWtype); +extern DWtype __addvDI3 (DWtype, DWtype); +extern DWtype __subvDI3 (DWtype, DWtype); +extern DWtype __mulvDI3 (DWtype, DWtype); +extern DWtype __negvDI2 (DWtype); + +#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC +extern SItype __absvsi2 (SItype); +extern SItype __addvsi3 (SItype, SItype); +extern SItype __subvsi3 (SItype, SItype); +extern SItype __mulvsi3 (SItype, SItype); +extern SItype __negvsi2 (SItype); +#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */ #if BITS_PER_UNIT == 8 extern DWtype __fixdfdi (DFtype); diff --git a/contrib/gcc/loop-unroll.c b/contrib/gcc/loop-unroll.c index aae1757..4852bb2 100644 --- a/contrib/gcc/loop-unroll.c +++ b/contrib/gcc/loop-unroll.c @@ -1269,7 +1269,9 @@ unroll_loop_stupid (struct loops *loops, struct loop *loop) /* Expand a bct instruction in a branch and an increment. If flag_inc is set, the induction variable does not need to be incremented. */ -void expand_bct (edge e, int flag_inc) + +static void +expand_bct (edge e, int flag_inc) { rtx bct_insn = BB_END (e->src); rtx cmp; @@ -1278,12 +1280,11 @@ void expand_bct (edge e, int flag_inc) rtx tgt; rtx condition; - rtx label; + rtx labelref; rtx reg; - rtx jump; - rtx pattern = PATTERN(bct_insn); + rtx pattern = PATTERN (bct_insn); - if (!(is_bct_cond(bct_insn))) + if (!is_bct_cond (bct_insn)) return; inc = get_var_set_from_bct (bct_insn); @@ -1299,14 +1300,12 @@ void expand_bct (edge e, int flag_inc) } condition = XEXP (SET_SRC (cmp), 0); - label = XEXP (SET_SRC (cmp), 1); + labelref = XEXP (SET_SRC (cmp), 1); do_compare_rtx_and_jump (copy_rtx (reg), XEXP (condition, 1), GET_CODE (condition), 0, GET_MODE (reg), NULL_RTX, NULL_RTX, - label); - jump = get_last_insn (); - JUMP_LABEL (jump) = label; + XEXP (labelref, 0)); seq = get_insns (); end_sequence (); emit_insn_after (seq, bct_insn); diff --git a/contrib/gcc/loop.c b/contrib/gcc/loop.c index 5a47309..4ddd77a 100644 --- a/contrib/gcc/loop.c +++ b/contrib/gcc/loop.c @@ -303,6 +303,14 @@ static void record_giv (const struct loop *, struct induction *, rtx, rtx, rtx, rtx, rtx, rtx, int, enum g_types, int, int, rtx *); static void update_giv_derive (const struct loop *, rtx); +static HOST_WIDE_INT get_monotonic_increment (struct iv_class *); +static bool biased_biv_fits_mode_p (const struct loop *, struct iv_class *, + HOST_WIDE_INT, enum machine_mode, + unsigned HOST_WIDE_INT); +static bool biv_fits_mode_p (const struct loop *, struct iv_class *, + HOST_WIDE_INT, enum machine_mode, bool); +static bool extension_within_bounds_p (const struct loop *, struct iv_class *, + HOST_WIDE_INT, rtx); static void check_ext_dependent_givs (const struct loop *, struct iv_class *); static int basic_induction_var (const struct loop *, rtx, enum machine_mode, rtx, rtx, rtx *, rtx *, rtx **); @@ -765,6 +773,9 @@ scan_loop (struct loop *loop, int flags) in_libcall--; if (GET_CODE (p) == INSN) { + /* Do not scan past an optimization barrier. */ + if (GET_CODE (PATTERN (p)) == ASM_INPUT) + break; temp = find_reg_note (p, REG_LIBCALL, NULL_RTX); if (temp) in_libcall++; @@ -3856,7 +3867,7 @@ emit_prefetch_instructions (struct loop *loop) struct prefetch_info info[MAX_PREFETCHES]; struct loop_ivs *ivs = LOOP_IVS (loop); - if (!HAVE_prefetch) + if (!HAVE_prefetch || PREFETCH_BLOCK == 0) return; /* Consider only loops w/o calls. When a call is done, the loop is probably @@ -7364,192 +7375,204 @@ combine_givs_p (struct induction *g1, struct induction *g2) return NULL_RTX; } -/* Check each extension dependent giv in this class to see if its - root biv is safe from wrapping in the interior mode, which would - make the giv illegal. */ +/* See if BL is monotonic and has a constant per-iteration increment. + Return the increment if so, otherwise return 0. */ -static void -check_ext_dependent_givs (const struct loop *loop, struct iv_class *bl) +static HOST_WIDE_INT +get_monotonic_increment (struct iv_class *bl) { - struct loop_info *loop_info = LOOP_INFO (loop); - int ze_ok = 0, se_ok = 0, info_ok = 0; - enum machine_mode biv_mode = GET_MODE (bl->biv->src_reg); - HOST_WIDE_INT start_val; - unsigned HOST_WIDE_INT u_end_val = 0; - unsigned HOST_WIDE_INT u_start_val = 0; - rtx incr = pc_rtx; struct induction *v; + rtx incr; + + /* Get the total increment and check that it is constant. */ + incr = biv_total_increment (bl); + if (incr == 0 || GET_CODE (incr) != CONST_INT) + return 0; + + for (v = bl->biv; v != 0; v = v->next_iv) + { + if (GET_CODE (v->add_val) != CONST_INT) + return 0; + + if (INTVAL (v->add_val) < 0 && INTVAL (incr) >= 0) + return 0; + + if (INTVAL (v->add_val) > 0 && INTVAL (incr) <= 0) + return 0; + } + return INTVAL (incr); +} + + +/* Subroutine of biv_fits_mode_p. Return true if biv BL, when biased by + BIAS, will never exceed the unsigned range of MODE. LOOP is the loop + to which the biv belongs and INCR is its per-iteration increment. */ + +static bool +biased_biv_fits_mode_p (const struct loop *loop, struct iv_class *bl, + HOST_WIDE_INT incr, enum machine_mode mode, + unsigned HOST_WIDE_INT bias) +{ + unsigned HOST_WIDE_INT initial, maximum, span, delta; + + /* We need to be able to manipulate MODE-size constants. */ + if (HOST_BITS_PER_WIDE_INT < GET_MODE_BITSIZE (mode)) + return false; + + /* The number of loop iterations must be constant. */ + if (LOOP_INFO (loop)->n_iterations == 0) + return false; + + /* So must the biv's initial value. */ + if (bl->initial_value == 0 || GET_CODE (bl->initial_value) != CONST_INT) + return false; - /* Make sure the iteration data is available. We must have - constants in order to be certain of no overflow. */ - if (loop_info->n_iterations > 0 - && bl->initial_value - && GET_CODE (bl->initial_value) == CONST_INT - && (incr = biv_total_increment (bl)) - && GET_CODE (incr) == CONST_INT - /* Make sure the host can represent the arithmetic. */ - && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (biv_mode)) - { - unsigned HOST_WIDE_INT abs_incr, total_incr; - HOST_WIDE_INT s_end_val; - int neg_incr; - - info_ok = 1; - start_val = INTVAL (bl->initial_value); - u_start_val = start_val; - - neg_incr = 0, abs_incr = INTVAL (incr); - if (INTVAL (incr) < 0) - neg_incr = 1, abs_incr = -abs_incr; - total_incr = abs_incr * loop_info->n_iterations; - - /* Check for host arithmetic overflow. */ - if (total_incr / loop_info->n_iterations == abs_incr) + initial = bias + INTVAL (bl->initial_value); + maximum = GET_MODE_MASK (mode); + + /* Make sure that the initial value is within range. */ + if (initial > maximum) + return false; + + /* Set up DELTA and SPAN such that the number of iterations * DELTA + (calculated to arbitrary precision) must be <= SPAN. */ + if (incr < 0) + { + delta = -incr; + span = initial; + } + else + { + delta = incr; + /* Handle the special case in which MAXIMUM is the largest + unsigned HOST_WIDE_INT and INITIAL is 0. */ + if (maximum + 1 == initial) + span = LOOP_INFO (loop)->n_iterations * delta; + else + span = maximum + 1 - initial; + } + return (span / LOOP_INFO (loop)->n_iterations >= delta); +} + + +/* Return true if biv BL will never exceed the bounds of MODE. LOOP is + the loop to which BL belongs and INCR is its per-iteration increment. + UNSIGNEDP is true if the biv should be treated as unsigned. */ + +static bool +biv_fits_mode_p (const struct loop *loop, struct iv_class *bl, + HOST_WIDE_INT incr, enum machine_mode mode, bool unsignedp) +{ + struct loop_info *loop_info; + unsigned HOST_WIDE_INT bias; + + /* A biv's value will always be limited to its natural mode. + Larger modes will observe the same wrap-around. */ + if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (bl->biv->src_reg))) + mode = GET_MODE (bl->biv->src_reg); + + loop_info = LOOP_INFO (loop); + + bias = (unsignedp ? 0 : (GET_MODE_MASK (mode) >> 1) + 1); + if (biased_biv_fits_mode_p (loop, bl, incr, mode, bias)) + return true; + + if (mode == GET_MODE (bl->biv->src_reg) + && bl->biv->src_reg == loop_info->iteration_var + && loop_info->comparison_value + && loop_invariant_p (loop, loop_info->comparison_value)) + { + /* If the increment is +1, and the exit test is a <, the BIV + cannot overflow. (For <=, we have the problematic case that + the comparison value might be the maximum value of the range.) */ + if (incr == 1) { - unsigned HOST_WIDE_INT u_max; - HOST_WIDE_INT s_max; - - u_end_val = start_val + (neg_incr ? -total_incr : total_incr); - s_end_val = u_end_val; - u_max = GET_MODE_MASK (biv_mode); - s_max = u_max >> 1; - - /* Check zero extension of biv ok. */ - if (start_val >= 0 - /* Check for host arithmetic overflow. */ - && (neg_incr - ? u_end_val < u_start_val - : u_end_val > u_start_val) - /* Check for target arithmetic overflow. */ - && (neg_incr - ? 1 /* taken care of with host overflow */ - : u_end_val <= u_max)) - { - ze_ok = 1; - } + if (loop_info->comparison_code == LT) + return true; + if (loop_info->comparison_code == LTU && unsignedp) + return true; + } - /* Check sign extension of biv ok. */ - /* ??? While it is true that overflow with signed and pointer - arithmetic is undefined, I fear too many programmers don't - keep this fact in mind -- myself included on occasion. - So leave alone with the signed overflow optimizations. */ - if (start_val >= -s_max - 1 - /* Check for host arithmetic overflow. */ - && (neg_incr - ? s_end_val < start_val - : s_end_val > start_val) - /* Check for target arithmetic overflow. */ - && (neg_incr - ? s_end_val >= -s_max - 1 - : s_end_val <= s_max)) - { - se_ok = 1; - } + /* Likewise for increment -1 and exit test >. */ + if (incr == -1) + { + if (loop_info->comparison_code == GT) + return true; + if (loop_info->comparison_code == GTU && unsignedp) + return true; } } + return false; +} + + +/* Given that X is an extension or truncation of BL, return true + if it is unaffected by overflow. LOOP is the loop to which + BL belongs and INCR is its per-iteration increment. */ - /* If we know the BIV is compared at run-time against an - invariant value, and the increment is +/- 1, we may also - be able to prove that the BIV cannot overflow. */ - else if (bl->biv->src_reg == loop_info->iteration_var - && loop_info->comparison_value - && loop_invariant_p (loop, loop_info->comparison_value) - && (incr = biv_total_increment (bl)) - && GET_CODE (incr) == CONST_INT) - { - /* If the increment is +1, and the exit test is a <, - the BIV cannot overflow. (For <=, we have the - problematic case that the comparison value might - be the maximum value of the range.) */ - if (INTVAL (incr) == 1) - { - if (loop_info->comparison_code == LT) - se_ok = ze_ok = 1; - else if (loop_info->comparison_code == LTU) - ze_ok = 1; - } - - /* Likewise for increment -1 and exit test >. */ - if (INTVAL (incr) == -1) - { - if (loop_info->comparison_code == GT) - se_ok = ze_ok = 1; - else if (loop_info->comparison_code == GTU) - ze_ok = 1; - } +static bool +extension_within_bounds_p (const struct loop *loop, struct iv_class *bl, + HOST_WIDE_INT incr, rtx x) +{ + enum machine_mode mode; + bool signedp, unsignedp; + + switch (GET_CODE (x)) + { + case SIGN_EXTEND: + case ZERO_EXTEND: + mode = GET_MODE (XEXP (x, 0)); + signedp = (GET_CODE (x) == SIGN_EXTEND); + unsignedp = (GET_CODE (x) == ZERO_EXTEND); + break; + + case TRUNCATE: + /* We don't know whether this value is being used as signed + or unsigned, so check the conditions for both. */ + mode = GET_MODE (x); + signedp = unsignedp = true; + break; + + default: + abort (); } - /* Invalidate givs that fail the tests. */ - for (v = bl->giv; v; v = v->next_iv) - if (v->ext_dependent) - { - enum rtx_code code = GET_CODE (v->ext_dependent); - int ok = 0; + return ((!signedp || biv_fits_mode_p (loop, bl, incr, mode, false)) + && (!unsignedp || biv_fits_mode_p (loop, bl, incr, mode, true))); +} - switch (code) - { - case SIGN_EXTEND: - ok = se_ok; - break; - case ZERO_EXTEND: - ok = ze_ok; - break; - case TRUNCATE: - /* We don't know whether this value is being used as either - signed or unsigned, so to safely truncate we must satisfy - both. The initial check here verifies the BIV itself; - once that is successful we may check its range wrt the - derived GIV. This works only if we were able to determine - constant start and end values above. */ - if (se_ok && ze_ok && info_ok) - { - enum machine_mode outer_mode = GET_MODE (v->ext_dependent); - unsigned HOST_WIDE_INT max = GET_MODE_MASK (outer_mode) >> 1; - - /* We know from the above that both endpoints are nonnegative, - and that there is no wrapping. Verify that both endpoints - are within the (signed) range of the outer mode. */ - if (u_start_val <= max && u_end_val <= max) - ok = 1; - } - break; +/* Check each extension dependent giv in this class to see if its + root biv is safe from wrapping in the interior mode, which would + make the giv illegal. */ - default: - abort (); - } +static void +check_ext_dependent_givs (const struct loop *loop, struct iv_class *bl) +{ + struct induction *v; + HOST_WIDE_INT incr; + + incr = get_monotonic_increment (bl); - if (ok) + /* Invalidate givs that fail the tests. */ + for (v = bl->giv; v; v = v->next_iv) + if (v->ext_dependent) + { + if (incr != 0 + && extension_within_bounds_p (loop, bl, incr, v->ext_dependent)) { if (loop_dump_stream) - { - fprintf (loop_dump_stream, - "Verified ext dependent giv at %d of reg %d\n", - INSN_UID (v->insn), bl->regno); - } + fprintf (loop_dump_stream, + "Verified ext dependent giv at %d of reg %d\n", + INSN_UID (v->insn), bl->regno); } else { if (loop_dump_stream) - { - const char *why; - - if (info_ok) - why = "biv iteration values overflowed"; - else - { - if (incr == pc_rtx) - incr = biv_total_increment (bl); - if (incr == const1_rtx) - why = "biv iteration info incomplete; incr by 1"; - else - why = "biv iteration info incomplete"; - } + fprintf (loop_dump_stream, + "Failed ext dependent giv at %d\n", + INSN_UID (v->insn)); - fprintf (loop_dump_stream, - "Failed ext dependent giv at %d, %s\n", - INSN_UID (v->insn), why); - } v->ignore = 1; bl->all_reduced = 0; } diff --git a/contrib/gcc/mkheaders.in b/contrib/gcc/mkheaders.in index 23cb931..74376c3 100644 --- a/contrib/gcc/mkheaders.in +++ b/contrib/gcc/mkheaders.in @@ -66,7 +66,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ libexecdir=@libexecdir@ # Directory in which the compiler finds libraries, etc. -libsubdir=${libdir}/gcc-lib/${target_noncanonical}/${version} +libsubdir=${libdir}/gcc/${target_noncanonical}/${version} # Directory in which the compiler finds executables libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version} # Since gcc_tooldir does not exist at build-time, use -B${build_tooldir}/bin/ diff --git a/contrib/gcc/mklibgcc.in b/contrib/gcc/mklibgcc.in index 806fc9e..143b4e8 100644 --- a/contrib/gcc/mklibgcc.in +++ b/contrib/gcc/mklibgcc.in @@ -13,8 +13,15 @@ # LIBGCOV # LIB2ADD # LIB2ADD_ST +# LIB2ADD_SH # LIB2ADDEH +# LIB2ADDEHSTATIC +# LIB2ADDEHSHARED # LIB2ADDEHDEP +# LIBUNWIND +# LIBUNWINDDEP +# SHLIBUNWIND_LINK +# SHLIBUNWIND_INSTALL # FPBIT # FPBIT_FUNCS # LIB2_DIVMOD_FUNCS @@ -114,7 +121,8 @@ done libgcc2_objs="" libgcc2_st_objs="" -libgcc2_eh_objs="" +libgcc2_eh_static_objs="" +libgcc2_eh_shared_objs="" for name in $lib2funcs; do for ml in $MULTILIBS; do @@ -233,13 +241,27 @@ for file in $LIB2ADDEH; do echo $out: stmp-dirs $file echo " $gcc_compile" $flags -fexceptions -c $file -o $out done - if [ "$SHLIB_LINK" ]; then - libgcc2_eh_objs="$libgcc2_eh_objs ${oname}${objext}" - else + if [ -z "$SHLIB_LINK" ]; then libgcc2_objs="$libgcc2_objs ${oname}${objext}" fi done +if [ "$SHLIB_LINK" ]; then + # Those should be in libgcc_eh.a. + for file in $LIB2ADDEHSTATIC; do + name=`echo $file | sed -e 's/[.][cSo]$//' -e 's/[.]asm$//' -e 's/[.]txt$//'` + oname=`echo $name | sed -e 's,.*/,,'` + libgcc2_eh_static_objs="$libgcc2_eh_static_objs ${oname}${objext}" + done + + # Those should be in libgcc.so. + for file in $LIB2ADDEHSHARED; do + name=`echo $file | sed -e 's/[.][cSo]$//' -e 's/[.]asm$//' -e 's/[.]txt$//'` + oname=`echo $name | sed -e 's,.*/,,'` + libgcc2_eh_shared_objs="$libgcc2_eh_shared_objs ${oname}${objext}" + done +fi + for file in $LIB2ADD_ST; do name=`echo $file | sed -e 's/[.][cSo]$//' -e 's/[.]asm$//' -e 's/[.]txt$//'` oname=`echo $name | sed -e 's,.*/,,'` @@ -258,6 +280,51 @@ for file in $LIB2ADD_ST; do libgcc2_st_objs="$libgcc2_st_objs ${oname}${objext}" done +if [ "$SHLIB_LINK" ]; then + for file in $LIB2ADD_SH; do + name=`echo $file | sed -e 's/[.][cSo]$//' -e 's/[.]asm$//' -e 's/[.]txt$//'` + oname=`echo $name | sed -e 's,.*/,,'` + + for ml in $MULTILIBS; do + dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'` + flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; + out="libgcc/${dir}/${oname}${objext}" + if [ ${name}.asm = ${file} ]; then + flags="$flags -xassembler-with-cpp" + fi + + echo $out: stmp-dirs $file + echo " $gcc_compile" $flags -c $file -o $out + done + libgcc2_sh_objs="$libgcc2_sh_objs ${oname}${objext}" + done +fi + +if [ "$LIBUNWIND" ]; then + libunwind_static_objs="" + libunwind_shared_objs="" + for file in $LIBUNWIND; do + name=`echo $file | sed -e 's/[.][cSo]$//' -e 's/[.]asm$//' -e 's/[.]txt$//'` + oname=`echo $name | sed -e 's,.*/,,'` + + for ml in $MULTILIBS; do + dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'` + flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; + out="libgcc/${dir}/${oname}${objext}" + if [ ${name}.asm = ${file} ]; then + flags="$flags -xassembler-with-cpp" + fi + + echo $out: stmp-dirs $file $LIBUNWINDDEP + echo " $gcc_compile" $flags -fexceptions -c $file -o $out + echo ${out}s: stmp-dirs $file $LIBUNWINDDEP + echo " $gcc_compile" $flags -fexceptions -DSHARED -c $file -o ${out}s + done + libunwind_static_objs="$libunwind_static_objs ${oname}${objext}" + libunwind_shared_objs="$libunwind_shared_objs ${oname}${objext}s" + done +fi + # # build libgcov components # @@ -285,17 +352,24 @@ for ml in $MULTILIBS; do flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; libgcc_objs="" - libgcc_eh_objs="" + libgcc_eh_static_objs="" + libgcc_eh_shared_objs="" for o in $libgcc1_objs; do libgcc_objs="$libgcc_objs libgcc/${dir}/$o" done for o in $libgcc2_objs; do libgcc_objs="$libgcc_objs libgcc/${dir}/$o" done - for o in $libgcc2_eh_objs; do - libgcc_eh_objs="$libgcc_eh_objs libgcc/${dir}/$o" + for o in $libgcc2_eh_static_objs; do + libgcc_eh_static_objs="$libgcc_eh_static_objs libgcc/${dir}/$o" + done + for o in $libgcc2_eh_shared_objs; do + libgcc_eh_shared_objs="$libgcc_eh_shared_objs libgcc/${dir}/$o" + done + libgcc_sh_objs="$libgcc_objs $libgcc_eh_shared_objs" + for o in $libgcc2_sh_objs; do + libgcc_sh_objs="$libgcc_sh_objs libgcc/${dir}/$o" done - libgcc_sh_objs="$libgcc_objs $libgcc_eh_objs" shlib_deps="$libgcc_sh_objs" libgcc_st_objs="" @@ -307,6 +381,18 @@ for ml in $MULTILIBS; do for o in $libgcov_objs; do libgcov_a_objs="$libgcov_a_objs libgcc/${dir}/$o" done + + if [ "$LIBUNWIND" ]; then + libunwind_a_objs="" + for o in $libunwind_static_objs; do + libunwind_a_objs="$libunwind_a_objs libgcc/${dir}/$o" + done + libunwind_sh_objs="" + for o in $libunwind_shared_objs; do + libunwind_sh_objs="$libunwind_sh_objs libgcc/${dir}/$o" + done + shlibunwind_deps="$libunwind_sh_objs" + fi if [ "$SHLIB_LINK" -a "$SHLIB_MKMAP" ]; then mapfile="libgcc/${dir}/libgcc.map" @@ -372,21 +458,37 @@ EOF echo ' $(AR_CREATE_FOR_TARGET)' ${dir}/libgcov.a $libgcov_a_objs echo ' $(RANLIB_FOR_TARGET)' ${dir}/libgcov.a + if [ "$LIBUNWIND" ]; then + echo "" + echo "${dir}/libunwind.a: stmp-dirs $libunwind_a_objs" + echo " -rm -rf ${dir}/libunwind.a" + echo ' $(AR_CREATE_FOR_TARGET)' ${dir}/libunwind.a $libunwind_a_objs + echo ' $(RANLIB_FOR_TARGET)' ${dir}/libunwind.a + echo "" + echo "${dir}/libgcc.a: ${dir}/libunwind.a" + fi + if [ "$SHLIB_LINK" ]; then echo "" - echo "${dir}/libgcc_eh.a: stmp-dirs $libgcc_eh_objs" + echo "${dir}/libgcc_eh.a: stmp-dirs $libgcc_eh_static_objs" echo " -rm -rf ${dir}/libgcc_eh.a" - echo ' $(AR_CREATE_FOR_TARGET)' ${dir}/libgcc_eh.a $libgcc_eh_objs + echo ' $(AR_CREATE_FOR_TARGET)' ${dir}/libgcc_eh.a $libgcc_eh_static_objs echo ' $(RANLIB_FOR_TARGET)' ${dir}/libgcc_eh.a if [ -z "$SHLIB_MULTILIB" ]; then if [ "$dir" = . ]; then shlib_base_name=libgcc_s + shlibunwind_base_name=libunwind else shlib_base_name=libgcc_s_`echo $dir | sed s,/,_,g` + shlibunwind_base_name=libunwind_`echo $dir | sed s,/,_,g` fi shlib_so_name="$shlib_base_name" + shlibunwind_so_name="$shlibunwind_base_name" + if [ "$LIBUNWIND" ]; then + shlib_deps="$shlib_deps ${dir}/${shlibunwind_base_name}${SHLIB_EXT}" + fi shlib_dir= shlib_slibdir_qual= if [ -n "$MULTILIB_OSDIRNAMES" ]; then @@ -398,11 +500,13 @@ EOF os_multilib_base=`echo $os_multilib_dir | sed -n "s~/${gcc_multilib_sup}\$~~p"` if [ -z "$os_multilib_base" ]; then shlib_so_name=libgcc_s + shlibunwind_so_name=libunwind if [ "$os_multilib_dir" != "." ]; then shlib_slibdir_qual="/$os_multilib_dir" fi else shlib_so_name=libgcc_s_`echo $gcc_multilib_sup | sed s,/,_,g` + shlibunwind_so_name=libunwind_`echo $gcc_multilib_sup | sed s,/,_,g` shlib_slibdir_qual="/$os_multilib_base" fi fi @@ -418,8 +522,21 @@ EOF -e "s%@shlib_so_name@%$shlib_so_name%g" \ -e "s%@shlib_dir@%$shlib_dir%g" \ -e "s%@shlib_slibdir_qual@%%g" + if [ "$LIBUNWIND" ]; then + echo "" + echo "${dir}/${shlibunwind_base_name}${SHLIB_EXT}: $shlibunwind_deps" + echo " $SHLIBUNWIND_LINK" \ + | sed -e "s%@multilib_flags@%$flags%g" \ + -e "s%@multilib_dir@%$dir%g" \ + -e "s%@shlib_objs@%$libunwind_sh_objs%g" \ + -e "s%@shlib_base_name@%$shlibunwind_base_name%g" \ + -e "s%@shlib_so_name@%$shlibunwind_so_name%g" \ + -e "s%@shlib_dir@%$shlib_dir%g" \ + -e "s%@shlib_slibdir_qual@%%g" + fi elif [ "$SHLIB_MULTILIB" = "$dir" ]; then shlib_base_name="libgcc_s"; + shlibunwind_base_name="libunwind"; echo "" echo "${shlib_base_name}${SHLIB_EXT}: $shlib_deps" echo " $SHLIB_LINK" \ @@ -431,6 +548,18 @@ EOF -e "s%@shlib_so_name@%$shlib_base_name%g" \ -e "s%@shlib_dir@%%g" \ -e "s%@shlib_slibdir_qual@%%g" + if [ "$LIBUNWIND" ]; then + echo "" + echo "${shlibunwind_base_name}${SHLIB_EXT}: $shlibunwind_deps" + echo " $SHLIBUNWIND_LINK" \ + | sed -e "s%@multilib_flags@%$flags%g" \ + -e "s%@multilib_dir@%$dir%g" \ + -e "s%@shlib_objs@%$libgcc_sh_objs%g" \ + -e "s%@shlib_base_name@%$shlibunwind_base_name%g" \ + -e "s%@shlib_so_name@%$shlibunwind_base_name%g" \ + -e "s%@shlib_dir@%%g" \ + -e "s%@shlib_slibdir_qual@%%g" + fi fi fi done @@ -449,6 +578,7 @@ echo ' if [ -d $(stage)/$$dir ]; then true; else '$mkinstalldirs' $(stage)/$$d echo ' done' echo ' -for dir in '"${dirs}"'; do \' echo ' mv $$dir/*'"${objext}"' $(stage)/$$dir; \' +echo ' mv $$dir/*'"${objext}s"' $(stage)/$$dir || true; \' echo ' test ! -f $$dir/stacknote.s || mv $$dir/stacknote.s $(stage)/$$dir; \' echo ' test ! -f $$dir/libgcc.a || mv $$dir/lib* $(stage)/$$dir; \' echo ' done' @@ -463,6 +593,9 @@ for ml in $MULTILIBS; do dirs="$dirs ${dir} libgcc/${dir}" fi all="$all ${dir}/libgcc.a ${dir}/libgcov.a" + if [ "$LIBUNWIND" ]; then + all="$all ${dir}/libunwind.a" + fi if [ "$SHLIB_LINK" ]; then all="$all ${dir}/libgcc_eh.a" if [ -z "$SHLIB_MULTILIB" ]; then @@ -472,8 +605,14 @@ for ml in $MULTILIBS; do suff=_`echo $dir | sed s,/,_,g` fi all="$all ${dir}/libgcc_s${suff}${SHLIB_EXT}" + if [ "$LIBUNWIND" ]; then + all="$all ${dir}/${dir}/libunwind${suff}${SHLIB_EXT}" + fi elif [ "$SHLIB_MULTILIB" = "$dir" ]; then all="$all libgcc_s${SHLIB_EXT}" + if [ "$LIBUNWIND" ]; then + all="$all ${dir}/${dir}/libunwind${SHLIB_EXT}" + fi fi fi done @@ -533,10 +672,13 @@ for ml in $MULTILIBS; do if [ -z "$SHLIB_MULTILIB" ]; then if [ "$dir" = . ]; then shlib_base_name=libgcc_s + shlibunwind_base_name=libunwind else shlib_base_name=libgcc_s_`echo $dir | sed s,/,_,g` + shlibunwind_base_name=libunwind_`echo $dir | sed s,/,_,g` fi shlib_so_name="$shlib_base_name" + shlibunwind_so_name="$shlibunwind_base_name" shlib_dir= shlib_slibdir_qual= if [ -n "$MULTILIB_OSDIRNAMES" ]; then @@ -549,11 +691,13 @@ for ml in $MULTILIBS; do os_multilib_base=`echo $os_multilib_dir | sed -n "s~/${gcc_multilib_sup}\$~~p"` if [ -z "$os_multilib_base" ]; then shlib_so_name=libgcc_s + shlibunwind_so_name=libunwind if [ "$os_multilib_dir" != "." ]; then shlib_slibdir_qual="/$os_multilib_dir" fi else shlib_so_name=libgcc_s_`echo $gcc_multilib_sup | sed s,/,_,g` + shlibunwind_so_name=libunwind_`echo $gcc_multilib_sup | sed s,/,_,g` shlib_slibdir_qual="/$os_multilib_base" fi fi @@ -562,6 +706,16 @@ for ml in $MULTILIBS; do -e "s%@shlib_so_name@%$shlib_so_name%g" \ -e "s%@shlib_dir@%$shlib_dir%g" \ -e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g" + if [ "$LIBUNWIND" ]; then + echo " $SHLIBUNWIND_INSTALL" \ + | sed -e "s%@shlib_base_name@%$shlibunwind_base_name%g" \ + -e "s%@shlib_so_name@%$shlibunwind_so_name%g" \ + -e "s%@shlib_dir@%$shlib_dir%g" \ + -e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g" + libunwinddir='$(DESTDIR)$(slibdir)$(shlib_slibdir_qual)/$(shlib_dir)' + echo ' $(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/ + echo ' $(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a + fi elif [ "$SHLIB_MULTILIB" = "$dir" ]; then shlib_base_name="libgcc_s"; echo " $SHLIB_INSTALL" \ @@ -569,6 +723,16 @@ for ml in $MULTILIBS; do -e "s%@shlib_so_name@%$shlib_base_name%g" \ -e "s%@shlib_dir@%%g" \ -e "s%@shlib_slibdir_qual@%%g" + if [ "$LIBUNWIND" ]; then + echo " $SHLIBUNWIND_INSTALL" \ + | sed -e "s%@shlib_base_name@%$shlibunwind_base_name%g" \ + -e "s%@shlib_so_name@%$shlibunwind_base_name%g" \ + -e "s%@shlib_dir@%%g" \ + -e "s%@shlib_slibdir_qual@%%g" + libunwinddir='$(DESTDIR)$(slibdir)' + echo ' $(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/ + echo ' $(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a + fi fi fi done diff --git a/contrib/gcc/objc/objc-act.c b/contrib/gcc/objc/objc-act.c index b1762cf..736c79a 100644 --- a/contrib/gcc/objc/objc-act.c +++ b/contrib/gcc/objc/objc-act.c @@ -7389,6 +7389,7 @@ encode_type (tree type, int curtype, int format) { case 32: c = 'f'; break; case 64: + case 96: case 128: c = 'd'; break; default: abort (); } diff --git a/contrib/gcc/params.def b/contrib/gcc/params.def index dc82663..bde128b 100644 --- a/contrib/gcc/params.def +++ b/contrib/gcc/params.def @@ -248,6 +248,15 @@ DEFPARAM(PARAM_MAX_CSELIB_MEMORY_LOCATIONS, "The maximum memory locations recorded by cselib", 500) +DEFPARAM(PARAM_MAX_LAST_VALUE_RTL, + "max-last-value-rtl", + "The maximum number of RTL nodes that can be recorded as \ +combiner's last value", + 10000) + + /* INTEGER_CST nodes are shared for values [{-1,0} .. N) for + {signed,unsigned} integral types. This determines N. + Experimentation shows 256 to be a good value. */ #ifdef ENABLE_GC_ALWAYS_COLLECT # define GGC_MIN_EXPAND_DEFAULT 0 # define GGC_MIN_HEAPSIZE_DEFAULT 0 diff --git a/contrib/gcc/params.h b/contrib/gcc/params.h index 0a78445..3cf392f 100644 --- a/contrib/gcc/params.h +++ b/contrib/gcc/params.h @@ -106,4 +106,6 @@ typedef enum compiler_param PARAM_VALUE (PARAM_MAX_GCSE_PASSES) #define MAX_UNROLLED_INSNS \ PARAM_VALUE (PARAM_MAX_UNROLLED_INSNS) +#define MAX_LAST_VALUE_RTL \ + PARAM_VALUE (PARAM_MAX_LAST_VALUE_RTL) #endif /* ! GCC_PARAMS_H */ diff --git a/contrib/gcc/postreload.c b/contrib/gcc/postreload.c index 6f567f0..8d7461e 100644 --- a/contrib/gcc/postreload.c +++ b/contrib/gcc/postreload.c @@ -118,6 +118,19 @@ reload_cse_simplify (rtx insn, rtx testreg) int count = 0; rtx value = NULL_RTX; + /* Registers mentioned in the clobber list for an asm cannot be reused + within the body of the asm. Invalidate those registers now so that + we don't try to substitute values for them. */ + if (asm_noperands (body) >= 0) + { + for (i = XVECLEN (body, 0) - 1; i >= 0; --i) + { + rtx part = XVECEXP (body, 0, i); + if (GET_CODE (part) == CLOBBER && REG_P (XEXP (part, 0))) + cselib_invalidate_rtx (XEXP (part, 0)); + } + } + /* If every action in a PARALLEL is a noop, we can delete the entire PARALLEL. */ for (i = XVECLEN (body, 0) - 1; i >= 0; --i) diff --git a/contrib/gcc/predict.c b/contrib/gcc/predict.c index f2b4068..9d885fc 100644 --- a/contrib/gcc/predict.c +++ b/contrib/gcc/predict.c @@ -1,5 +1,6 @@ /* Branch prediction routines for the GNU compiler. - Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. This file is part of GCC. @@ -60,7 +61,7 @@ static sreal real_zero, real_one, real_almost_one, real_br_prob_base, real_inv_br_prob_base, real_one_half, real_bb_freq_max; /* Random guesstimation given names. */ -#define PROB_VERY_UNLIKELY (REG_BR_PROB_BASE / 10 - 1) +#define PROB_VERY_UNLIKELY (REG_BR_PROB_BASE / 100 - 1) #define PROB_EVEN (REG_BR_PROB_BASE / 2) #define PROB_VERY_LIKELY (REG_BR_PROB_BASE - PROB_VERY_UNLIKELY) #define PROB_ALWAYS (REG_BR_PROB_BASE) diff --git a/contrib/gcc/real.c b/contrib/gcc/real.c index 11927ee..843725e 100644 --- a/contrib/gcc/real.c +++ b/contrib/gcc/real.c @@ -640,6 +640,9 @@ do_add (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, r->class = rvc_normal; r->sign = sign; r->exp = exp; + /* Zero out the remaining fields. */ + r->signalling = 0; + r->canonical = 0; /* Re-normalize the result. */ normalize (r); @@ -1960,6 +1963,7 @@ real_from_integer (REAL_VALUE_TYPE *r, enum machine_mode mode, get_zero (r, 0); else { + memset (r, 0, sizeof (*r)); r->class = rvc_normal; r->sign = high < 0 && !unsigned_p; r->exp = 2 * HOST_BITS_PER_WIDE_INT; @@ -1977,7 +1981,6 @@ real_from_integer (REAL_VALUE_TYPE *r, enum machine_mode mode, { r->sig[SIGSZ-1] = high; r->sig[SIGSZ-2] = low; - memset (r->sig, 0, sizeof(long)*(SIGSZ-2)); } else if (HOST_BITS_PER_LONG*2 == HOST_BITS_PER_WIDE_INT) { @@ -1985,8 +1988,6 @@ real_from_integer (REAL_VALUE_TYPE *r, enum machine_mode mode, r->sig[SIGSZ-2] = high; r->sig[SIGSZ-3] = low >> (HOST_BITS_PER_LONG - 1) >> 1; r->sig[SIGSZ-4] = low; - if (SIGSZ > 4) - memset (r->sig, 0, sizeof(long)*(SIGSZ-4)); } else abort (); diff --git a/contrib/gcc/reg-stack.c b/contrib/gcc/reg-stack.c index 9a6c89b..0f284ac 100644 --- a/contrib/gcc/reg-stack.c +++ b/contrib/gcc/reg-stack.c @@ -1060,10 +1060,21 @@ move_for_stack_reg (rtx insn, stack regstack, rtx pat) if (regstack->reg[i] == REGNO (src)) break; - /* The source must be live, and the dest must be dead. */ - if (i < 0 || get_hard_regnum (regstack, dest) >= FIRST_STACK_REG) + /* The destination must be dead, or life analysis is borked. */ + if (get_hard_regnum (regstack, dest) >= FIRST_STACK_REG) abort (); + /* If the source is not live, this is yet another case of + uninitialized variables. Load up a NaN instead. */ + if (i < 0) + { + PATTERN (insn) = pat + = gen_rtx_SET (VOIDmode, + FP_MODE_REG (REGNO (dest), SFmode), nan); + INSN_CODE (insn) = -1; + return move_for_stack_reg (insn, regstack, pat); + } + /* It is possible that the dest is unused after this insn. If so, just pop the src. */ diff --git a/contrib/gcc/regclass.c b/contrib/gcc/regclass.c index 2e4dc61..c3bbd15 100644 --- a/contrib/gcc/regclass.c +++ b/contrib/gcc/regclass.c @@ -44,6 +44,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "output.h" #include "ggc.h" #include "timevar.h" +#include "hashtab.h" static void init_reg_sets_1 (void); static void init_reg_autoinc (void); @@ -103,6 +104,13 @@ static const char initial_call_used_regs[] = CALL_USED_REGISTERS; char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS; #endif +#ifdef CALL_REALLY_USED_REGISTERS +#define CALL_REALLY_USED_REGNO_P(X) call_really_used_regs[X] +#else +#define CALL_REALLY_USED_REGNO_P(X) call_used_regs[X] +#endif + + /* Indexed by hard register number, contains 1 for registers that are fixed use or call used registers that cannot hold quantities across calls even if we are willing to save and restore them. call fixed @@ -223,12 +231,6 @@ static char *in_inc_dec; #endif /* FORBIDDEN_INC_DEC_CLASSES */ -#ifdef CANNOT_CHANGE_MODE_CLASS -/* All registers that have been subreged. Indexed by regno * MAX_MACHINE_MODE - + mode. */ -bitmap_head subregs_of_mode; -#endif - /* Sample MEM values for use by memory_move_secondary_cost. */ static GTY(()) rtx top_of_stack[MAX_MACHINE_MODE]; @@ -436,7 +438,11 @@ init_reg_sets_1 (void) If we are generating PIC code, the PIC offset table register is preserved across calls, though the target can override that. */ - if (i == STACK_POINTER_REGNUM || i == FRAME_POINTER_REGNUM) + if (i == STACK_POINTER_REGNUM) + ; + else if (global_regs[i]) + SET_HARD_REG_BIT (regs_invalidated_by_call, i); + else if (i == FRAME_POINTER_REGNUM) ; #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM else if (i == HARD_FRAME_POINTER_REGNUM) @@ -450,13 +456,7 @@ init_reg_sets_1 (void) else if (i == (unsigned) PIC_OFFSET_TABLE_REGNUM && fixed_regs[i]) ; #endif - else if (0 -#ifdef CALL_REALLY_USED_REGISTERS - || call_really_used_regs[i] -#else - || call_used_regs[i] -#endif - || global_regs[i]) + else if (CALL_REALLY_USED_REGNO_P (i)) SET_HARD_REG_BIT (regs_invalidated_by_call, i); } @@ -778,6 +778,12 @@ globalize_reg (int i) global_regs[i] = 1; + /* If we're globalizing the frame pointer, we need to set the + appropriate regs_invalidated_by_call bit, even if it's already + set in fixed_regs. */ + if (i != STACK_POINTER_REGNUM) + SET_HARD_REG_BIT (regs_invalidated_by_call, i); + /* If already fixed, nothing else to do. */ if (fixed_regs[i]) return; @@ -788,7 +794,6 @@ globalize_reg (int i) SET_HARD_REG_BIT (fixed_reg_set, i); SET_HARD_REG_BIT (call_used_reg_set, i); SET_HARD_REG_BIT (call_fixed_reg_set, i); - SET_HARD_REG_BIT (regs_invalidated_by_call, i); } /* Now the data and code for the `regclass' pass, which happens @@ -2566,6 +2571,70 @@ regset_release_memory (void) } #ifdef CANNOT_CHANGE_MODE_CLASS + +struct subregs_of_mode_node +{ + unsigned int block; + unsigned char modes[MAX_MACHINE_MODE]; +}; + +static htab_t subregs_of_mode; + +static hashval_t +som_hash (const void *x) +{ + const struct subregs_of_mode_node *a = x; + return a->block; +} + +static int +som_eq (const void *x, const void *y) +{ + const struct subregs_of_mode_node *a = x; + const struct subregs_of_mode_node *b = y; + return a->block == b->block; +} + +void +init_subregs_of_mode (void) +{ + if (subregs_of_mode) + htab_empty (subregs_of_mode); + else + subregs_of_mode = htab_create (100, som_hash, som_eq, free); +} + +void +record_subregs_of_mode (rtx subreg) +{ + struct subregs_of_mode_node dummy, *node; + enum machine_mode mode; + unsigned int regno; + void **slot; + + if (!REG_P (SUBREG_REG (subreg))) + return; + + regno = REGNO (SUBREG_REG (subreg)); + mode = GET_MODE (subreg); + + if (regno < FIRST_PSEUDO_REGISTER) + return; + + dummy.block = regno & -8; + slot = htab_find_slot_with_hash (subregs_of_mode, &dummy, + dummy.block, INSERT); + node = *slot; + if (node == NULL) + { + node = xcalloc (1, sizeof (*node)); + node->block = regno & -8; + *slot = node; + } + + node->modes[mode] |= 1 << (regno & 7); +} + /* Set bits in *USED which correspond to registers which can't change their mode from FROM to any mode in which REGNO was encountered. */ @@ -2573,19 +2642,23 @@ void cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from, unsigned int regno) { + struct subregs_of_mode_node dummy, *node; enum machine_mode to; - int n, i; - int start = regno * MAX_MACHINE_MODE; + unsigned char mask; + unsigned int i; - EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n, - if (n >= MAX_MACHINE_MODE + start) - return; - to = n - start; - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (! TEST_HARD_REG_BIT (*used, i) - && REG_CANNOT_CHANGE_MODE_P (i, from, to)) - SET_HARD_REG_BIT (*used, i); - ); + dummy.block = regno & -8; + node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block); + if (node == NULL) + return; + + mask = 1 << (regno & 7); + for (to = VOIDmode; to < NUM_MACHINE_MODES; to++) + if (node->modes[to] & mask) + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (!TEST_HARD_REG_BIT (*used, i) + && REG_CANNOT_CHANGE_MODE_P (i, from, to)) + SET_HARD_REG_BIT (*used, i); } /* Return 1 if REGNO has had an invalid mode change in CLASS from FROM @@ -2593,20 +2666,24 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from, bool invalid_mode_change_p (unsigned int regno, enum reg_class class, - enum machine_mode from_mode) + enum machine_mode from) { - enum machine_mode to_mode; - int n; - int start = regno * MAX_MACHINE_MODE; - - EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n, - if (n >= MAX_MACHINE_MODE + start) - return 0; - to_mode = n - start; - if (CANNOT_CHANGE_MODE_CLASS (from_mode, to_mode, class)) - return 1; - ); - return 0; + struct subregs_of_mode_node dummy, *node; + enum machine_mode to; + unsigned char mask; + + dummy.block = regno & -8; + node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block); + if (node == NULL) + return false; + + mask = 1 << (regno & 7); + for (to = VOIDmode; to < NUM_MACHINE_MODES; to++) + if (node->modes[to] & mask) + if (CANNOT_CHANGE_MODE_CLASS (from, to, class)) + return true; + + return false; } #endif /* CANNOT_CHANGE_MODE_CLASS */ diff --git a/contrib/gcc/regrename.c b/contrib/gcc/regrename.c index e725ee9..8c326c0 100644 --- a/contrib/gcc/regrename.c +++ b/contrib/gcc/regrename.c @@ -101,8 +101,12 @@ note_sets (rtx x, rtx set ATTRIBUTE_UNUSED, void *data) HARD_REG_SET *pset = (HARD_REG_SET *) data; unsigned int regno; int nregs; + + if (GET_CODE (x) == SUBREG) + x = SUBREG_REG (x); if (GET_CODE (x) != REG) return; + regno = REGNO (x); nregs = HARD_REGNO_NREGS (regno, GET_MODE (x)); diff --git a/contrib/gcc/regs.h b/contrib/gcc/regs.h index 9c9edcc..bb1f43d 100644 --- a/contrib/gcc/regs.h +++ b/contrib/gcc/regs.h @@ -66,8 +66,6 @@ typedef struct reg_info_def extern varray_type reg_n_info; -extern bitmap_head subregs_of_mode; - /* Indexed by n, gives number of times (REG n) is used or set. */ #define REG_N_REFS(N) (VARRAY_REG (reg_n_info, N)->refs) diff --git a/contrib/gcc/reload.c b/contrib/gcc/reload.c index 0dfac2c..9eae9ff 100644 --- a/contrib/gcc/reload.c +++ b/contrib/gcc/reload.c @@ -2144,12 +2144,15 @@ operands_match_p (rtx x, rtx y) j = REGNO (y); /* On a WORDS_BIG_ENDIAN machine, point to the last register of a - multiple hard register group, so that for example (reg:DI 0) and - (reg:SI 1) will be considered the same register. */ + multiple hard register group of scalar integer registers, so that + for example (reg:DI 0) and (reg:SI 1) will be considered the same + register. */ if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD + && SCALAR_INT_MODE_P (GET_MODE (x)) && i < FIRST_PSEUDO_REGISTER) i += HARD_REGNO_NREGS (i, GET_MODE (x)) - 1; if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (y)) > UNITS_PER_WORD + && SCALAR_INT_MODE_P (GET_MODE (y)) && j < FIRST_PSEUDO_REGISTER) j += HARD_REGNO_NREGS (j, GET_MODE (y)) - 1; @@ -3061,6 +3064,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, { /* Operands don't match. */ rtx value; + int loc1, loc2; /* Retroactively mark the operand we had to match as a loser, if it wasn't already. */ if (this_alternative_win[m]) @@ -3069,12 +3073,26 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, if (this_alternative[m] == (int) NO_REGS) bad = 1; /* But count the pair only once in the total badness of - this alternative, if the pair can be a dummy reload. */ + this alternative, if the pair can be a dummy reload. + The pointers in operand_loc are not swapped; swap + them by hand if necessary. */ + if (swapped && i == commutative) + loc1 = commutative + 1; + else if (swapped && i == commutative + 1) + loc1 = commutative; + else + loc1 = i; + if (swapped && m == commutative) + loc2 = commutative + 1; + else if (swapped && m == commutative + 1) + loc2 = commutative; + else + loc2 = m; value = find_dummy_reload (recog_data.operand[i], recog_data.operand[m], - recog_data.operand_loc[i], - recog_data.operand_loc[m], + recog_data.operand_loc[loc1], + recog_data.operand_loc[loc2], operand_mode[i], operand_mode[m], this_alternative[m], -1, this_alternative_earlyclobber[m]); diff --git a/contrib/gcc/reload1.c b/contrib/gcc/reload1.c index 1055de8..26f62aa 100644 --- a/contrib/gcc/reload1.c +++ b/contrib/gcc/reload1.c @@ -1,6 +1,6 @@ /* Reload pseudo regs into hard regs for insns that require hard regs. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -3324,6 +3324,14 @@ set_initial_elim_offsets (void) num_not_at_initial_offset = 0; } +/* Subroutine of set_initial_label_offsets called via for_each_eh_label. */ + +static void +set_initial_eh_label_offset (rtx label) +{ + set_label_offsets (label, NULL_RTX, 1); +} + /* Initialize the known label offsets. Set a known offset for each forced label to be at the initial offset of each elimination. We do this because we assume that all @@ -3340,6 +3348,8 @@ set_initial_label_offsets (void) for (x = forced_labels; x; x = XEXP (x, 1)) if (XEXP (x, 0)) set_label_offsets (XEXP (x, 0), NULL_RTX, 1); + + for_each_eh_label (set_initial_eh_label_offset); } /* Set all elimination offsets to the known values for the code label given @@ -5402,19 +5412,18 @@ choose_reload_regs (struct insn_chain *chain) need_mode = mode; else need_mode - = smallest_mode_for_size (GET_MODE_SIZE (mode) + byte, + = smallest_mode_for_size (GET_MODE_BITSIZE (mode) + + byte * BITS_PER_UNIT, GET_MODE_CLASS (mode)); - if ( -#ifdef CANNOT_CHANGE_MODE_CLASS - (!REG_CANNOT_CHANGE_MODE_P (i, GET_MODE (last_reg), - need_mode) - && -#endif - (GET_MODE_SIZE (GET_MODE (last_reg)) + if ((GET_MODE_SIZE (GET_MODE (last_reg)) >= GET_MODE_SIZE (need_mode)) #ifdef CANNOT_CHANGE_MODE_CLASS - ) + /* Verify that the register in "i" can be obtained + from LAST_REG. */ + && !REG_CANNOT_CHANGE_MODE_P (REGNO (last_reg), + GET_MODE (last_reg), + mode) #endif && reg_reloaded_contents[i] == regno && TEST_HARD_REG_BIT (reg_reloaded_valid, i) @@ -6815,6 +6824,10 @@ do_input_reload (struct insn_chain *chain, struct reload *rl, int j) actually no need to store the old value in it. */ if (optimize + /* Only attempt this for input reloads; for RELOAD_OTHER we miss + that there may be multiple uses of the previous output reload. + Restricting to RELOAD_FOR_INPUT is mostly paranoia. */ + && rl->when_needed == RELOAD_FOR_INPUT && (reload_inherited[j] || reload_override_in[j]) && rl->reg_rtx && GET_CODE (rl->reg_rtx) == REG diff --git a/contrib/gcc/rtl.h b/contrib/gcc/rtl.h index 27455f2..d75789f 100644 --- a/contrib/gcc/rtl.h +++ b/contrib/gcc/rtl.h @@ -2199,6 +2199,8 @@ extern void regclass (rtx, int, FILE *); extern void reg_scan (rtx, unsigned int, int); extern void reg_scan_update (rtx, rtx, unsigned int); extern void fix_register (const char *, int, int); +extern void init_subregs_of_mode (void); +extern void record_subregs_of_mode (rtx); #ifdef HARD_CONST extern void cannot_change_mode_set_regs (HARD_REG_SET *, enum machine_mode, unsigned int); diff --git a/contrib/gcc/sibcall.c b/contrib/gcc/sibcall.c index 81509ee..1d647f1 100644 --- a/contrib/gcc/sibcall.c +++ b/contrib/gcc/sibcall.c @@ -330,8 +330,10 @@ static int call_ends_block_p (rtx insn, rtx end) { rtx new_insn; + /* END might be a note, so get the last nonnote insn of the block. */ - end = next_nonnote_insn (PREV_INSN (end)); + if (NOTE_P (end)) + end = prev_nonnote_insn (end); /* If the call was the end of the block, then we're OK. */ if (insn == end) diff --git a/contrib/gcc/simplify-rtx.c b/contrib/gcc/simplify-rtx.c index a6c5007..fb222f7 100644 --- a/contrib/gcc/simplify-rtx.c +++ b/contrib/gcc/simplify-rtx.c @@ -204,7 +204,8 @@ simplify_gen_relational (enum rtx_code code, enum machine_mode mode, if (cmp_mode == VOIDmode) cmp_mode = GET_MODE (op1); - if (cmp_mode != VOIDmode) + if (cmp_mode != VOIDmode + && ! VECTOR_MODE_P (mode)) { tem = simplify_relational_operation (code, cmp_mode, op0, op1); @@ -772,7 +773,17 @@ simplify_unary_operation (enum rtx_code code, enum machine_mode mode, case FIX: real_arithmetic (&d, FIX_TRUNC_EXPR, &d, NULL); break; - + case NOT: + { + long tmp[4]; + int i; + + real_to_target (tmp, &d, GET_MODE (trueop)); + for (i = 0; i < 4; i++) + tmp[i] = ~tmp[i]; + real_from_target (&d, tmp, mode); + break; + } default: abort (); } @@ -1183,6 +1194,7 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode, } if (VECTOR_MODE_P (mode) + && code != VEC_CONCAT && GET_CODE (trueop0) == CONST_VECTOR && GET_CODE (trueop1) == CONST_VECTOR) { @@ -1218,60 +1230,91 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode, && GET_CODE (trueop1) == CONST_DOUBLE && mode == GET_MODE (op0) && mode == GET_MODE (op1)) { - REAL_VALUE_TYPE f0, f1, value; - - REAL_VALUE_FROM_CONST_DOUBLE (f0, trueop0); - REAL_VALUE_FROM_CONST_DOUBLE (f1, trueop1); - f0 = real_value_truncate (mode, f0); - f1 = real_value_truncate (mode, f1); + if (code == AND + || code == IOR + || code == XOR) + { + long tmp0[4]; + long tmp1[4]; + REAL_VALUE_TYPE r; + int i; + + real_to_target (tmp0, CONST_DOUBLE_REAL_VALUE (op0), + GET_MODE (op0)); + real_to_target (tmp1, CONST_DOUBLE_REAL_VALUE (op1), + GET_MODE (op1)); + for (i = 0; i < 4; i++) + { + if (code == AND) + tmp0[i] &= tmp1[i]; + else if (code == IOR) + tmp0[i] |= tmp1[i]; + else if (code == XOR) + tmp0[i] ^= tmp1[i]; + else + abort (); + } + real_from_target (&r, tmp0, mode); + return CONST_DOUBLE_FROM_REAL_VALUE (r, mode); + } + else + { + REAL_VALUE_TYPE f0, f1, value; - if (HONOR_SNANS (mode) - && (REAL_VALUE_ISNAN (f0) || REAL_VALUE_ISNAN (f1))) - return 0; + REAL_VALUE_FROM_CONST_DOUBLE (f0, trueop0); + REAL_VALUE_FROM_CONST_DOUBLE (f1, trueop1); + f0 = real_value_truncate (mode, f0); + f1 = real_value_truncate (mode, f1); - if (code == DIV - && REAL_VALUES_EQUAL (f1, dconst0) - && (flag_trapping_math || ! MODE_HAS_INFINITIES (mode))) - return 0; + if (HONOR_SNANS (mode) + && (REAL_VALUE_ISNAN (f0) || REAL_VALUE_ISNAN (f1))) + return 0; - if (MODE_HAS_INFINITIES (mode) && HONOR_NANS (mode) - && flag_trapping_math - && REAL_VALUE_ISINF (f0) && REAL_VALUE_ISINF (f1)) - { - int s0 = REAL_VALUE_NEGATIVE (f0); - int s1 = REAL_VALUE_NEGATIVE (f1); + if (code == DIV + && REAL_VALUES_EQUAL (f1, dconst0) + && (flag_trapping_math || ! MODE_HAS_INFINITIES (mode))) + return 0; - switch (code) + if (MODE_HAS_INFINITIES (mode) && HONOR_NANS (mode) + && flag_trapping_math + && REAL_VALUE_ISINF (f0) && REAL_VALUE_ISINF (f1)) { - case PLUS: - /* Inf + -Inf = NaN plus exception. */ - if (s0 != s1) - return 0; - break; - case MINUS: - /* Inf - Inf = NaN plus exception. */ - if (s0 == s1) - return 0; - break; - case DIV: - /* Inf / Inf = NaN plus exception. */ - return 0; - default: - break; + int s0 = REAL_VALUE_NEGATIVE (f0); + int s1 = REAL_VALUE_NEGATIVE (f1); + + switch (code) + { + case PLUS: + /* Inf + -Inf = NaN plus exception. */ + if (s0 != s1) + return 0; + break; + case MINUS: + /* Inf - Inf = NaN plus exception. */ + if (s0 == s1) + return 0; + break; + case DIV: + /* Inf / Inf = NaN plus exception. */ + return 0; + default: + break; + } } - } - if (code == MULT && MODE_HAS_INFINITIES (mode) && HONOR_NANS (mode) - && flag_trapping_math - && ((REAL_VALUE_ISINF (f0) && REAL_VALUES_EQUAL (f1, dconst0)) - || (REAL_VALUE_ISINF (f1) && REAL_VALUES_EQUAL (f0, dconst0)))) - /* Inf * 0 = NaN plus exception. */ - return 0; + if (code == MULT && MODE_HAS_INFINITIES (mode) && HONOR_NANS (mode) + && flag_trapping_math + && ((REAL_VALUE_ISINF (f0) && REAL_VALUES_EQUAL (f1, dconst0)) + || (REAL_VALUE_ISINF (f1) + && REAL_VALUES_EQUAL (f0, dconst0)))) + /* Inf * 0 = NaN plus exception. */ + return 0; - REAL_ARITHMETIC (value, rtx_to_tree_code (code), f0, f1); + REAL_ARITHMETIC (value, rtx_to_tree_code (code), f0, f1); - value = real_value_truncate (mode, value); - return CONST_DOUBLE_FROM_REAL_VALUE (value, mode); + value = real_value_truncate (mode, value); + return CONST_DOUBLE_FROM_REAL_VALUE (value, mode); + } } /* We can fold some multi-word operations. */ @@ -3531,6 +3574,8 @@ simplify_rtx (rtx x) XEXP (x, 2)); case '<': + if (VECTOR_MODE_P (mode)) + return NULL_RTX; temp = simplify_relational_operation (code, ((GET_MODE (XEXP (x, 0)) != VOIDmode) diff --git a/contrib/gcc/target-def.h b/contrib/gcc/target-def.h index f21025a..32d00ae 100644 --- a/contrib/gcc/target-def.h +++ b/contrib/gcc/target-def.h @@ -301,6 +301,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P hook_bool_tree_false #define TARGET_MS_BITFIELD_LAYOUT_P hook_bool_tree_false #define TARGET_RTX_COSTS hook_bool_rtx_int_int_intp_false +#define TARGET_MANGLE_FUNDAMENTAL_TYPE hook_constcharptr_tree_null #ifndef TARGET_INIT_LIBFUNCS #define TARGET_INIT_LIBFUNCS hook_void_void @@ -369,6 +370,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. TARGET_MS_BITFIELD_LAYOUT_P, \ TARGET_INIT_BUILTINS, \ TARGET_EXPAND_BUILTIN, \ + TARGET_MANGLE_FUNDAMENTAL_TYPE, \ TARGET_INIT_LIBFUNCS, \ TARGET_SECTION_TYPE_FLAGS, \ TARGET_CANNOT_MODIFY_JUMPS_P, \ diff --git a/contrib/gcc/target.h b/contrib/gcc/target.h index d7729ba..59788f9 100644 --- a/contrib/gcc/target.h +++ b/contrib/gcc/target.h @@ -302,6 +302,11 @@ struct gcc_target rtx (* expand_builtin) (tree exp, rtx target, rtx subtarget, enum machine_mode mode, int ignore); + /* For a vendor-specific fundamental TYPE, return a pointer to + a statically-allocated string containing the C++ mangling for + TYPE. In all other cases, return NULL. */ + const char * (* mangle_fundamental_type) (tree type); + /* Make any adjustments to libfunc names needed for this target. */ void (* init_libfuncs) (void); diff --git a/contrib/gcc/toplev.c b/contrib/gcc/toplev.c index 4e7a73a..3c9dbcb 100644 --- a/contrib/gcc/toplev.c +++ b/contrib/gcc/toplev.c @@ -1860,6 +1860,9 @@ compile_file (void) dw2_output_indirect_constants (); + /* Flush any pending equate directives. */ + process_pending_assemble_output_defs (); + if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities) { timevar_push (TV_DUMP); @@ -3656,8 +3659,7 @@ rest_of_compilation (tree decl) if ((*targetm.binds_local_p) (current_function_decl)) { int pref = cfun->preferred_stack_boundary; - if (cfun->recursive_call_emit - && cfun->stack_alignment_needed > cfun->preferred_stack_boundary) + if (cfun->stack_alignment_needed > cfun->preferred_stack_boundary) pref = cfun->stack_alignment_needed; cgraph_rtl_info (current_function_decl)->preferred_incoming_stack_boundary = pref; @@ -4489,8 +4491,6 @@ process_options (void) static void backend_init (void) { - init_adjust_machine_modes (); - init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL || debug_info_level == DINFO_LEVEL_VERBOSE #ifdef VMS_DEBUGGING_INFO @@ -4634,6 +4634,11 @@ do_compile (void) /* Don't do any more if an error has already occurred. */ if (!errorcount) { + /* This must be run always, because it is needed to compute the FP + predefined macros, such as __LDBL_MAX__, for targets using non + default FP formats. */ + init_adjust_machine_modes (); + /* Set up the back-end if requested. */ if (!no_backend) backend_init (); diff --git a/contrib/gcc/tree-inline.c b/contrib/gcc/tree-inline.c index dac0f04..ccc49e7 100644 --- a/contrib/gcc/tree-inline.c +++ b/contrib/gcc/tree-inline.c @@ -1340,7 +1340,8 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) } else if (warn_inline && DECL_DECLARED_INLINE_P (fn) && !DECL_IN_SYSTEM_HEADER (fn) - && strlen (reason)) + && strlen (reason) + && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn))) { warning ("%Jinlining failed in call to '%F': %s", fn, fn, reason); warning ("called from here"); @@ -1547,8 +1548,11 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) splay_tree_delete (id->decl_map); id->decl_map = st; - /* The new expression has side-effects if the old one did. */ - TREE_SIDE_EFFECTS (expr) = TREE_SIDE_EFFECTS (t); + /* Although, from the semantic viewpoint, the new expression has + side-effects only if the old one did, it is not possible, from + the technical viewpoint, to evaluate the body of a function + multiple times without serious havoc. */ + TREE_SIDE_EFFECTS (expr) = 1; /* Replace the call by the inlined body. Wrap it in an EXPR_WITH_FILE_LOCATION so that we'll get debugging line notes diff --git a/contrib/gcc/tree.c b/contrib/gcc/tree.c index 32f1c18..1d1a8e3 100644 --- a/contrib/gcc/tree.c +++ b/contrib/gcc/tree.c @@ -106,7 +106,6 @@ static int type_hash_eq (const void *, const void *); static hashval_t type_hash_hash (const void *); static void print_type_hash_statistics (void); static void finish_vector_type (tree); -static tree make_vector (enum machine_mode, tree, int); static int type_hash_marked_p (const void *); tree global_trees[TI_MAX]; @@ -4984,10 +4983,56 @@ build_common_tree_nodes_2 (int short_double) V4DF_type_node = make_vector (V4DFmode, double_type_node, 0); } +/* HACK. GROSS. This is absolutely disgusting. I wish there was a + better way. + + If we requested a pointer to a vector, build up the pointers that + we stripped off while looking for the inner type. Similarly for + return values from functions. + + The argument TYPE is the top of the chain, and BOTTOM is the + new type which we will point to. */ + +tree +reconstruct_complex_type (tree type, tree bottom) +{ + tree inner, outer; + + if (POINTER_TYPE_P (type)) + { + inner = reconstruct_complex_type (TREE_TYPE (type), bottom); + outer = build_pointer_type (inner); + } + else if (TREE_CODE (type) == ARRAY_TYPE) + { + inner = reconstruct_complex_type (TREE_TYPE (type), bottom); + outer = build_array_type (inner, TYPE_DOMAIN (type)); + } + else if (TREE_CODE (type) == FUNCTION_TYPE) + { + inner = reconstruct_complex_type (TREE_TYPE (type), bottom); + outer = build_function_type (inner, TYPE_ARG_TYPES (type)); + } + else if (TREE_CODE (type) == METHOD_TYPE) + { + inner = reconstruct_complex_type (TREE_TYPE (type), bottom); + outer = build_method_type_directly (TYPE_METHOD_BASETYPE (type), + inner, + TYPE_ARG_TYPES (type)); + } + else + return bottom; + + TREE_READONLY (outer) = TREE_READONLY (type); + TREE_THIS_VOLATILE (outer) = TREE_THIS_VOLATILE (type); + + return outer; +} + /* Returns a vector tree node given a vector mode, the inner type, and the signness. */ -static tree +tree make_vector (enum machine_mode mode, tree innertype, int unsignedp) { tree t; diff --git a/contrib/gcc/tree.h b/contrib/gcc/tree.h index 96de4a4..7a3ec26 100644 --- a/contrib/gcc/tree.h +++ b/contrib/gcc/tree.h @@ -2849,6 +2849,8 @@ extern void dump_tree_statistics (void); extern void expand_function_end (void); extern void expand_function_start (tree, int); extern void expand_pending_sizes (tree); +extern tree make_vector (enum machine_mode, tree, int); +extern tree reconstruct_complex_type (tree, tree); extern int real_onep (tree); extern int real_twop (tree); @@ -2980,6 +2982,7 @@ enum tls_model decl_tls_model (tree); extern void resolve_unique_section (tree, int, int); extern void mark_referenced (tree); extern void notice_global_symbol (tree); +extern void process_pending_assemble_output_defs (void); /* In stmt.c */ extern void emit_nop (void); diff --git a/contrib/gcc/unwind-compat.c b/contrib/gcc/unwind-compat.c new file mode 100644 index 0000000..26f45ac --- /dev/null +++ b/contrib/gcc/unwind-compat.c @@ -0,0 +1,206 @@ +/* Backward compatibility unwind routines. + Copyright (C) 2004 + 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 combined + 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, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if defined (USE_GAS_SYMVER) && defined (USE_LIBUNWIND_EXCEPTIONS) +#include "unwind.h" +#include "unwind-dw2-fde.h" +#include "unwind-compat.h" + +extern _Unwind_Reason_Code __libunwind_Unwind_Backtrace + (_Unwind_Trace_Fn, void *); + +_Unwind_Reason_Code +_Unwind_Backtrace (_Unwind_Trace_Fn trace, void *trace_argument) +{ + return __libunwind_Unwind_Backtrace (trace, trace_argument); +} +symver (_Unwind_Backtrace, GCC_3.3); + +extern void __libunwind_Unwind_DeleteException + (struct _Unwind_Exception *); + +void +_Unwind_DeleteException (struct _Unwind_Exception *exc) +{ + return __libunwind_Unwind_DeleteException (exc); +} +symver (_Unwind_DeleteException, GCC_3.0); + +extern void * __libunwind_Unwind_FindEnclosingFunction (void *); + +void * +_Unwind_FindEnclosingFunction (void *pc) +{ + return __libunwind_Unwind_FindEnclosingFunction (pc); +} +symver (_Unwind_FindEnclosingFunction, GCC_3.3); + +extern _Unwind_Reason_Code __libunwind_Unwind_ForcedUnwind + (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); + +_Unwind_Reason_Code +_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, + _Unwind_Stop_Fn stop, void * stop_argument) +{ + return __libunwind_Unwind_ForcedUnwind (exc, stop, stop_argument); +} +symver (_Unwind_ForcedUnwind, GCC_3.0); + +extern _Unwind_Word __libunwind_Unwind_GetCFA + (struct _Unwind_Context *); + +_Unwind_Word +_Unwind_GetCFA (struct _Unwind_Context *context) +{ + return __libunwind_Unwind_GetCFA (context); +} +symver (_Unwind_GetCFA, GCC_3.3); + +#ifdef __ia64__ +extern _Unwind_Word __libunwind_Unwind_GetBSP + (struct _Unwind_Context *); + +_Unwind_Word +_Unwind_GetBSP (struct _Unwind_Context * context) +{ + return __libunwind_Unwind_GetBSP (context); +} +symver (_Unwind_GetBSP, GCC_3.3.2); +#else +extern _Unwind_Ptr __libunwind_Unwind_GetDataRelBase + (struct _Unwind_Context *); + +_Unwind_Ptr +_Unwind_GetDataRelBase (struct _Unwind_Context *context) +{ + return __libunwind_Unwind_GetDataRelBase (context); +} +symver (_Unwind_GetDataRelBase, GCC_3.0); + +extern _Unwind_Ptr __libunwind_Unwind_GetTextRelBase + (struct _Unwind_Context *); + +_Unwind_Ptr +_Unwind_GetTextRelBase (struct _Unwind_Context *context) +{ + return __libunwind_Unwind_GetTextRelBase (context); +} +symver (_Unwind_GetTextRelBase, GCC_3.0); +#endif + +extern _Unwind_Word __libunwind_Unwind_GetGR + (struct _Unwind_Context *, int ); + +_Unwind_Word +_Unwind_GetGR (struct _Unwind_Context *context, int index) +{ + return __libunwind_Unwind_GetGR (context, index); +} +symver (_Unwind_GetGR, GCC_3.0); + +extern _Unwind_Ptr __libunwind_Unwind_GetIP (struct _Unwind_Context *); + +_Unwind_Ptr +_Unwind_GetIP (struct _Unwind_Context *context) +{ + return __libunwind_Unwind_GetIP (context); +} +symver (_Unwind_GetIP, GCC_3.0); + +extern void *__libunwind_Unwind_GetLanguageSpecificData + (struct _Unwind_Context *); + +void * +_Unwind_GetLanguageSpecificData (struct _Unwind_Context *context) +{ + return __libunwind_Unwind_GetLanguageSpecificData (context); +} +symver (_Unwind_GetLanguageSpecificData, GCC_3.0); + +extern _Unwind_Ptr __libunwind_Unwind_GetRegionStart + (struct _Unwind_Context *); + +_Unwind_Ptr +_Unwind_GetRegionStart (struct _Unwind_Context *context) +{ + return __libunwind_Unwind_GetRegionStart (context); +} +symver (_Unwind_GetRegionStart, GCC_3.0); + +extern _Unwind_Reason_Code __libunwind_Unwind_RaiseException + (struct _Unwind_Exception *); + +_Unwind_Reason_Code +_Unwind_RaiseException(struct _Unwind_Exception *exc) +{ + return __libunwind_Unwind_RaiseException (exc); +} +symver (_Unwind_RaiseException, GCC_3.0); + +extern void __libunwind_Unwind_Resume (struct _Unwind_Exception *); + +void +_Unwind_Resume (struct _Unwind_Exception *exc) +{ + __libunwind_Unwind_Resume (exc); +} +symver (_Unwind_Resume, GCC_3.0); + +extern _Unwind_Reason_Code __libunwind_Unwind_Resume_or_Rethrow + (struct _Unwind_Exception *); + +_Unwind_Reason_Code +_Unwind_Resume_or_Rethrow (struct _Unwind_Exception *exc) +{ + return __libunwind_Unwind_Resume_or_Rethrow (exc); +} +symver (_Unwind_Resume_or_Rethrow, GCC_3.3); + +extern void __libunwind_Unwind_SetGR + (struct _Unwind_Context *, int, _Unwind_Word); + +void +_Unwind_SetGR (struct _Unwind_Context *context, int index, + _Unwind_Word val) +{ + __libunwind_Unwind_SetGR (context, index, val); +} +symver (_Unwind_SetGR, GCC_3.0); + +extern void __libunwind_Unwind_SetIP + (struct _Unwind_Context *, _Unwind_Ptr); + +void +_Unwind_SetIP (struct _Unwind_Context *context, _Unwind_Ptr val) +{ + return __libunwind_Unwind_SetIP (context, val); +} +symver (_Unwind_SetIP, GCC_3.0); +#endif diff --git a/contrib/gcc/unwind-compat.h b/contrib/gcc/unwind-compat.h new file mode 100644 index 0000000..051cea1 --- /dev/null +++ b/contrib/gcc/unwind-compat.h @@ -0,0 +1,35 @@ +/* Backward compatibility unwind routines. + Copyright (C) 2004 + 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 combined + 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, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#define symver(name, version) \ + __asm__ (".symver " #name"," #name "@" #version) + +#define alias(name) \ + __typeof(name) __libunwind##name __attribute__ ((alias (#name))) diff --git a/contrib/gcc/unwind-dw2-fde-compat.c b/contrib/gcc/unwind-dw2-fde-compat.c new file mode 100644 index 0000000..5e8c0a3 --- /dev/null +++ b/contrib/gcc/unwind-dw2-fde-compat.c @@ -0,0 +1,46 @@ +/* Backward compatibility unwind routines. + Copyright (C) 2004 + 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 combined + 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, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if defined (USE_GAS_SYMVER) && defined (USE_LIBUNWIND_EXCEPTIONS) +#include "unwind.h" +#include "unwind-dw2-fde.h" +#include "unwind-compat.h" + +extern const fde * __libunwind__Unwind_Find_FDE + (void *, struct dwarf_eh_bases *); + +const fde * +_Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases) +{ + __libunwind__Unwind_Find_FDE (pc, bases); +} + +symver (_Unwind_Find_FDE, GCC_3.0); +#endif diff --git a/contrib/gcc/unwind-dw2-fde-glibc.c b/contrib/gcc/unwind-dw2-fde-glibc.c index 71fbf61..e7d09cf 100644 --- a/contrib/gcc/unwind-dw2-fde-glibc.c +++ b/contrib/gcc/unwind-dw2-fde-glibc.c @@ -46,6 +46,7 @@ #define NO_BASE_OF_ENCODED_VALUE #include "unwind-pe.h" #include "unwind-dw2-fde.h" +#include "unwind-compat.h" #include "gthr.h" #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ @@ -294,3 +295,7 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases) #define _Unwind_Find_FDE _Unwind_Find_FDE #include "unwind-dw2-fde.c" #endif + +#if defined (USE_GAS_SYMVER) && defined (SHARED) && defined (USE_LIBUNWIND_EXCEPTIONS) +alias (_Unwind_Find_FDE); +#endif diff --git a/contrib/gcc/unwind-dw2.c b/contrib/gcc/unwind-dw2.c index 70d3221..69cfd4f 100644 --- a/contrib/gcc/unwind-dw2.c +++ b/contrib/gcc/unwind-dw2.c @@ -1,5 +1,5 @@ /* DWARF2 exception handling and frame unwind runtime interface routines. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -188,6 +188,11 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index) int size; void *ptr; +#ifdef DWARF_ZERO_REG + if (index == DWARF_ZERO_REG) + return 0; +#endif + index = DWARF_REG_TO_UNWIND_COLUMN (index); if (index >= (int) sizeof(dwarf_reg_size_table)) abort (); @@ -677,6 +682,10 @@ execute_stack_op (const unsigned char *op_ptr, const unsigned char *op_end, case DW_OP_mul: case DW_OP_or: case DW_OP_plus: + case DW_OP_shl: + case DW_OP_shr: + case DW_OP_shra: + case DW_OP_xor: case DW_OP_le: case DW_OP_ge: case DW_OP_eq: @@ -1366,4 +1375,23 @@ uw_identify_context (struct _Unwind_Context *context) #include "unwind.inc" +#if defined (USE_GAS_SYMVER) && defined (SHARED) && defined (USE_LIBUNWIND_EXCEPTIONS) +alias (_Unwind_Backtrace); +alias (_Unwind_DeleteException); +alias (_Unwind_FindEnclosingFunction); +alias (_Unwind_ForcedUnwind); +alias (_Unwind_GetDataRelBase); +alias (_Unwind_GetTextRelBase); +alias (_Unwind_GetCFA); +alias (_Unwind_GetGR); +alias (_Unwind_GetIP); +alias (_Unwind_GetLanguageSpecificData); +alias (_Unwind_GetRegionStart); +alias (_Unwind_RaiseException); +alias (_Unwind_Resume); +alias (_Unwind_Resume_or_Rethrow); +alias (_Unwind_SetGR); +alias (_Unwind_SetIP); +#endif + #endif /* !USING_SJLJ_EXCEPTIONS */ diff --git a/contrib/gcc/varasm.c b/contrib/gcc/varasm.c index e61b5b4..33307e5 100644 --- a/contrib/gcc/varasm.c +++ b/contrib/gcc/varasm.c @@ -2350,7 +2350,8 @@ compare_constant (const tree t1, const tree t2) } /* Make a copy of the whole tree structure for a constant. This - handles the same types of nodes that compare_constant handles. */ + handles the same types of nodes that compare_constant handles. + Writable string constants are never copied. */ static tree copy_constant (tree exp) @@ -2366,9 +2367,12 @@ copy_constant (tree exp) else return copy_node (exp); + case STRING_CST: + if (flag_writable_strings) + return exp; + /* FALLTHROUGH */ case INTEGER_CST: case REAL_CST: - case STRING_CST: return copy_node (exp); case COMPLEX_CST: @@ -2434,10 +2438,7 @@ build_constant_desc (tree exp) struct constant_descriptor_tree *desc; desc = ggc_alloc (sizeof (*desc)); - if (flag_writable_strings && TREE_CODE (exp) == STRING_CST) - desc->value = exp; - else - desc->value = copy_constant (exp); + desc->value = copy_constant (exp); /* Create a string containing the label name, in LABEL. */ labelno = const_labelno++; @@ -3555,63 +3556,61 @@ initializer_constant_valid_p (tree value, tree endtype) case CONVERT_EXPR: case NOP_EXPR: - /* Allow conversions between pointer types. */ - if (POINTER_TYPE_P (TREE_TYPE (value)) - && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0)))) - return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype); - - /* Allow conversions between real types. */ - if (FLOAT_TYPE_P (TREE_TYPE (value)) - && FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0)))) - return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype); - - /* Allow length-preserving conversions between integer types. */ - if (INTEGRAL_TYPE_P (TREE_TYPE (value)) - && INTEGRAL_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0))) - && (TYPE_PRECISION (TREE_TYPE (value)) - == TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (value, 0))))) - return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype); - - /* Allow conversions between other integer types only if - explicit value. */ - if (INTEGRAL_TYPE_P (TREE_TYPE (value)) - && INTEGRAL_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0)))) - { - tree inner = initializer_constant_valid_p (TREE_OPERAND (value, 0), - endtype); - if (inner == null_pointer_node) - return null_pointer_node; - break; - } + { + tree src; + tree src_type; + tree dest_type; + + src = TREE_OPERAND (value, 0); + src_type = TREE_TYPE (src); + dest_type = TREE_TYPE (value); + + /* Allow conversions between pointer types, floating-point + types, and offset types. */ + if ((POINTER_TYPE_P (dest_type) && POINTER_TYPE_P (src_type)) + || (FLOAT_TYPE_P (dest_type) && FLOAT_TYPE_P (src_type)) + || (TREE_CODE (dest_type) == OFFSET_TYPE + && TREE_CODE (src_type) == OFFSET_TYPE)) + return initializer_constant_valid_p (src, endtype); + + /* Allow length-preserving conversions between integer types. */ + if (INTEGRAL_TYPE_P (dest_type) && INTEGRAL_TYPE_P (src_type) + && (TYPE_PRECISION (dest_type) == TYPE_PRECISION (src_type))) + return initializer_constant_valid_p (src, endtype); + + /* Allow conversions between other integer types only if + explicit value. */ + if (INTEGRAL_TYPE_P (dest_type) && INTEGRAL_TYPE_P (src_type)) + { + tree inner = initializer_constant_valid_p (src, endtype); + if (inner == null_pointer_node) + return null_pointer_node; + break; + } - /* Allow (int) &foo provided int is as wide as a pointer. */ - if (INTEGRAL_TYPE_P (TREE_TYPE (value)) - && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0))) - && (TYPE_PRECISION (TREE_TYPE (value)) - >= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (value, 0))))) - return initializer_constant_valid_p (TREE_OPERAND (value, 0), - endtype); - - /* Likewise conversions from int to pointers, but also allow - conversions from 0. */ - if ((POINTER_TYPE_P (TREE_TYPE (value)) - || TREE_CODE (TREE_TYPE (value)) == OFFSET_TYPE) - && INTEGRAL_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0)))) - { - if (integer_zerop (TREE_OPERAND (value, 0))) - return null_pointer_node; - else if (TYPE_PRECISION (TREE_TYPE (value)) - <= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (value, 0)))) - return initializer_constant_valid_p (TREE_OPERAND (value, 0), - endtype); - } + /* Allow (int) &foo provided int is as wide as a pointer. */ + if (INTEGRAL_TYPE_P (dest_type) && POINTER_TYPE_P (src_type) + && (TYPE_PRECISION (dest_type) >= TYPE_PRECISION (src_type))) + return initializer_constant_valid_p (src, endtype); - /* Allow conversions to struct or union types if the value - inside is okay. */ - if (TREE_CODE (TREE_TYPE (value)) == RECORD_TYPE - || TREE_CODE (TREE_TYPE (value)) == UNION_TYPE) - return initializer_constant_valid_p (TREE_OPERAND (value, 0), - endtype); + /* Likewise conversions from int to pointers, but also allow + conversions from 0. */ + if ((POINTER_TYPE_P (dest_type) + || TREE_CODE (dest_type) == OFFSET_TYPE) + && INTEGRAL_TYPE_P (src_type)) + { + if (integer_zerop (src)) + return null_pointer_node; + else if (TYPE_PRECISION (dest_type) <= TYPE_PRECISION (src_type)) + return initializer_constant_valid_p (src, endtype); + } + + /* Allow conversions to struct or union types if the value + inside is okay. */ + if (TREE_CODE (dest_type) == RECORD_TYPE + || TREE_CODE (dest_type) == UNION_TYPE) + return initializer_constant_valid_p (src, endtype); + } break; case PLUS_EXPR: @@ -4385,20 +4384,70 @@ globalize_decl (tree decl) (*targetm.asm_out.globalize_label) (asm_out_file, name); } +/* Some targets do not allow a forward or undefined reference in a + ASM_OUTPUT_DEF. Thus, a mechanism is needed to defer the output + of this assembler code. The output_def_pair struct holds the + declaration and target for a deferred output define. */ +struct output_def_pair GTY(()) +{ + tree decl; + tree target; +}; +typedef struct output_def_pair *output_def_pair; + +/* Variable array of deferred output defines. */ +static GTY ((param_is (struct output_def_pair))) varray_type output_defs; + +#ifdef ASM_OUTPUT_DEF +/* Output the assembler code for a define (equate) using ASM_OUTPUT_DEF + or ASM_OUTPUT_DEF_FROM_DECLS. The function defines the symbol whose + tree node is DECL to have the value of the tree node TARGET. */ + +static void +assemble_output_def (tree decl ATTRIBUTE_UNUSED, tree target ATTRIBUTE_UNUSED) +{ +#ifdef ASM_OUTPUT_DEF_FROM_DECLS + ASM_OUTPUT_DEF_FROM_DECLS (asm_out_file, decl, target); +#else + ASM_OUTPUT_DEF (asm_out_file, + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), + IDENTIFIER_POINTER (target)); +#endif +} +#endif + +/* Process the varray of pending assembler defines. */ + +void +process_pending_assemble_output_defs (void) +{ +#ifdef ASM_OUTPUT_DEF + size_t i; + output_def_pair p; + + if (!output_defs) + return; + + for (i = 0; i < VARRAY_ACTIVE_SIZE (output_defs); i++) + { + p = VARRAY_GENERIC_PTR (output_defs, i); + assemble_output_def (p->decl, p->target); + } + + output_defs = NULL; +#endif +} + /* Emit an assembler directive to make the symbol for DECL an alias to the symbol for TARGET. */ void assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED) { - const char *name; - /* We must force creation of DECL_RTL for debug info generation, even though we don't use it here. */ make_decl_rtl (decl, NULL); - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - #ifdef ASM_OUTPUT_DEF /* Make name accessible from other files, if appropriate. */ @@ -4408,16 +4457,28 @@ assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED) maybe_assemble_visibility (decl); } -#ifdef ASM_OUTPUT_DEF_FROM_DECLS - ASM_OUTPUT_DEF_FROM_DECLS (asm_out_file, decl, target); -#else - ASM_OUTPUT_DEF (asm_out_file, name, IDENTIFIER_POINTER (target)); -#endif + if (TARGET_DEFERRED_OUTPUT_DEFS (decl, target)) + { + output_def_pair p; + + if (!output_defs) + VARRAY_GENERIC_PTR_INIT (output_defs, 10, "output defs"); + + p = ggc_alloc (sizeof (struct output_def_pair)); + p->decl = decl; + p->target = target; + VARRAY_PUSH_GENERIC_PTR (output_defs, p); + } + else + assemble_output_def (decl, target); #else /* !ASM_OUTPUT_DEF */ #if defined (ASM_OUTPUT_WEAK_ALIAS) || defined (ASM_WEAKEN_DECL) if (DECL_WEAK (decl)) { + const char *name; tree *p, t; + + name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); #ifdef ASM_WEAKEN_DECL ASM_WEAKEN_DECL (asm_out_file, decl, name, IDENTIFIER_POINTER (target)); #else diff --git a/contrib/gcc/version.c b/contrib/gcc/version.c index 67a2de4..9a34ef7 100644 --- a/contrib/gcc/version.c +++ b/contrib/gcc/version.c @@ -5,7 +5,7 @@ please modify this string to indicate that, e.g. by putting your organization's name in parentheses at the end of the string. */ -const char version_string[] = "3.4.2 20040728 (prerelease)"; +const char version_string[] = "3.4.4"; /* This is the location of the online document giving instructions for reporting bugs. If you distribute a modified version of GCC, |