diff options
Diffstat (limited to 'contrib/llvm/tools/clang')
111 files changed, 6854 insertions, 8443 deletions
diff --git a/contrib/llvm/tools/clang/include/clang/AST/Decl.h b/contrib/llvm/tools/clang/include/clang/AST/Decl.h index 451f9da..e06b58b 100644 --- a/contrib/llvm/tools/clang/include/clang/AST/Decl.h +++ b/contrib/llvm/tools/clang/include/clang/AST/Decl.h @@ -236,7 +236,11 @@ public: bool isHidden() const { return Hidden; } /// \brief Set whether this declaration is hidden from name lookup. - void setHidden(bool Hide) { Hidden = Hide; } + void setHidden(bool Hide) { + assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) && + "declaration with no owning module can't be hidden"); + Hidden = Hide; + } /// \brief Determine whether this declaration is a C++ class member. bool isCXXClassMember() const { diff --git a/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h b/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h index 5c382b0..f176e54 100644 --- a/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h +++ b/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h @@ -637,6 +637,8 @@ public: private: Module *getOwningModuleSlow() const; +protected: + bool hasLocalOwningModuleStorage() const; public: /// \brief Get the imported owning module, if this decl is from an imported @@ -656,7 +658,7 @@ public: return reinterpret_cast<Module *const *>(this)[-1]; } void setLocalOwningModule(Module *M) { - assert(!isFromASTFile() && Hidden && + assert(!isFromASTFile() && Hidden && hasLocalOwningModuleStorage() && "should not have a cached owning module"); reinterpret_cast<Module **>(this)[-1] = M; } diff --git a/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h b/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h index f7cb462..537ad46 100644 --- a/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h +++ b/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h @@ -1392,6 +1392,10 @@ public: /// \brief Returns the destructor decl for this class. CXXDestructorDecl *getDestructor() const; + /// \brief Returns true if the class destructor, or any implicitly invoked + /// destructors are marked noreturn. + bool isAnyDestructorNoReturn() const; + /// \brief If the class is a local class [class.local], returns /// the enclosing function declaration. const FunctionDecl *isLocalClass() const { diff --git a/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h b/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h index 7f97646..94c77f7 100644 --- a/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h +++ b/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h @@ -1476,6 +1476,23 @@ const internal::VariadicDynCastAllOfMatcher< Stmt, ConditionalOperator> conditionalOperator; +/// \brief Matches a C++ static_assert declaration. +/// +/// Example: +/// staticAssertExpr() +/// matches +/// static_assert(sizeof(S) == sizeof(int)) +/// in +/// \code +/// struct S { +/// int x; +/// }; +/// static_assert(sizeof(S) == sizeof(int)); +/// \endcode +const internal::VariadicDynCastAllOfMatcher< + Decl, + StaticAssertDecl> staticAssertDecl; + /// \brief Matches a reinterpret_cast expression. /// /// Either the source expression or the destination type can be matched diff --git a/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h b/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h index e7f63836..5430c3b 100644 --- a/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h +++ b/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h @@ -738,6 +738,7 @@ public: bool AddTemporaryDtors; bool AddStaticInitBranches; bool AddCXXNewAllocator; + bool AddCXXDefaultInitExprInCtors; bool alwaysAdd(const Stmt *stmt) const { return alwaysAddMask[stmt->getStmtClass()]; @@ -758,7 +759,7 @@ public: PruneTriviallyFalseEdges(true), AddEHEdges(false), AddInitializers(false), AddImplicitDtors(false), AddTemporaryDtors(false), AddStaticInitBranches(false), - AddCXXNewAllocator(false) {} + AddCXXNewAllocator(false), AddCXXDefaultInitExprInCtors(false) {} }; /// \brief Provides a custom implementation of the iterator class to have the diff --git a/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td b/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td index afdd926..deb23f3 100644 --- a/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td +++ b/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td @@ -115,7 +115,23 @@ def err_integer_literal_too_large : Error< def ext_integer_literal_too_large_for_signed : ExtWarn< "integer literal is too large to be represented in a signed integer type, " "interpreting as unsigned">, - InGroup<DiagGroup<"implicitly-unsigned-literal">>; + InGroup<ImplicitlyUnsignedLiteral>; +def warn_old_implicitly_unsigned_long : Warning< + "integer literal is too large to be represented in type 'long', " + "interpreting as 'unsigned long' per C89; this literal will " + "%select{have type 'long long'|be ill-formed}0 in C99 onwards">, + InGroup<C99Compat>; +def warn_old_implicitly_unsigned_long_cxx : Warning< + "integer literal is too large to be represented in type 'long', " + "interpreting as 'unsigned long' per C++98; this literal will " + "%select{have type 'long long'|be ill-formed}0 in C++11 onwards">, + InGroup<CXX11Compat>; +def ext_old_implicitly_unsigned_long_cxx : ExtWarn< + "integer literal is too large to be represented in type 'long' and is " + "subject to undefined behavior under C++98, interpreting as 'unsigned long'; " + "this literal will %select{have type 'long long'|be ill-formed}0 " + "in C++11 onwards">, + InGroup<CXX11Compat>; // SEH def err_seh_expected_handler : Error< diff --git a/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td b/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td index 61436ea..016c2e1 100644 --- a/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td +++ b/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td @@ -239,6 +239,7 @@ def MultiChar : DiagGroup<"multichar">; def : DiagGroup<"nested-externs">; def CXX11LongLong : DiagGroup<"c++11-long-long">; def LongLong : DiagGroup<"long-long", [CXX11LongLong]>; +def ImplicitlyUnsignedLiteral : DiagGroup<"implicitly-unsigned-literal">; def MethodSignatures : DiagGroup<"method-signatures">; def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">; def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">; @@ -264,6 +265,8 @@ def : DiagGroup<"overflow">; def ForwardClassReceiver : DiagGroup<"receiver-forward-class">; def MethodAccess : DiagGroup<"objc-method-access">; def ObjCReceiver : DiagGroup<"receiver-expr">; +// FIXME: Remove this when Xcode removes the warning setting. +def : DiagGroup<"receiver-is-weak">; def OperatorNewReturnsNull : DiagGroup<"new-returns-null">; def OverlengthStrings : DiagGroup<"overlength-strings">; def OverloadedVirtual : DiagGroup<"overloaded-virtual">; diff --git a/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td b/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td index 9ccd5ad..be1911e 100644 --- a/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -908,10 +908,6 @@ def warn_dealloc_in_category : Warning< InGroup<DeallocInCategory>; def err_gc_weak_property_strong_type : Error< "weak attribute declared on a __strong type property in GC mode">; -def warn_receiver_is_weak : Warning < - "weak %select{receiver|property|implicit property}0 may be " - "unpredictably set to nil">, - InGroup<DiagGroup<"receiver-is-weak">>, DefaultIgnore; def warn_arc_repeated_use_of_weak : Warning < "weak %select{variable|property|implicit property|instance variable}0 %1 is " "accessed multiple times in this %select{function|method|block|lambda}2 " @@ -2262,8 +2258,7 @@ def err_attribute_dll_member_of_dll_class : Error< "attribute %q0 cannot be applied to member of %q1 class">; def warn_attribute_dll_instantiated_base_class : Warning< "propagating dll attribute to %select{already instantiated|explicitly specialized}0 " - "base class template " - "%select{without dll attribute|with different dll attribute}1 is not supported">, + "base class template without dll attribute is not supported">, InGroup<DiagGroup<"unsupported-dll-base-class-template">>, DefaultIgnore; def err_attribute_weakref_not_static : Error< "weakref declaration must have internal linkage">; @@ -5390,6 +5385,10 @@ def err_bad_const_cast_dest : Error< "which is not a reference, pointer-to-object, or pointer-to-data-member">; def ext_cast_fn_obj : Extension< "cast between pointer-to-function and pointer-to-object is an extension">; +def ext_ms_cast_fn_obj : ExtWarn< + "static_cast between pointer-to-function and pointer-to-object is a " + "Microsoft extension">, + InGroup<Microsoft>; def warn_cxx98_compat_cast_fn_obj : Warning< "cast between pointer-to-function and pointer-to-object is incompatible with C++98">, InGroup<CXX98CompatPedantic>, DefaultIgnore; @@ -6334,6 +6333,9 @@ let CategoryName = "Inline Assembly Issue" in { "remove the cast or build with -fheinous-gnu-extensions">; def err_invalid_asm_value_for_constraint : Error <"value '%0' out of range for constraint '%1'">; + def err_asm_bitfield_in_memory_constraint + : Error <"reference to a bit-field in asm " + "%select{input|output}0 with a memory constraint '%1'">; def warn_asm_label_on_auto_decl : Warning< "ignored asm label '%0' on automatic variable">; @@ -7404,8 +7406,6 @@ def err_omp_unexpected_clause_value : Error< "expected %0 in OpenMP clause '%1'">; def err_omp_expected_var_name : Error< "expected variable name">; -def err_omp_required_method : Error< - "%0 variable must have an accessible, unambiguous %select{default constructor|copy constructor|copy assignment operator|'%2'|destructor}1">; def note_omp_task_predetermined_firstprivate_here : Note< "predetermined as a firstprivate in a task construct here">; def err_omp_clause_ref_type_arg : Error< diff --git a/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def b/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def index 28aafca..b6d983b 100644 --- a/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def +++ b/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def @@ -10,7 +10,8 @@ // This file defines the TokenKind database. This includes normal tokens like // tok::ampamp (corresponding to the && token) as well as keywords for various // languages. Users of this file must optionally #define the TOK, KEYWORD, -// CXX11_KEYWORD, ALIAS, or PPKEYWORD macros to make use of this file. +// CXX11_KEYWORD, CONCEPTS_KEYWORD, ALIAS, or PPKEYWORD macros to make use of +// this file. // //===----------------------------------------------------------------------===// @@ -26,6 +27,9 @@ #ifndef CXX11_KEYWORD #define CXX11_KEYWORD(X,Y) KEYWORD(X,KEYCXX11|(Y)) #endif +#ifndef CONCEPTS_KEYWORD +#define CONCEPTS_KEYWORD(X) KEYWORD(X,KEYCONCEPTS) +#endif #ifndef TYPE_TRAIT #define TYPE_TRAIT(N,I,K) KEYWORD(I,K) #endif @@ -226,6 +230,8 @@ PUNCTUATOR(greatergreatergreater, ">>>") // implementation namespace // KEYNOCXX - This is a keyword in every non-C++ dialect. // KEYCXX11 - This is a C++ keyword introduced to C++ in C++11 +// KEYCONCEPTS - This is a keyword if the C++ extensions for concepts +// are enabled. // KEYGNU - This is a keyword if GNU extensions are enabled // KEYMS - This is a keyword if Microsoft extensions are enabled // KEYNOMS18 - This is a keyword that must never be enabled under @@ -344,6 +350,10 @@ CXX11_KEYWORD(nullptr , 0) CXX11_KEYWORD(static_assert , 0) CXX11_KEYWORD(thread_local , 0) +// C++ concepts TS keywords +CONCEPTS_KEYWORD(concept) +CONCEPTS_KEYWORD(requires) + // GNU Extensions (in impl-reserved namespace) KEYWORD(_Decimal32 , KEYALL) KEYWORD(_Decimal64 , KEYALL) @@ -738,6 +748,7 @@ ANNOTATION(module_end) #undef TYPE_TRAIT_2 #undef TYPE_TRAIT_1 #undef TYPE_TRAIT +#undef CONCEPTS_KEYWORD #undef CXX11_KEYWORD #undef KEYWORD #undef PUNCTUATOR diff --git a/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td b/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td index 959a72e..e217cb7 100644 --- a/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td +++ b/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td @@ -202,6 +202,7 @@ def _SLASH_Fi : CLCompileJoined<"Fi">, def _SLASH_Fo : CLCompileJoined<"Fo">, HelpText<"Set output object file, or directory (ends in / or \\)">, MetaVarName<"<file or directory>">; +def _SLASH_GL : CLFlag<"GL">, Alias<flto>; def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">; def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">; def _SLASH_link : CLRemainingArgs<"link">, @@ -286,7 +287,6 @@ def _SLASH_G2 : CLFlag<"G2">; def _SLASH_Ge : CLFlag<"Ge">; def _SLASH_Gh : CLFlag<"Gh">; def _SLASH_GH : CLFlag<"GH">; -def _SLASH_GL : CLFlag<"GL">; def _SLASH_GL_ : CLFlag<"GL-">; def _SLASH_Gm : CLFlag<"Gm">; def _SLASH_Gm_ : CLFlag<"Gm-">; diff --git a/contrib/llvm/tools/clang/include/clang/Driver/Options.td b/contrib/llvm/tools/clang/include/clang/Driver/Options.td index dec917b..7e39a9a 100644 --- a/contrib/llvm/tools/clang/include/clang/Driver/Options.td +++ b/contrib/llvm/tools/clang/include/clang/Driver/Options.td @@ -876,6 +876,7 @@ def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Gr def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>; def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>; def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>; +def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>; def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>; def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>; def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>; diff --git a/contrib/llvm/tools/clang/include/clang/Driver/Types.def b/contrib/llvm/tools/clang/include/clang/Driver/Types.def index adc12d3..4b696ae 100644 --- a/contrib/llvm/tools/clang/include/clang/Driver/Types.def +++ b/contrib/llvm/tools/clang/include/clang/Driver/Types.def @@ -55,14 +55,14 @@ TYPE("objective-c++", ObjCXX, PP_ObjCXX, "mm", "u") // C family input files to precompile. TYPE("c-header-cpp-output", PP_CHeader, INVALID, "i", "p") -TYPE("c-header", CHeader, PP_CHeader, nullptr, "pu") -TYPE("cl-header", CLHeader, PP_CHeader, nullptr, "pu") +TYPE("c-header", CHeader, PP_CHeader, "h", "pu") +TYPE("cl-header", CLHeader, PP_CHeader, "h", "pu") TYPE("objective-c-header-cpp-output", PP_ObjCHeader, INVALID, "mi", "p") -TYPE("objective-c-header", ObjCHeader, PP_ObjCHeader, nullptr, "pu") +TYPE("objective-c-header", ObjCHeader, PP_ObjCHeader, "h", "pu") TYPE("c++-header-cpp-output", PP_CXXHeader, INVALID, "ii", "p") -TYPE("c++-header", CXXHeader, PP_CXXHeader, nullptr, "pu") +TYPE("c++-header", CXXHeader, PP_CXXHeader, "hh", "pu") TYPE("objective-c++-header-cpp-output", PP_ObjCXXHeader, INVALID, "mii", "p") -TYPE("objective-c++-header", ObjCXXHeader, PP_ObjCXXHeader, nullptr, "pu") +TYPE("objective-c++-header", ObjCXXHeader, PP_ObjCXXHeader, "h", "pu") // Other languages. TYPE("ada", Ada, INVALID, nullptr, "u") diff --git a/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h b/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h index 775943d..316134c 100644 --- a/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h +++ b/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h @@ -180,14 +180,14 @@ public: /// AddPath - Add the \p Path path to the specified \p Group list. void AddPath(StringRef Path, frontend::IncludeDirGroup Group, bool IsFramework, bool IgnoreSysRoot) { - UserEntries.push_back(Entry(Path, Group, IsFramework, IgnoreSysRoot)); + UserEntries.emplace_back(Path, Group, IsFramework, IgnoreSysRoot); } /// AddSystemHeaderPrefix - Override whether \#include directives naming a /// path starting with \p Prefix should be considered as naming a system /// header. void AddSystemHeaderPrefix(StringRef Prefix, bool IsSystemHeader) { - SystemHeaderPrefixes.push_back(SystemHeaderPrefix(Prefix, IsSystemHeader)); + SystemHeaderPrefixes.emplace_back(Prefix, IsSystemHeader); } void AddVFSOverlayFile(StringRef Name) { diff --git a/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h b/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h index 07564b9..12565d0 100644 --- a/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h +++ b/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h @@ -228,7 +228,7 @@ public: /// Stringify - Convert the specified string into a C string by escaping '\' /// and " characters. This does not add surrounding ""'s to the string. /// If Charify is true, this escapes the ' character instead of ". - static std::string Stringify(const std::string &Str, bool Charify = false); + static std::string Stringify(StringRef Str, bool Charify = false); /// Stringify - Convert the specified string into a C string by escaping '\' /// and " characters. This does not add surrounding ""'s to the string. diff --git a/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h b/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h index 81d075c..8b82a5b 100644 --- a/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h +++ b/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h @@ -44,8 +44,8 @@ class MacroInfo { /// /// ArgumentList points to the first of NumArguments pointers. /// - /// This can be empty, for, e.g. "#define X()". In a C99-style variadic macro, this - /// includes the \c __VA_ARGS__ identifier on the list. + /// This can be empty, for, e.g. "#define X()". In a C99-style variadic + /// macro, this includes the \c __VA_ARGS__ identifier on the list. IdentifierInfo **ArgumentList; /// \see ArgumentList @@ -70,15 +70,15 @@ class MacroInfo { /// \brief True if this macro is of the form "#define X(a...)". /// - /// The "a" identifier in the replacement list will be replaced with all arguments - /// of the macro starting with the specified one. + /// The "a" identifier in the replacement list will be replaced with all + /// arguments of the macro starting with the specified one. bool IsGNUVarargs : 1; /// \brief True if this macro requires processing before expansion. /// /// This is the case for builtin macros such as __LINE__, so long as they have - /// not been redefined, but not for regular predefined macros from the "<built-in>" - /// memory buffer (see Preprocessing::getPredefinesFileID). + /// not been redefined, but not for regular predefined macros from the + /// "<built-in>" memory buffer (see Preprocessing::getPredefinesFileID). bool IsBuiltinMacro : 1; /// \brief Whether this macro contains the sequence ", ## __VA_ARGS__" @@ -143,14 +143,10 @@ public: bool Syntactically) const; /// \brief Set or clear the isBuiltinMacro flag. - void setIsBuiltinMacro(bool Val = true) { - IsBuiltinMacro = Val; - } + void setIsBuiltinMacro(bool Val = true) { IsBuiltinMacro = Val; } /// \brief Set the value of the IsUsed flag. - void setIsUsed(bool Val) { - IsUsed = Val; - } + void setIsUsed(bool Val) { IsUsed = Val; } /// \brief Set the value of the IsAllowRedefinitionsWithoutWarning flag. void setIsAllowRedefinitionsWithoutWarning(bool Val) { @@ -158,37 +154,40 @@ public: } /// \brief Set the value of the IsWarnIfUnused flag. - void setIsWarnIfUnused(bool val) { - IsWarnIfUnused = val; - } + void setIsWarnIfUnused(bool val) { IsWarnIfUnused = val; } /// \brief Set the specified list of identifiers as the argument list for /// this macro. - void setArgumentList(IdentifierInfo* const *List, unsigned NumArgs, + void setArgumentList(IdentifierInfo *const *List, unsigned NumArgs, llvm::BumpPtrAllocator &PPAllocator) { assert(ArgumentList == nullptr && NumArguments == 0 && "Argument list already set!"); - if (NumArgs == 0) return; + if (NumArgs == 0) + return; NumArguments = NumArgs; - ArgumentList = PPAllocator.Allocate<IdentifierInfo*>(NumArgs); + ArgumentList = PPAllocator.Allocate<IdentifierInfo *>(NumArgs); for (unsigned i = 0; i != NumArgs; ++i) ArgumentList[i] = List[i]; } /// Arguments - The list of arguments for a function-like macro. This can be /// empty, for, e.g. "#define X()". - typedef IdentifierInfo* const *arg_iterator; + typedef IdentifierInfo *const *arg_iterator; bool arg_empty() const { return NumArguments == 0; } arg_iterator arg_begin() const { return ArgumentList; } - arg_iterator arg_end() const { return ArgumentList+NumArguments; } + arg_iterator arg_end() const { return ArgumentList + NumArguments; } unsigned getNumArgs() const { return NumArguments; } + ArrayRef<const IdentifierInfo *> args() const { + return ArrayRef<const IdentifierInfo *>(ArgumentList, NumArguments); + } /// \brief Return the argument number of the specified identifier, /// or -1 if the identifier is not a formal argument identifier. - int getArgumentNum(IdentifierInfo *Arg) const { + int getArgumentNum(const IdentifierInfo *Arg) const { for (arg_iterator I = arg_begin(), E = arg_end(); I != E; ++I) - if (*I == Arg) return I-arg_begin(); + if (*I == Arg) + return I - arg_begin(); return -1; } @@ -226,15 +225,11 @@ public: } /// \brief Return true if we should emit a warning if the macro is unused. - bool isWarnIfUnused() const { - return IsWarnIfUnused; - } + bool isWarnIfUnused() const { return IsWarnIfUnused; } /// \brief Return the number of tokens that this macro expands to. /// - unsigned getNumTokens() const { - return ReplacementTokens.size(); - } + unsigned getNumTokens() const { return ReplacementTokens.size(); } const Token &getReplacementToken(unsigned Tok) const { assert(Tok < ReplacementTokens.size() && "Invalid token #"); @@ -249,8 +244,9 @@ public: /// \brief Add the specified token to the replacement text for the macro. void AddTokenToBody(const Token &Tok) { - assert(!IsDefinitionLengthCached && - "Changing replacement tokens after definition length got calculated"); + assert( + !IsDefinitionLengthCached && + "Changing replacement tokens after definition length got calculated"); ReplacementTokens.push_back(Tok); } @@ -282,7 +278,7 @@ public: /// macro info. unsigned getOwningModuleID() const { if (isFromASTFile()) - return *(const unsigned*)(this+1); + return *(const unsigned *)(this + 1); return 0; } @@ -294,7 +290,7 @@ private: void setOwningModuleID(unsigned ID) { assert(isFromASTFile()); - *(unsigned*)(this+1) = ID; + *(unsigned *)(this + 1) = ID; } friend class Preprocessor; @@ -311,11 +307,7 @@ class DefMacroDirective; /// create additional DefMacroDirectives for the same MacroInfo. class MacroDirective { public: - enum Kind { - MD_Define, - MD_Undefine, - MD_Visibility - }; + enum Kind { MD_Define, MD_Undefine, MD_Visibility }; protected: /// \brief Previous macro directive for the same identifier, or NULL. @@ -345,9 +337,7 @@ public: SourceLocation getLocation() const { return Loc; } /// \brief Set previous definition of the macro with the same name. - void setPrevious(MacroDirective *Prev) { - Previous = Prev; - } + void setPrevious(MacroDirective *Prev) { Previous = Prev; } /// \brief Get previous definition of the macro with the same name. const MacroDirective *getPrevious() const { return Previous; } @@ -366,19 +356,19 @@ public: bool IsPublic; public: - DefInfo() : DefDirective(nullptr), IsPublic(true) { } + DefInfo() : DefDirective(nullptr), IsPublic(true) {} DefInfo(DefMacroDirective *DefDirective, SourceLocation UndefLoc, bool isPublic) - : DefDirective(DefDirective), UndefLoc(UndefLoc), IsPublic(isPublic) { } + : DefDirective(DefDirective), UndefLoc(UndefLoc), IsPublic(isPublic) {} const DefMacroDirective *getDirective() const { return DefDirective; } - DefMacroDirective *getDirective() { return DefDirective; } + DefMacroDirective *getDirective() { return DefDirective; } inline SourceLocation getLocation() const; inline MacroInfo *getMacroInfo(); const MacroInfo *getMacroInfo() const { - return const_cast<DefInfo*>(this)->getMacroInfo(); + return const_cast<DefInfo *>(this)->getMacroInfo(); } SourceLocation getUndefLocation() const { return UndefLoc; } @@ -393,7 +383,7 @@ public: inline DefInfo getPreviousDefinition(); const DefInfo getPreviousDefinition() const { - return const_cast<DefInfo*>(this)->getPreviousDefinition(); + return const_cast<DefInfo *>(this)->getPreviousDefinition(); } }; @@ -402,7 +392,7 @@ public: /// (if there is one) and if it is public or private. DefInfo getDefinition(); const DefInfo getDefinition() const { - return const_cast<MacroDirective*>(this)->getDefinition(); + return const_cast<MacroDirective *>(this)->getDefinition(); } bool isDefined() const { @@ -414,9 +404,7 @@ public: const MacroInfo *getMacroInfo() const { return getDefinition().getMacroInfo(); } - MacroInfo *getMacroInfo() { - return getDefinition().getMacroInfo(); - } + MacroInfo *getMacroInfo() { return getDefinition().getMacroInfo(); } /// \brief Find macro definition active in the specified source location. If /// this macro was not defined there, return NULL. @@ -450,7 +438,7 @@ public: }; /// \brief A directive for an undefined macro. -class UndefMacroDirective : public MacroDirective { +class UndefMacroDirective : public MacroDirective { public: explicit UndefMacroDirective(SourceLocation UndefLoc) : MacroDirective(MD_Undefine, UndefLoc) { @@ -464,7 +452,7 @@ public: }; /// \brief A directive for setting the module visibility of a macro. -class VisibilityMacroDirective : public MacroDirective { +class VisibilityMacroDirective : public MacroDirective { public: explicit VisibilityMacroDirective(SourceLocation Loc, bool Public) : MacroDirective(MD_Visibility, Loc) { @@ -518,14 +506,14 @@ class ModuleMacro : public llvm::FoldingSetNode { unsigned NumOverriddenBy; /// The number of modules whose macros are directly overridden by this one. unsigned NumOverrides; - //ModuleMacro *OverriddenMacros[NumOverrides]; + // ModuleMacro *OverriddenMacros[NumOverrides]; friend class Preprocessor; ModuleMacro(Module *OwningModule, IdentifierInfo *II, MacroInfo *Macro, ArrayRef<ModuleMacro *> Overrides) - : II(II), Macro(Macro), OwningModule(OwningModule), - NumOverriddenBy(0), NumOverrides(Overrides.size()) { + : II(II), Macro(Macro), OwningModule(OwningModule), NumOverriddenBy(0), + NumOverrides(Overrides.size()) { std::copy(Overrides.begin(), Overrides.end(), reinterpret_cast<ModuleMacro **>(this + 1)); } diff --git a/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h b/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h index 83a410d..e41efc5 100644 --- a/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h +++ b/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h @@ -272,16 +272,11 @@ public: /// used from. Used to disambiguate if a header is present in multiple /// modules. /// - /// \param IncludeTextualHeaders If \c true, also find textual headers. By - /// default, these are treated like excluded headers and result in no known - /// header being found. - /// /// \returns The module KnownHeader, which provides the module that owns the /// given header file. The KnownHeader is default constructed to indicate /// that no module owns this header file. KnownHeader findModuleForHeader(const FileEntry *File, - Module *RequestingModule = nullptr, - bool IncludeTextualHeaders = false); + Module *RequestingModule = nullptr); /// \brief Reports errors if a module must not include a specific file. /// diff --git a/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h b/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h index 1ddb5d6..3803533 100644 --- a/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h +++ b/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h @@ -155,7 +155,7 @@ public: /// \param Loc The location of the directive. /// \param str The text of the directive. /// - virtual void Ident(SourceLocation Loc, const std::string &str) { + virtual void Ident(SourceLocation Loc, StringRef str) { } /// \brief Callback invoked when start reading any pragma directive. @@ -165,14 +165,13 @@ public: /// \brief Callback invoked when a \#pragma comment directive is read. virtual void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind, - const std::string &Str) { + StringRef Str) { } /// \brief Callback invoked when a \#pragma detect_mismatch directive is /// read. - virtual void PragmaDetectMismatch(SourceLocation Loc, - const std::string &Name, - const std::string &Value) { + virtual void PragmaDetectMismatch(SourceLocation Loc, StringRef Name, + StringRef Value) { } /// \brief Callback invoked when a \#pragma clang __debug directive is read. @@ -375,19 +374,19 @@ public: Second->EndOfMainFile(); } - void Ident(SourceLocation Loc, const std::string &str) override { + void Ident(SourceLocation Loc, StringRef str) override { First->Ident(Loc, str); Second->Ident(Loc, str); } void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind, - const std::string &Str) override { + StringRef Str) override { First->PragmaComment(Loc, Kind, Str); Second->PragmaComment(Loc, Kind, Str); } - void PragmaDetectMismatch(SourceLocation Loc, const std::string &Name, - const std::string &Value) override { + void PragmaDetectMismatch(SourceLocation Loc, StringRef Name, + StringRef Value) override { First->PragmaDetectMismatch(Loc, Name, Value); Second->PragmaDetectMismatch(Loc, Name, Value); } diff --git a/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h b/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h index a4198f8..26178ed 100644 --- a/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h +++ b/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h @@ -129,7 +129,7 @@ public: /// Create - This method creates PTHManager objects. The 'file' argument /// is the name of the PTH file. This method returns NULL upon failure. - static PTHManager *Create(const std::string& file, DiagnosticsEngine &Diags); + static PTHManager *Create(StringRef file, DiagnosticsEngine &Diags); void setPreprocessor(Preprocessor *pp) { PP = pp; } diff --git a/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h b/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h index ea15dbd..f6e61c0 100644 --- a/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h +++ b/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h @@ -890,7 +890,7 @@ public: /// /// These predefines are automatically injected when parsing the main file. void setPredefines(const char *P) { Predefines = P; } - void setPredefines(const std::string &P) { Predefines = P; } + void setPredefines(StringRef P) { Predefines = P; } /// Return information about the specified preprocessor /// identifier token. @@ -1617,9 +1617,9 @@ private: void PushIncludeMacroStack() { assert(CurLexerKind != CLK_CachingLexer && "cannot push a caching lexer"); - IncludeMacroStack.push_back(IncludeStackInfo( + IncludeMacroStack.emplace_back( CurLexerKind, CurSubmodule, std::move(CurLexer), std::move(CurPTHLexer), - CurPPLexer, std::move(CurTokenLexer), CurDirLookup)); + CurPPLexer, std::move(CurTokenLexer), CurDirLookup); CurPPLexer = nullptr; } diff --git a/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h b/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h index 135c87f..963d95d 100644 --- a/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h +++ b/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h @@ -149,18 +149,14 @@ public: RetainRemappedFileBuffers(false), ObjCXXARCStandardLibrary(ARCXX_nolib) { } - void addMacroDef(StringRef Name) { - Macros.push_back(std::make_pair(Name, false)); - } - void addMacroUndef(StringRef Name) { - Macros.push_back(std::make_pair(Name, true)); - } + void addMacroDef(StringRef Name) { Macros.emplace_back(Name, false); } + void addMacroUndef(StringRef Name) { Macros.emplace_back(Name, true); } void addRemappedFile(StringRef From, StringRef To) { - RemappedFiles.push_back(std::make_pair(From, To)); + RemappedFiles.emplace_back(From, To); } void addRemappedFile(StringRef From, llvm::MemoryBuffer *To) { - RemappedFileBuffers.push_back(std::make_pair(From, To)); + RemappedFileBuffers.emplace_back(From, To); } void clearRemappedFiles() { diff --git a/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h b/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h index 5bfee8b..97192b5 100644 --- a/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h +++ b/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h @@ -302,10 +302,14 @@ public: if (!D->isInIdentifierNamespace(IDNS)) return nullptr; - if (isHiddenDeclarationVisible() || isVisible(getSema(), D)) + if (isVisible(getSema(), D)) return D; - return getAcceptableDeclSlow(D); + if (auto *Visible = getAcceptableDeclSlow(D)) + return Visible; + + // Even if hidden declarations are visible, prefer a visible declaration. + return isHiddenDeclarationVisible() ? D : nullptr; } private: diff --git a/contrib/llvm/tools/clang/include/clang/Sema/Sema.h b/contrib/llvm/tools/clang/include/clang/Sema/Sema.h index 39ea3c6..60664c5 100644 --- a/contrib/llvm/tools/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm/tools/clang/include/clang/Sema/Sema.h @@ -5110,6 +5110,10 @@ public: bool AnyErrors); void checkClassLevelDLLAttribute(CXXRecordDecl *Class); + void propagateDLLAttrToBaseClassTemplate( + CXXRecordDecl *Class, Attr *ClassAttr, + ClassTemplateSpecializationDecl *BaseTemplateSpec, + SourceLocation BaseLoc); void CheckCompletedCXXClass(CXXRecordDecl *Record); void ActOnFinishCXXMemberSpecification(Scope* S, SourceLocation RLoc, Decl *TagDecl, diff --git a/contrib/llvm/tools/clang/include/clang/Tooling/Core/Replacement.h b/contrib/llvm/tools/clang/include/clang/Tooling/Core/Replacement.h index 30a7036..f189e12 100644 --- a/contrib/llvm/tools/clang/include/clang/Tooling/Core/Replacement.h +++ b/contrib/llvm/tools/clang/include/clang/Tooling/Core/Replacement.h @@ -19,6 +19,7 @@ #ifndef LLVM_CLANG_TOOLING_CORE_REPLACEMENT_H #define LLVM_CLANG_TOOLING_CORE_REPLACEMENT_H +#include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/StringRef.h" #include <set> @@ -77,22 +78,24 @@ public: /// \param FilePath A source file accessible via a SourceManager. /// \param Offset The byte offset of the start of the range in the file. /// \param Length The length of the range in bytes. - Replacement(StringRef FilePath, unsigned Offset, - unsigned Length, StringRef ReplacementText); + Replacement(StringRef FilePath, unsigned Offset, unsigned Length, + StringRef ReplacementText); /// \brief Creates a Replacement of the range [Start, Start+Length) with /// ReplacementText. - Replacement(const SourceManager &Sources, SourceLocation Start, unsigned Length, - StringRef ReplacementText); + Replacement(const SourceManager &Sources, SourceLocation Start, + unsigned Length, StringRef ReplacementText); /// \brief Creates a Replacement of the given range with ReplacementText. Replacement(const SourceManager &Sources, const CharSourceRange &Range, - StringRef ReplacementText); + StringRef ReplacementText, + const LangOptions &LangOpts = LangOptions()); /// \brief Creates a Replacement of the node with ReplacementText. template <typename Node> Replacement(const SourceManager &Sources, const Node &NodeToReplace, - StringRef ReplacementText); + StringRef ReplacementText, + const LangOptions &LangOpts = LangOptions()); /// \brief Returns whether this replacement can be applied to a file. /// @@ -114,11 +117,13 @@ public: std::string toString() const; private: - void setFromSourceLocation(const SourceManager &Sources, SourceLocation Start, - unsigned Length, StringRef ReplacementText); - void setFromSourceRange(const SourceManager &Sources, - const CharSourceRange &Range, - StringRef ReplacementText); + void setFromSourceLocation(const SourceManager &Sources, + SourceLocation Start, unsigned Length, + StringRef ReplacementText); + void setFromSourceRange(const SourceManager &Sources, + const CharSourceRange &Range, + StringRef ReplacementText, + const LangOptions &LangOpts); std::string FilePath; Range ReplacementRange; @@ -217,10 +222,11 @@ std::string applyAllReplacements(StringRef Code, const Replacements &Replaces); template <typename Node> Replacement::Replacement(const SourceManager &Sources, - const Node &NodeToReplace, StringRef ReplacementText) { + const Node &NodeToReplace, StringRef ReplacementText, + const LangOptions &LangOpts) { const CharSourceRange Range = CharSourceRange::getTokenRange(NodeToReplace->getSourceRange()); - setFromSourceRange(Sources, Range, ReplacementText); + setFromSourceRange(Sources, Range, ReplacementText, LangOpts); } } // end namespace tooling diff --git a/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp b/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp index a43879c..8c2e0f4 100644 --- a/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp +++ b/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp @@ -2283,7 +2283,7 @@ bool arcmt::getFileRemappingsFromFileList( continue; } - remap.push_back(std::make_pair(I->first->getName(), TempFile)); + remap.emplace_back(I->first->getName(), TempFile); } return hasErrorOccurred; diff --git a/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp b/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp index 79cadcf..70bd16f 100644 --- a/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp +++ b/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp @@ -80,6 +80,10 @@ Module *Decl::getOwningModuleSlow() const { return getASTContext().getExternalSource()->getModule(getOwningModuleID()); } +bool Decl::hasLocalOwningModuleStorage() const { + return getASTContext().getLangOpts().ModulesLocalVisibility; +} + const char *Decl::getDeclKindName() const { switch (DeclKind) { default: llvm_unreachable("Declaration not in DeclNodes.inc!"); diff --git a/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp b/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp index 8dc62dd..b00b8a0 100644 --- a/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp +++ b/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp @@ -1315,6 +1315,28 @@ CXXDestructorDecl *CXXRecordDecl::getDestructor() const { return Dtor; } +bool CXXRecordDecl::isAnyDestructorNoReturn() const { + // Destructor is noreturn. + if (const CXXDestructorDecl *Destructor = getDestructor()) + if (Destructor->isNoReturn()) + return true; + + // Check base classes destructor for noreturn. + for (const auto &Base : bases()) + if (Base.getType()->getAsCXXRecordDecl()->isAnyDestructorNoReturn()) + return true; + + // Check fields for noreturn. + for (const auto *Field : fields()) + if (const CXXRecordDecl *RD = + Field->getType()->getBaseElementTypeUnsafe()->getAsCXXRecordDecl()) + if (RD->isAnyDestructorNoReturn()) + return true; + + // All destructors are not noreturn. + return false; +} + void CXXRecordDecl::completeDefinition() { completeDefinition(nullptr); } diff --git a/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp b/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp index c0f3e17..d8cd40e 100644 --- a/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp +++ b/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp @@ -733,8 +733,10 @@ void DeclPrinter::VisitImportDecl(ImportDecl *D) { void DeclPrinter::VisitStaticAssertDecl(StaticAssertDecl *D) { Out << "static_assert("; D->getAssertExpr()->printPretty(Out, nullptr, Policy, Indentation); - Out << ", "; - D->getMessage()->printPretty(Out, nullptr, Policy, Indentation); + if (StringLiteral *SL = D->getMessage()) { + Out << ", "; + SL->printPretty(Out, nullptr, Policy, Indentation); + } Out << ")"; } diff --git a/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp b/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp index d1ec7ae..be24a2a 100644 --- a/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp @@ -4276,6 +4276,9 @@ public: BlockScopeRAII Scope(Info); const CompoundStmt *CS = E->getSubStmt(); + if (CS->body_empty()) + return true; + for (CompoundStmt::const_body_iterator BI = CS->body_begin(), BE = CS->body_end(); /**/; ++BI) { @@ -4301,6 +4304,8 @@ public: return false; } } + + llvm_unreachable("Return from function from the loop above."); } /// Visit a value which is evaluated, but whose value is ignored. diff --git a/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp b/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp index 77522c1..db5b48e 100644 --- a/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp +++ b/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp @@ -2021,23 +2021,29 @@ void MicrosoftCXXNameMangler::mangleType(const VectorType *T, Qualifiers Quals, uint64_t Width = getASTContext().getTypeSize(T); // Pattern match exactly the typedefs in our intrinsic headers. Anything that // doesn't match the Intel types uses a custom mangling below. - bool IntelVector = true; - if (Width == 64 && ET->getKind() == BuiltinType::LongLong) { - Out << "T__m64"; - } else if (Width == 128 || Width == 256) { - if (ET->getKind() == BuiltinType::Float) - Out << "T__m" << Width; - else if (ET->getKind() == BuiltinType::LongLong) - Out << "T__m" << Width << 'i'; - else if (ET->getKind() == BuiltinType::Double) - Out << "U__m" << Width << 'd'; - else - IntelVector = false; + bool IsBuiltin = true; + llvm::Triple::ArchType AT = + getASTContext().getTargetInfo().getTriple().getArch(); + if (AT == llvm::Triple::x86 || AT == llvm::Triple::x86_64) { + if (Width == 64 && ET->getKind() == BuiltinType::LongLong) { + Out << "T__m64"; + } else if (Width >= 128) { + if (ET->getKind() == BuiltinType::Float) + Out << "T__m" << Width; + else if (ET->getKind() == BuiltinType::LongLong) + Out << "T__m" << Width << 'i'; + else if (ET->getKind() == BuiltinType::Double) + Out << "U__m" << Width << 'd'; + else + IsBuiltin = false; + } else { + IsBuiltin = false; + } } else { - IntelVector = false; + IsBuiltin = false; } - if (!IntelVector) { + if (!IsBuiltin) { // The MS ABI doesn't have a special mangling for vector types, so we define // our own mangling to handle uses of __vector_size__ on user-specified // types, and for extensions like __v4sf. diff --git a/contrib/llvm/tools/clang/lib/AST/Stmt.cpp b/contrib/llvm/tools/clang/lib/AST/Stmt.cpp index 6baa99b..09bb17b 100644 --- a/contrib/llvm/tools/clang/lib/AST/Stmt.cpp +++ b/contrib/llvm/tools/clang/lib/AST/Stmt.cpp @@ -592,7 +592,7 @@ unsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece>&Pieces, SourceLocation EndLoc = getAsmString()->getLocationOfByte(CurPtr - StrStart, SM, LO, TI); - Pieces.push_back(AsmStringPiece(N, Str, BeginLoc, EndLoc)); + Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc); continue; } @@ -626,7 +626,7 @@ unsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece>&Pieces, SourceLocation EndLoc = getAsmString()->getLocationOfByte(NameEnd + 1 - StrStart, SM, LO, TI); - Pieces.push_back(AsmStringPiece(N, Str, BeginLoc, EndLoc)); + Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc); CurPtr = NameEnd+1; continue; diff --git a/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp b/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp index dc4f996..db6d8c2 100644 --- a/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp +++ b/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp @@ -396,8 +396,9 @@ void StmtPrinter::VisitGCCAsmStmt(GCCAsmStmt *Node) { } VisitStringLiteral(Node->getOutputConstraintLiteral(i)); - OS << " "; + OS << " ("; Visit(Node->getOutputExpr(i)); + OS << ")"; } // Inputs @@ -415,8 +416,9 @@ void StmtPrinter::VisitGCCAsmStmt(GCCAsmStmt *Node) { } VisitStringLiteral(Node->getInputConstraintLiteral(i)); - OS << " "; + OS << " ("; Visit(Node->getInputExpr(i)); + OS << ")"; } // Clobbers @@ -1395,13 +1397,16 @@ void StmtPrinter::VisitParenListExpr(ParenListExpr* Node) { } void StmtPrinter::VisitDesignatedInitExpr(DesignatedInitExpr *Node) { + bool NeedsEquals = true; for (DesignatedInitExpr::designators_iterator D = Node->designators_begin(), DEnd = Node->designators_end(); D != DEnd; ++D) { if (D->isFieldDesignator()) { if (D->getDotLoc().isInvalid()) { - if (IdentifierInfo *II = D->getFieldName()) + if (IdentifierInfo *II = D->getFieldName()) { OS << II->getName() << ":"; + NeedsEquals = false; + } } else { OS << "." << D->getFieldName()->getName(); } @@ -1418,7 +1423,10 @@ void StmtPrinter::VisitDesignatedInitExpr(DesignatedInitExpr *Node) { } } - OS << " = "; + if (NeedsEquals) + OS << " = "; + else + OS << " "; PrintExpr(Node->getInit()); } diff --git a/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp index c5f3063..e3b666e 100644 --- a/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp +++ b/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp @@ -912,37 +912,37 @@ MatchFinder::~MatchFinder() {} void MatchFinder::addMatcher(const DeclarationMatcher &NodeMatch, MatchCallback *Action) { - Matchers.DeclOrStmt.push_back(std::make_pair(NodeMatch, Action)); + Matchers.DeclOrStmt.emplace_back(NodeMatch, Action); Matchers.AllCallbacks.push_back(Action); } void MatchFinder::addMatcher(const TypeMatcher &NodeMatch, MatchCallback *Action) { - Matchers.Type.push_back(std::make_pair(NodeMatch, Action)); + Matchers.Type.emplace_back(NodeMatch, Action); Matchers.AllCallbacks.push_back(Action); } void MatchFinder::addMatcher(const StatementMatcher &NodeMatch, MatchCallback *Action) { - Matchers.DeclOrStmt.push_back(std::make_pair(NodeMatch, Action)); + Matchers.DeclOrStmt.emplace_back(NodeMatch, Action); Matchers.AllCallbacks.push_back(Action); } void MatchFinder::addMatcher(const NestedNameSpecifierMatcher &NodeMatch, MatchCallback *Action) { - Matchers.NestedNameSpecifier.push_back(std::make_pair(NodeMatch, Action)); + Matchers.NestedNameSpecifier.emplace_back(NodeMatch, Action); Matchers.AllCallbacks.push_back(Action); } void MatchFinder::addMatcher(const NestedNameSpecifierLocMatcher &NodeMatch, MatchCallback *Action) { - Matchers.NestedNameSpecifierLoc.push_back(std::make_pair(NodeMatch, Action)); + Matchers.NestedNameSpecifierLoc.emplace_back(NodeMatch, Action); Matchers.AllCallbacks.push_back(Action); } void MatchFinder::addMatcher(const TypeLocMatcher &NodeMatch, MatchCallback *Action) { - Matchers.TypeLoc.push_back(std::make_pair(NodeMatch, Action)); + Matchers.TypeLoc.emplace_back(NodeMatch, Action); Matchers.AllCallbacks.push_back(Action); } diff --git a/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Diagnostics.cpp b/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Diagnostics.cpp index f6d3449..72f1271 100644 --- a/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Diagnostics.cpp +++ b/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Diagnostics.cpp @@ -14,7 +14,7 @@ namespace ast_matchers { namespace dynamic { Diagnostics::ArgStream Diagnostics::pushContextFrame(ContextType Type, SourceRange Range) { - ContextStack.push_back(ContextFrame()); + ContextStack.emplace_back(); ContextFrame& data = ContextStack.back(); data.Type = Type; data.Range = Range; @@ -65,10 +65,10 @@ Diagnostics::ArgStream &Diagnostics::ArgStream::operator<<(const Twine &Arg) { Diagnostics::ArgStream Diagnostics::addError(const SourceRange &Range, ErrorType Error) { - Errors.push_back(ErrorContent()); + Errors.emplace_back(); ErrorContent &Last = Errors.back(); Last.ContextStack = ContextStack; - Last.Messages.push_back(ErrorContent::Message()); + Last.Messages.emplace_back(); Last.Messages.back().Range = Range; Last.Messages.back().Type = Error; return ArgStream(&Last.Messages.back().Args); diff --git a/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp b/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp index 04d3a32..59c204d 100644 --- a/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp +++ b/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp @@ -311,6 +311,7 @@ RegistryMaps::RegistryMaps() { REGISTER_MATCHER(specifiesTypeLoc); REGISTER_MATCHER(statementCountIs); REGISTER_MATCHER(staticCastExpr); + REGISTER_MATCHER(staticAssertDecl); REGISTER_MATCHER(stmt); REGISTER_MATCHER(stringLiteral); REGISTER_MATCHER(substNonTypeTemplateParmExpr); diff --git a/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp b/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp index 2744c5f..b2fdd27 100644 --- a/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp +++ b/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp @@ -1095,6 +1095,19 @@ CFGBlock *CFGBuilder::addInitializer(CXXCtorInitializer *I) { // generating destructors for the second time. return Visit(cast<ExprWithCleanups>(Init)->getSubExpr()); } + if (BuildOpts.AddCXXDefaultInitExprInCtors) { + if (CXXDefaultInitExpr *Default = dyn_cast<CXXDefaultInitExpr>(Init)) { + // In general, appending the expression wrapped by a CXXDefaultInitExpr + // may cause the same Expr to appear more than once in the CFG. Doing it + // here is safe because there's only one initializer per field. + autoCreateBlock(); + appendStmt(Block, Default); + if (Stmt *Child = Default->getExpr()) + if (CFGBlock *R = Visit(Child)) + Block = R; + return Block; + } + } return Visit(Init); } @@ -1179,8 +1192,7 @@ void CFGBuilder::addAutomaticObjDtors(LocalScope::const_iterator B, } Ty = Context->getBaseElementType(Ty); - const CXXDestructorDecl *Dtor = Ty->getAsCXXRecordDecl()->getDestructor(); - if (Dtor->isNoReturn()) + if (Ty->getAsCXXRecordDecl()->isAnyDestructorNoReturn()) Block = createNoReturnBlock(); else autoCreateBlock(); @@ -3682,7 +3694,7 @@ CFGBlock *CFGBuilder::VisitCXXBindTemporaryExprForTemporaryDtors( const CXXDestructorDecl *Dtor = E->getTemporary()->getDestructor(); - if (Dtor->isNoReturn()) { + if (Dtor->getParent()->isAnyDestructorNoReturn()) { // If the destructor is marked as a no-return destructor, we need to // create a new block for the destructor which does not have as a // successor anything built thus far. Control won't flow out of this diff --git a/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp b/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp index 631b978..1992804 100644 --- a/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp +++ b/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp @@ -112,7 +112,7 @@ void DiagnosticsEngine::Reset() { // Create a DiagState and DiagStatePoint representing diagnostic changes // through command-line. - DiagStates.push_back(DiagState()); + DiagStates.emplace_back(); DiagStatePoints.push_back(DiagStatePoint(&DiagStates.back(), FullSourceLoc())); } diff --git a/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp b/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp index e830be9..4e06352 100644 --- a/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp +++ b/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp @@ -109,7 +109,8 @@ namespace { KEYNOOPENCL = 0x02000, WCHARSUPPORT = 0x04000, HALFSUPPORT = 0x08000, - KEYALL = (0xffff & ~KEYNOMS18 & + KEYCONCEPTS = 0x10000, + KEYALL = (0x1ffff & ~KEYNOMS18 & ~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude. }; @@ -143,6 +144,7 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, // We treat bridge casts as objective-C keywords so we can warn on them // in non-arc mode. if (LangOpts.ObjC2 && (Flags & KEYARC)) return KS_Enabled; + if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled; if (LangOpts.CPlusPlus && (Flags & KEYCXX11)) return KS_Future; return KS_Disabled; } diff --git a/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp b/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp index 6b885a7..d254e86 100644 --- a/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp +++ b/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp @@ -134,7 +134,7 @@ const char *FullSourceLoc::getCharacterData(bool *Invalid) const { StringRef FullSourceLoc::getBufferData(bool *Invalid) const { assert(isValid()); - return SrcMgr->getBuffer(SrcMgr->getFileID(*this), Invalid)->getBuffer();; + return SrcMgr->getBuffer(SrcMgr->getFileID(*this), Invalid)->getBuffer(); } std::pair<FileID, unsigned> FullSourceLoc::getDecomposedLoc() const { diff --git a/contrib/llvm/tools/clang/lib/Basic/Targets.cpp b/contrib/llvm/tools/clang/lib/Basic/Targets.cpp index a768081..c0c6924 100644 --- a/contrib/llvm/tools/clang/lib/Basic/Targets.cpp +++ b/contrib/llvm/tools/clang/lib/Basic/Targets.cpp @@ -389,7 +389,7 @@ protected: if (Triple.getEnvironment() == llvm::Triple::Android) { Builder.defineMacro("__ANDROID__", "1"); unsigned Maj, Min, Rev; - Triple.getOSVersion(Maj, Min, Rev); + Triple.getEnvironmentVersion(Maj, Min, Rev); this->PlatformName = "android"; this->PlatformMinVersion = VersionTuple(Maj, Min, Rev); } @@ -3596,11 +3596,8 @@ public: }; } // end anonymous namespace -static void addMinGWDefines(const LangOptions &Opts, MacroBuilder &Builder) { - Builder.defineMacro("__MSVCRT__"); - Builder.defineMacro("__MINGW32__"); - - // Mingw defines __declspec(a) to __attribute__((a)). Clang supports +static void addCygMingDefines(const LangOptions &Opts, MacroBuilder &Builder) { + // Mingw and cygwin define __declspec(a) to __attribute__((a)). Clang supports // __declspec natively under -fms-extensions, but we define a no-op __declspec // macro anyway for pre-processor compatibility. if (Opts.MicrosoftExt) @@ -3623,6 +3620,12 @@ static void addMinGWDefines(const LangOptions &Opts, MacroBuilder &Builder) { } } +static void addMinGWDefines(const LangOptions &Opts, MacroBuilder &Builder) { + Builder.defineMacro("__MSVCRT__"); + Builder.defineMacro("__MINGW32__"); + addCygMingDefines(Opts, Builder); +} + namespace { // x86-32 MinGW target class MinGWX86_32TargetInfo : public WindowsX86_32TargetInfo { @@ -3655,6 +3658,7 @@ public: Builder.defineMacro("_X86_"); Builder.defineMacro("__CYGWIN__"); Builder.defineMacro("__CYGWIN32__"); + addCygMingDefines(Opts, Builder); DefineStd(Builder, "unix", Opts); if (Opts.CPlusPlus) Builder.defineMacro("_GNU_SOURCE"); @@ -4184,9 +4188,7 @@ public: // FIXME: This should be based on Arch attributes, not CPU names. void getDefaultFeatures(llvm::StringMap<bool> &Features) const override { StringRef ArchName = getTriple().getArchName(); - unsigned ArchKind = - llvm::ARMTargetParser::parseArch( - llvm::ARMTargetParser::getCanonicalArchName(ArchName)); + unsigned ArchKind = llvm::ARMTargetParser::parseArch(ArchName); bool IsV8 = (ArchKind == llvm::ARM::AK_ARMV8A || ArchKind == llvm::ARM::AK_ARMV8_1A); @@ -4293,9 +4295,7 @@ public: .Case("hwdiv-arm", HWDiv & HWDivARM) .Default(false); } - // FIXME: Should we actually have some table instead of these switches? const char *getCPUDefineSuffix(StringRef Name) const { - // FIXME: Use ARMTargetParser if(Name == "generic") { auto subarch = getTriple().getSubArch(); switch (subarch) { @@ -4306,34 +4306,33 @@ public: } } - return llvm::StringSwitch<const char *>(Name) - .Cases("arm8", "arm810", "4") - .Cases("strongarm", "strongarm110", "strongarm1100", "strongarm1110", - "4") - .Cases("arm7tdmi", "arm7tdmi-s", "arm710t", "arm720t", "arm9", "4T") - .Cases("arm9tdmi", "arm920", "arm920t", "arm922t", "arm940t", "4T") - .Case("ep9312", "4T") - .Cases("arm10tdmi", "arm1020t", "5T") - .Cases("arm9e", "arm946e-s", "arm966e-s", "arm968e-s", "5TE") - .Case("arm926ej-s", "5TEJ") - .Cases("arm10e", "arm1020e", "arm1022e", "5TE") - .Cases("xscale", "iwmmxt", "5TE") - .Case("arm1136j-s", "6J") - .Case("arm1136jf-s", "6") - .Cases("mpcorenovfp", "mpcore", "6K") - .Cases("arm1176jz-s", "arm1176jzf-s", "6K") - .Cases("arm1156t2-s", "arm1156t2f-s", "6T2") - .Cases("cortex-a5", "cortex-a7", "cortex-a8", "7A") - .Cases("cortex-a9", "cortex-a12", "cortex-a15", "cortex-a17", "krait", - "7A") - .Cases("cortex-r4", "cortex-r4f", "cortex-r5", "cortex-r7", "7R") - .Case("swift", "7S") - .Case("cyclone", "8A") - .Cases("sc300", "cortex-m3", "7M") - .Cases("cortex-m4", "cortex-m7", "7EM") - .Cases("sc000", "cortex-m0", "cortex-m0plus", "cortex-m1", "6M") - .Cases("cortex-a53", "cortex-a57", "cortex-a72", "8A") - .Default(nullptr); + unsigned ArchKind = llvm::ARMTargetParser::parseCPUArch(Name); + if (ArchKind == llvm::ARM::AK_INVALID) + return ""; + + // For most sub-arches, the build attribute CPU name is enough. + // For Cortex variants, it's slightly different. + switch(ArchKind) { + default: + return llvm::ARMTargetParser::getCPUAttr(ArchKind); + case llvm::ARM::AK_ARMV6M: + case llvm::ARM::AK_ARMV6SM: + return "6M"; + case llvm::ARM::AK_ARMV7: + case llvm::ARM::AK_ARMV7A: + case llvm::ARM::AK_ARMV7S: + return "7A"; + case llvm::ARM::AK_ARMV7R: + return "7R"; + case llvm::ARM::AK_ARMV7M: + return "7M"; + case llvm::ARM::AK_ARMV7EM: + return "7EM"; + case llvm::ARM::AK_ARMV8A: + return "8A"; + case llvm::ARM::AK_ARMV8_1A: + return "8_1A"; + } } const char *getCPUProfile(StringRef Name) const { if(Name == "generic") { @@ -5500,6 +5499,16 @@ class SparcV8TargetInfo : public SparcTargetInfo { public: SparcV8TargetInfo(const llvm::Triple &Triple) : SparcTargetInfo(Triple) { DescriptionString = "E-m:e-p:32:32-i64:64-f128:64-n32-S64"; + // NetBSD uses long (same as llvm default); everyone else uses int. + if (getTriple().getOS() == llvm::Triple::NetBSD) { + SizeType = UnsignedLong; + IntPtrType = SignedLong; + PtrDiffType = SignedLong; + } else { + SizeType = UnsignedInt; + IntPtrType = SignedInt; + PtrDiffType = SignedInt; + } } void getTargetDefines(const LangOptions &Opts, @@ -5572,15 +5581,6 @@ public: } }; -class SolarisSparcV8TargetInfo : public SolarisTargetInfo<SparcV8TargetInfo> { -public: - SolarisSparcV8TargetInfo(const llvm::Triple &Triple) - : SolarisTargetInfo<SparcV8TargetInfo>(Triple) { - SizeType = UnsignedInt; - PtrDiffType = SignedInt; - } -}; - class SystemZTargetInfo : public TargetInfo { static const Builtin::Info BuiltinInfo[]; static const char *const GCCRegNames[]; @@ -7022,7 +7022,7 @@ static TargetInfo *AllocateTarget(const llvm::Triple &Triple) { case llvm::Triple::Linux: return new LinuxTargetInfo<SparcV8TargetInfo>(Triple); case llvm::Triple::Solaris: - return new SolarisSparcV8TargetInfo(Triple); + return new SolarisTargetInfo<SparcV8TargetInfo>(Triple); case llvm::Triple::NetBSD: return new NetBSDTargetInfo<SparcV8TargetInfo>(Triple); case llvm::Triple::OpenBSD: diff --git a/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp b/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp index 7f0c7ba..8cece0d 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp @@ -453,10 +453,8 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) { std::string FeaturesStr; if (!TargetOpts.Features.empty()) { SubtargetFeatures Features; - for (std::vector<std::string>::const_iterator - it = TargetOpts.Features.begin(), - ie = TargetOpts.Features.end(); it != ie; ++it) - Features.AddFeature(*it); + for (const std::string &Feature : TargetOpts.Features) + Features.AddFeature(Feature); FeaturesStr = Features.getString(); } @@ -624,10 +622,9 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, PrettyStackTraceString CrashInfo("Per-function optimization"); PerFunctionPasses->doInitialization(); - for (Module::iterator I = TheModule->begin(), - E = TheModule->end(); I != E; ++I) - if (!I->isDeclaration()) - PerFunctionPasses->run(*I); + for (Function &F : *TheModule) + if (!F.isDeclaration()) + PerFunctionPasses->run(F); PerFunctionPasses->doFinalization(); } diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp index 272baac..d86534d 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp @@ -698,6 +698,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, std::pair<llvm::Value*, unsigned> Dest = EmitPointerWithAlignment(E->getArg(0)); Value *SizeVal = EmitScalarExpr(E->getArg(1)); + EmitNonNullArgCheck(RValue::get(Dest.first), E->getArg(0)->getType(), + E->getArg(0)->getExprLoc(), FD, 0); Builder.CreateMemSet(Dest.first, Builder.getInt8(0), SizeVal, Dest.second, false); return RValue::get(Dest.first); @@ -710,6 +712,10 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, EmitPointerWithAlignment(E->getArg(1)); Value *SizeVal = EmitScalarExpr(E->getArg(2)); unsigned Align = std::min(Dest.second, Src.second); + EmitNonNullArgCheck(RValue::get(Dest.first), E->getArg(0)->getType(), + E->getArg(0)->getExprLoc(), FD, 0); + EmitNonNullArgCheck(RValue::get(Src.first), E->getArg(1)->getType(), + E->getArg(1)->getExprLoc(), FD, 1); Builder.CreateMemCpy(Dest.first, Src.first, SizeVal, Align, false); return RValue::get(Dest.first); } @@ -767,6 +773,10 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, EmitPointerWithAlignment(E->getArg(1)); Value *SizeVal = EmitScalarExpr(E->getArg(2)); unsigned Align = std::min(Dest.second, Src.second); + EmitNonNullArgCheck(RValue::get(Dest.first), E->getArg(0)->getType(), + E->getArg(0)->getExprLoc(), FD, 0); + EmitNonNullArgCheck(RValue::get(Src.first), E->getArg(1)->getType(), + E->getArg(1)->getExprLoc(), FD, 1); Builder.CreateMemMove(Dest.first, Src.first, SizeVal, Align, false); return RValue::get(Dest.first); } @@ -777,6 +787,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, Value *ByteVal = Builder.CreateTrunc(EmitScalarExpr(E->getArg(1)), Builder.getInt8Ty()); Value *SizeVal = EmitScalarExpr(E->getArg(2)); + EmitNonNullArgCheck(RValue::get(Dest.first), E->getArg(0)->getType(), + E->getArg(0)->getExprLoc(), FD, 0); Builder.CreateMemSet(Dest.first, ByteVal, SizeVal, Dest.second, false); return RValue::get(Dest.first); } @@ -3479,6 +3491,13 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID, } } + // Find out if any arguments are required to be integer constant + // expressions. + unsigned ICEArguments = 0; + ASTContext::GetBuiltinTypeError Error; + getContext().GetBuiltinType(BuiltinID, Error, &ICEArguments); + assert(Error == ASTContext::GE_None && "Should not codegen an error"); + SmallVector<Value*, 4> Ops; llvm::Value *Align = nullptr; for (unsigned i = 0, e = E->getNumArgs() - 1; i != e; i++) { @@ -3541,7 +3560,17 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID, continue; } } - Ops.push_back(EmitScalarExpr(E->getArg(i))); + + if ((ICEArguments & (1 << i)) == 0) { + Ops.push_back(EmitScalarExpr(E->getArg(i))); + } else { + // If this is required to be a constant, constant fold it so that we know + // that the generated intrinsic gets a ConstantInt. + llvm::APSInt Result; + bool IsConst = E->getArg(i)->isIntegerConstantExpr(Result, getContext()); + assert(IsConst && "Constant arg isn't actually constant?"); (void)IsConst; + Ops.push_back(llvm::ConstantInt::get(getLLVMContext(), Result)); + } } switch (BuiltinID) { @@ -4001,38 +4030,6 @@ Value *CodeGenFunction::vectorWrapScalar8(Value *Op) { return Op; } -Value *CodeGenFunction:: -emitVectorWrappedScalar8Intrinsic(unsigned Int, SmallVectorImpl<Value*> &Ops, - const char *Name) { - // i8 is not a legal types for AArch64, so we can't just use - // a normal overloaded intrinsic call for these scalar types. Instead - // we'll build 64-bit vectors w/ lane zero being our input values and - // perform the operation on that. The back end can pattern match directly - // to the scalar instruction. - Ops[0] = vectorWrapScalar8(Ops[0]); - Ops[1] = vectorWrapScalar8(Ops[1]); - llvm::Type *VTy = llvm::VectorType::get(Int8Ty, 8); - Value *V = EmitNeonCall(CGM.getIntrinsic(Int, VTy), Ops, Name); - Constant *CI = ConstantInt::get(SizeTy, 0); - return Builder.CreateExtractElement(V, CI, "lane0"); -} - -Value *CodeGenFunction:: -emitVectorWrappedScalar16Intrinsic(unsigned Int, SmallVectorImpl<Value*> &Ops, - const char *Name) { - // i16 is not a legal types for AArch64, so we can't just use - // a normal overloaded intrinsic call for these scalar types. Instead - // we'll build 64-bit vectors w/ lane zero being our input values and - // perform the operation on that. The back end can pattern match directly - // to the scalar instruction. - Ops[0] = vectorWrapScalar16(Ops[0]); - Ops[1] = vectorWrapScalar16(Ops[1]); - llvm::Type *VTy = llvm::VectorType::get(Int16Ty, 4); - Value *V = EmitNeonCall(CGM.getIntrinsic(Int, VTy), Ops, Name); - Constant *CI = ConstantInt::get(SizeTy, 0); - return Builder.CreateExtractElement(V, CI, "lane0"); -} - Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, const CallExpr *E) { unsigned HintID = static_cast<unsigned>(-1); @@ -4242,9 +4239,27 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, return Builder.CreateCall(F, {Arg0, Arg1}); } + // Find out if any arguments are required to be integer constant + // expressions. + unsigned ICEArguments = 0; + ASTContext::GetBuiltinTypeError Error; + getContext().GetBuiltinType(BuiltinID, Error, &ICEArguments); + assert(Error == ASTContext::GE_None && "Should not codegen an error"); + llvm::SmallVector<Value*, 4> Ops; - for (unsigned i = 0, e = E->getNumArgs() - 1; i != e; i++) - Ops.push_back(EmitScalarExpr(E->getArg(i))); + for (unsigned i = 0, e = E->getNumArgs() - 1; i != e; i++) { + if ((ICEArguments & (1 << i)) == 0) { + Ops.push_back(EmitScalarExpr(E->getArg(i))); + } else { + // If this is required to be a constant, constant fold it so that we know + // that the generated intrinsic gets a ConstantInt. + llvm::APSInt Result; + bool IsConst = E->getArg(i)->isIntegerConstantExpr(Result, getContext()); + assert(IsConst && "Constant arg isn't actually constant?"); + (void)IsConst; + Ops.push_back(llvm::ConstantInt::get(getLLVMContext(), Result)); + } + } auto SISDMap = makeArrayRef(AArch64SISDIntrinsicMap); const NeonIntrinsicInfo *Builtin = findNeonIntrinsicInMap( diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp index 29a199d..7d7ed78 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp @@ -218,6 +218,8 @@ llvm::Function *CodeGenModule::codegenCXXStructor(const CXXMethodDecl *MD, } setFunctionLinkage(GD, Fn); + setFunctionDLLStorageClass(GD, Fn); + CodeGenFunction(*this).GenerateCode(GD, Fn, FnInfo); setFunctionDefinitionAttributes(MD, Fn); SetLLVMFunctionAttributesForDefinition(MD, Fn); diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp index f234053..e77539c 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp @@ -2719,27 +2719,28 @@ void CallArgList::freeArgumentMemory(CodeGenFunction &CGF) const { } } -static void emitNonNullArgCheck(CodeGenFunction &CGF, RValue RV, - QualType ArgType, SourceLocation ArgLoc, - const FunctionDecl *FD, unsigned ParmNum) { - if (!CGF.SanOpts.has(SanitizerKind::NonnullAttribute) || !FD) +void CodeGenFunction::EmitNonNullArgCheck(RValue RV, QualType ArgType, + SourceLocation ArgLoc, + const FunctionDecl *FD, + unsigned ParmNum) { + if (!SanOpts.has(SanitizerKind::NonnullAttribute) || !FD) return; auto PVD = ParmNum < FD->getNumParams() ? FD->getParamDecl(ParmNum) : nullptr; unsigned ArgNo = PVD ? PVD->getFunctionScopeIndex() : ParmNum; auto NNAttr = getNonNullAttr(FD, PVD, ArgType, ArgNo); if (!NNAttr) return; - CodeGenFunction::SanitizerScope SanScope(&CGF); + SanitizerScope SanScope(this); assert(RV.isScalar()); llvm::Value *V = RV.getScalarVal(); llvm::Value *Cond = - CGF.Builder.CreateICmpNE(V, llvm::Constant::getNullValue(V->getType())); + Builder.CreateICmpNE(V, llvm::Constant::getNullValue(V->getType())); llvm::Constant *StaticData[] = { - CGF.EmitCheckSourceLocation(ArgLoc), - CGF.EmitCheckSourceLocation(NNAttr->getLocation()), - llvm::ConstantInt::get(CGF.Int32Ty, ArgNo + 1), + EmitCheckSourceLocation(ArgLoc), + EmitCheckSourceLocation(NNAttr->getLocation()), + llvm::ConstantInt::get(Int32Ty, ArgNo + 1), }; - CGF.EmitCheck(std::make_pair(Cond, SanitizerKind::NonnullAttribute), + EmitCheck(std::make_pair(Cond, SanitizerKind::NonnullAttribute), "nonnull_arg", StaticData, None); } @@ -2767,7 +2768,7 @@ void CodeGenFunction::EmitCallArgs(CallArgList &Args, for (int I = ArgTypes.size() - 1; I >= 0; --I) { CallExpr::const_arg_iterator Arg = ArgBeg + I; EmitCallArg(Args, *Arg, ArgTypes[I]); - emitNonNullArgCheck(*this, Args.back().RV, ArgTypes[I], Arg->getExprLoc(), + EmitNonNullArgCheck(Args.back().RV, ArgTypes[I], Arg->getExprLoc(), CalleeDecl, ParamsToSkip + I); } @@ -2781,7 +2782,7 @@ void CodeGenFunction::EmitCallArgs(CallArgList &Args, CallExpr::const_arg_iterator Arg = ArgBeg + I; assert(Arg != ArgEnd); EmitCallArg(Args, *Arg, ArgTypes[I]); - emitNonNullArgCheck(*this, Args.back().RV, ArgTypes[I], Arg->getExprLoc(), + EmitNonNullArgCheck(Args.back().RV, ArgTypes[I], Arg->getExprLoc(), CalleeDecl, ParamsToSkip + I); } } @@ -3081,10 +3082,18 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, // If the call returns a temporary with struct return, create a temporary // alloca to hold the result, unless one is given to us. llvm::Value *SRetPtr = nullptr; + size_t UnusedReturnSize = 0; if (RetAI.isIndirect() || RetAI.isInAlloca()) { SRetPtr = ReturnValue.getValue(); - if (!SRetPtr) + if (!SRetPtr) { SRetPtr = CreateMemTemp(RetTy); + if (HaveInsertPoint() && ReturnValue.isUnused()) { + uint64_t size = + CGM.getDataLayout().getTypeAllocSize(ConvertTypeForMem(RetTy)); + if (EmitLifetimeStart(size, SRetPtr)) + UnusedReturnSize = size; + } + } if (IRFunctionArgs.hasSRetArg()) { IRCallArgs[IRFunctionArgs.getSRetArgNo()] = SRetPtr; } else { @@ -3416,6 +3425,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, // insertion point; this allows the rest of IRgen to discard // unreachable code. if (CS.doesNotReturn()) { + if (UnusedReturnSize) + EmitLifetimeEnd(llvm::ConstantInt::get(Int64Ty, UnusedReturnSize), + SRetPtr); + Builder.CreateUnreachable(); Builder.ClearInsertionPoint(); @@ -3444,8 +3457,13 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, RValue Ret = [&] { switch (RetAI.getKind()) { case ABIArgInfo::InAlloca: - case ABIArgInfo::Indirect: - return convertTempToRValue(SRetPtr, RetTy, SourceLocation()); + case ABIArgInfo::Indirect: { + RValue ret = convertTempToRValue(SRetPtr, RetTy, SourceLocation()); + if (UnusedReturnSize) + EmitLifetimeEnd(llvm::ConstantInt::get(Int64Ty, UnusedReturnSize), + SRetPtr); + return ret; + } case ABIArgInfo::Ignore: // If we are ignoring an argument that had a result, make sure to diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h b/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h index b228733..7a4708e 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h @@ -155,17 +155,25 @@ namespace CodeGen { /// ReturnValueSlot - Contains the address where the return value of a /// function can be stored, and whether the address is volatile or not. class ReturnValueSlot { - llvm::PointerIntPair<llvm::Value *, 1, bool> Value; + llvm::PointerIntPair<llvm::Value *, 2, unsigned int> Value; + + // Return value slot flags + enum Flags { + IS_VOLATILE = 0x1, + IS_UNUSED = 0x2, + }; public: ReturnValueSlot() {} - ReturnValueSlot(llvm::Value *Value, bool IsVolatile) - : Value(Value, IsVolatile) {} + ReturnValueSlot(llvm::Value *Value, bool IsVolatile, bool IsUnused = false) + : Value(Value, + (IsVolatile ? IS_VOLATILE : 0) | (IsUnused ? IS_UNUSED : 0)) {} bool isNull() const { return !getValue(); } - - bool isVolatile() const { return Value.getInt(); } + + bool isVolatile() const { return Value.getInt() & IS_VOLATILE; } llvm::Value *getValue() const { return Value.getPointer(); } + bool isUnused() const { return Value.getInt() & IS_UNUSED; } }; } // end namespace CodeGen diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp index 6fedf0e..8b1bc69 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp @@ -34,6 +34,7 @@ class AggExprEmitter : public StmtVisitor<AggExprEmitter> { CodeGenFunction &CGF; CGBuilderTy &Builder; AggValueSlot Dest; + bool IsResultUnused; /// We want to use 'dest' as the return slot except under two /// conditions: @@ -48,7 +49,7 @@ class AggExprEmitter : public StmtVisitor<AggExprEmitter> { if (!shouldUseDestForReturnSlot()) return ReturnValueSlot(); - return ReturnValueSlot(Dest.getAddr(), Dest.isVolatile()); + return ReturnValueSlot(Dest.getAddr(), Dest.isVolatile(), IsResultUnused); } AggValueSlot EnsureSlot(QualType T) { @@ -61,9 +62,9 @@ class AggExprEmitter : public StmtVisitor<AggExprEmitter> { } public: - AggExprEmitter(CodeGenFunction &cgf, AggValueSlot Dest) - : CGF(cgf), Builder(CGF.Builder), Dest(Dest) { - } + AggExprEmitter(CodeGenFunction &cgf, AggValueSlot Dest, bool IsResultUnused) + : CGF(cgf), Builder(CGF.Builder), Dest(Dest), + IsResultUnused(IsResultUnused) { } //===--------------------------------------------------------------------===// // Utilities @@ -1394,7 +1395,7 @@ void CodeGenFunction::EmitAggExpr(const Expr *E, AggValueSlot Slot) { // Optimize the slot if possible. CheckAggExprForMemSetUse(Slot, E, *this); - AggExprEmitter(*this, Slot).Visit(const_cast<Expr*>(E)); + AggExprEmitter(*this, Slot, Slot.isIgnored()).Visit(const_cast<Expr*>(E)); } LValue CodeGenFunction::EmitAggExprToLValue(const Expr *E) { diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp index 73ca0cc..b90b3ab 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp @@ -1349,8 +1349,14 @@ static llvm::Constant *EmitNullConstant(CodeGenModule &CGM, } // For unions, stop after the first named field. - if (record->isUnion() && Field->getDeclName()) - break; + if (record->isUnion()) { + if (Field->getIdentifier()) + break; + if (const auto *FieldRD = + dyn_cast_or_null<RecordDecl>(Field->getType()->getAsTagDecl())) + if (FieldRD->findFirstNamedDataMember()) + break; + } } // Fill in the virtual bases, if we're working with the complete object. diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp index 011ae7e..0675544 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp @@ -13,8 +13,7 @@ #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Metadata.h" -using namespace clang; -using namespace CodeGen; +using namespace clang::CodeGen; using namespace llvm; static MDNode *createMetadata(LLVMContext &Ctx, const LoopAttributes &Attrs) { diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp index 1580c77..b52d623 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp @@ -1057,7 +1057,7 @@ llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel, SelValue = llvm::GlobalAlias::create( SelectorTy, llvm::GlobalValue::PrivateLinkage, ".objc_selector_" + Sel.getAsString(), &TheModule); - Types.push_back(TypedSelector(TypeEncoding, SelValue)); + Types.emplace_back(TypeEncoding, SelValue); } if (lval) { @@ -2121,9 +2121,8 @@ void CGObjCGNU::RegisterAlias(const ObjCCompatibleAliasDecl *OAD) { // Get the class declaration for which the alias is specified. ObjCInterfaceDecl *ClassDecl = const_cast<ObjCInterfaceDecl *>(OAD->getClassInterface()); - std::string ClassName = ClassDecl->getNameAsString(); - std::string AliasName = OAD->getNameAsString(); - ClassAliases.push_back(ClassAliasPair(ClassName,AliasName)); + ClassAliases.emplace_back(ClassDecl->getNameAsString(), + OAD->getNameAsString()); } void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) { diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp index 72ecd65..c89d5cc 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -314,9 +314,13 @@ void CGRecordLowering::lowerUnion() { // If this is the case, then we aught not to try and come up with a "better" // type, it might not be very easy to come up with a Constant which // correctly initializes it. - if (!SeenNamedMember && Field->getDeclName()) { - SeenNamedMember = true; - if (!isZeroInitializable(Field)) { + if (!SeenNamedMember) { + SeenNamedMember = Field->getIdentifier(); + if (!SeenNamedMember) + if (const auto *FieldRD = + dyn_cast_or_null<RecordDecl>(Field->getType()->getAsTagDecl())) + SeenNamedMember = FieldRD->findFirstNamedDataMember(); + if (SeenNamedMember && !isZeroInitializable(Field)) { IsZeroInitializable = IsZeroInitializableAsBase = false; StorageType = FieldType; } diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h index 650ad7b..469022d 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h +++ b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h @@ -2563,14 +2563,7 @@ public: // Helper functions for EmitAArch64BuiltinExpr. llvm::Value *vectorWrapScalar8(llvm::Value *Op); llvm::Value *vectorWrapScalar16(llvm::Value *Op); - llvm::Value *emitVectorWrappedScalar8Intrinsic( - unsigned Int, SmallVectorImpl<llvm::Value *> &Ops, const char *Name); - llvm::Value *emitVectorWrappedScalar16Intrinsic( - unsigned Int, SmallVectorImpl<llvm::Value *> &Ops, const char *Name); llvm::Value *EmitAArch64BuiltinExpr(unsigned BuiltinID, const CallExpr *E); - llvm::Value *EmitNeon64Call(llvm::Function *F, - llvm::SmallVectorImpl<llvm::Value *> &O, - const char *name); llvm::Value *BuildVector(ArrayRef<llvm::Value*> Ops); llvm::Value *EmitX86BuiltinExpr(unsigned BuiltinID, const CallExpr *E); @@ -2843,6 +2836,11 @@ public: /// conditional branch to it, for the -ftrapv checks. void EmitTrapCheck(llvm::Value *Checked); + /// \brief Create a check for a function parameter that may potentially be + /// declared as non-null. + void EmitNonNullArgCheck(RValue RV, QualType ArgType, SourceLocation ArgLoc, + const FunctionDecl *FD, unsigned ParmNum); + /// EmitCallArg - Emit a single call argument. void EmitCallArg(CallArgList &args, const Expr *E, QualType ArgType); diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp index 4005061..9496831 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp @@ -676,6 +676,25 @@ CodeGenModule::getFunctionLinkage(GlobalDecl GD) { return getLLVMLinkageForDeclarator(D, Linkage, /*isConstantVariable=*/false); } +void CodeGenModule::setFunctionDLLStorageClass(GlobalDecl GD, llvm::Function *F) { + const auto *FD = cast<FunctionDecl>(GD.getDecl()); + + if (const auto *Dtor = dyn_cast_or_null<CXXDestructorDecl>(FD)) { + if (getCXXABI().useThunkForDtorVariant(Dtor, GD.getDtorType())) { + // Don't dllexport/import destructor thunks. + F->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass); + return; + } + } + + if (FD->hasAttr<DLLImportAttr>()) + F->setDLLStorageClass(llvm::GlobalVariable::DLLImportStorageClass); + else if (FD->hasAttr<DLLExportAttr>()) + F->setDLLStorageClass(llvm::GlobalVariable::DLLExportStorageClass); + else + F->setDLLStorageClass(llvm::GlobalVariable::DefaultStorageClass); +} + void CodeGenModule::setFunctionDefinitionAttributes(const FunctionDecl *D, llvm::Function *F) { setNonAliasAttributes(D, F); @@ -817,7 +836,7 @@ void CodeGenModule::setNonAliasAttributes(const Decl *D, if (const SectionAttr *SA = D->getAttr<SectionAttr>()) GO->setSection(SA->getName()); - getTargetCodeGenInfo().SetTargetAttributes(D, GO, *this); + getTargetCodeGenInfo().setTargetAttributes(D, GO, *this); } void CodeGenModule::SetInternalFunctionAttributes(const Decl *D, @@ -889,13 +908,6 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F, setLinkageAndVisibilityForGV(F, FD); - if (const auto *Dtor = dyn_cast_or_null<CXXDestructorDecl>(FD)) { - if (getCXXABI().useThunkForDtorVariant(Dtor, GD.getDtorType())) { - // Don't dllexport/import destructor thunks. - F->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass); - } - } - if (const SectionAttr *SA = FD->getAttr<SectionAttr>()) F->setSection(SA->getName()); @@ -909,13 +921,13 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F, void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { assert(!GV->isDeclaration() && "Only globals with definition can force usage."); - LLVMUsed.push_back(GV); + LLVMUsed.emplace_back(GV); } void CodeGenModule::addCompilerUsedGlobal(llvm::GlobalValue *GV) { assert(!GV->isDeclaration() && "Only globals with definition can force usage."); - LLVMCompilerUsed.push_back(GV); + LLVMCompilerUsed.emplace_back(GV); } static void emitUsed(CodeGenModule &CGM, StringRef Name, @@ -2455,12 +2467,7 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, // declarations). auto *Fn = cast<llvm::Function>(GV); setFunctionLinkage(GD, Fn); - if (D->hasAttr<DLLImportAttr>()) - GV->setDLLStorageClass(llvm::GlobalVariable::DLLImportStorageClass); - else if (D->hasAttr<DLLExportAttr>()) - GV->setDLLStorageClass(llvm::GlobalVariable::DLLExportStorageClass); - else - GV->setDLLStorageClass(llvm::GlobalVariable::DefaultStorageClass); + setFunctionDLLStorageClass(GD, Fn); // FIXME: this is redundant with part of setFunctionDefinitionAttributes setGlobalVisibility(Fn, D); diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h index feef6c2..edde426 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h +++ b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h @@ -329,7 +329,7 @@ private: }; std::vector<DeferredGlobal> DeferredDeclsToEmit; void addDeferredDeclToEmit(llvm::GlobalValue *GV, GlobalDecl GD) { - DeferredDeclsToEmit.push_back(DeferredGlobal(GV, GD)); + DeferredDeclsToEmit.emplace_back(GV, GD); } /// List of alias we have emitted. Used to make sure that what they point to @@ -876,7 +876,7 @@ public: /// Add a destructor and object to add to the C++ global destructor function. void AddCXXDtorEntry(llvm::Constant *DtorFn, llvm::Constant *Object) { - CXXGlobalDtors.push_back(std::make_pair(DtorFn, Object)); + CXXGlobalDtors.emplace_back(DtorFn, Object); } /// Create a new runtime function with the specified type and name. @@ -1018,6 +1018,9 @@ public: F->setLinkage(getFunctionLinkage(GD)); } + /// Set the DLL storage class on F. + void setFunctionDLLStorageClass(GlobalDecl GD, llvm::Function *F); + /// Return the appropriate linkage for the vtable, VTT, and type information /// of the given class. llvm::GlobalVariable::LinkageTypes getVTableLinkage(const CXXRecordDecl *RD); diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp index c972443..f182a46 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp @@ -773,6 +773,8 @@ CodeGenPGO::applyFunctionAttributes(llvm::IndexedInstrProfReader *PGOReader, // Turn on Cold attribute for cold functions. // FIXME: 1% is from preliminary tuning on SPEC, it may not be optimal. Fn->addFnAttr(llvm::Attribute::Cold); + + Fn->setEntryCount(FunctionCount); } void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, const Stmt *S) { diff --git a/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp b/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp index 53154b5..e77c124 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp @@ -649,7 +649,7 @@ public: static bool isStructReturnInRegABI( const llvm::Triple &Triple, const CodeGenOptions &Opts); - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override; int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const override { @@ -826,7 +826,8 @@ ABIArgInfo X86_32ABIInfo::getIndirectReturnResult(CCState &State) const { return ABIArgInfo::getIndirect(/*Align=*/0, /*ByVal=*/false); } -ABIArgInfo X86_32ABIInfo::classifyReturnType(QualType RetTy, CCState &State) const { +ABIArgInfo X86_32ABIInfo::classifyReturnType(QualType RetTy, + CCState &State) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); @@ -1330,7 +1331,7 @@ bool X86_32TargetCodeGenInfo::isStructReturnInRegABI( } } -void X86_32TargetCodeGenInfo::SetTargetAttributes(const Decl *D, +void X86_32TargetCodeGenInfo::setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { @@ -1664,7 +1665,7 @@ public: bool d, bool p, bool w, unsigned RegParms) : X86_32TargetCodeGenInfo(CGT, d, p, w, RegParms) {} - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override; void getDependentLibraryOption(llvm::StringRef Lib, @@ -1687,15 +1688,16 @@ static void addStackProbeSizeTargetAttribute(const Decl *D, if (CGM.getCodeGenOpts().StackProbeSize != 4096) { llvm::Function *Fn = cast<llvm::Function>(GV); - Fn->addFnAttr("stack-probe-size", llvm::utostr(CGM.getCodeGenOpts().StackProbeSize)); + Fn->addFnAttr("stack-probe-size", + llvm::utostr(CGM.getCodeGenOpts().StackProbeSize)); } } } -void WinX86_32TargetCodeGenInfo::SetTargetAttributes(const Decl *D, +void WinX86_32TargetCodeGenInfo::setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { - X86_32TargetCodeGenInfo::SetTargetAttributes(D, GV, CGM); + X86_32TargetCodeGenInfo::setTargetAttributes(D, GV, CGM); addStackProbeSizeTargetAttribute(D, GV, CGM); } @@ -1707,7 +1709,7 @@ public: WinX86_64TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT) : TargetCodeGenInfo(new WinX86_64ABIInfo(CGT)) {} - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override; int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const override { @@ -1741,10 +1743,10 @@ public: } }; -void WinX86_64TargetCodeGenInfo::SetTargetAttributes(const Decl *D, +void WinX86_64TargetCodeGenInfo::setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { - TargetCodeGenInfo::SetTargetAttributes(D, GV, CGM); + TargetCodeGenInfo::setTargetAttributes(D, GV, CGM); addStackProbeSizeTargetAttribute(D, GV, CGM); } @@ -2225,9 +2227,16 @@ llvm::Type *X86_64ABIInfo::GetByteVectorType(QualType Ty) const { Ty = QualType(InnerTy, 0); llvm::Type *IRType = CGT.ConvertType(Ty); - assert(isa<llvm::VectorType>(IRType) && - "Trying to return a non-vector type in a vector register!"); - return IRType; + if(isa<llvm::VectorType>(IRType)) + return IRType; + + // We couldn't find the preferred IR vector type for 'Ty'. + uint64_t Size = getContext().getTypeSize(Ty); + assert((Size == 128 || Size == 256) && "Invalid type found!"); + + // Return a LLVM IR vector type based on the size of 'Ty'. + return llvm::VectorType::get(llvm::Type::getDoubleTy(getVMContext()), + Size / 64); } /// BitsContainNoUserData - Return true if the specified [start,end) bit range @@ -2847,7 +2856,7 @@ llvm::Value *X86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, unsigned neededInt, neededSSE; Ty = CGF.getContext().getCanonicalType(Ty); - ABIArgInfo AI = classifyArgumentType(Ty, 0, neededInt, neededSSE, + ABIArgInfo AI = classifyArgumentType(Ty, 0, neededInt, neededSSE, /*isNamedArg*/false); // AMD64-ABI 3.5.7p5: Step 1. Determine whether type may be passed @@ -3126,7 +3135,8 @@ public: class PPC32TargetCodeGenInfo : public TargetCodeGenInfo { public: - PPC32TargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new PPC32_SVR4_ABIInfo(CGT)) {} + PPC32TargetCodeGenInfo(CodeGenTypes &CGT) + : TargetCodeGenInfo(new PPC32_SVR4_ABIInfo(CGT)) {} int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override { // This is recovered from gcc output. @@ -3153,19 +3163,25 @@ llvm::Value *PPC32_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr, } bool isI64 = Ty->isIntegerType() && getContext().getTypeSize(Ty) == 64; - bool isInt = Ty->isIntegerType() || Ty->isPointerType() || Ty->isAggregateType(); + bool isInt = + Ty->isIntegerType() || Ty->isPointerType() || Ty->isAggregateType(); llvm::Type *CharPtr = CGF.Int8PtrTy; llvm::Type *CharPtrPtr = CGF.Int8PtrPtrTy; CGBuilderTy &Builder = CGF.Builder; llvm::Value *GPRPtr = Builder.CreateBitCast(VAListAddr, CharPtr, "gprptr"); llvm::Value *GPRPtrAsInt = Builder.CreatePtrToInt(GPRPtr, CGF.Int32Ty); - llvm::Value *FPRPtrAsInt = Builder.CreateAdd(GPRPtrAsInt, Builder.getInt32(1)); + llvm::Value *FPRPtrAsInt = + Builder.CreateAdd(GPRPtrAsInt, Builder.getInt32(1)); llvm::Value *FPRPtr = Builder.CreateIntToPtr(FPRPtrAsInt, CharPtr); - llvm::Value *OverflowAreaPtrAsInt = Builder.CreateAdd(FPRPtrAsInt, Builder.getInt32(3)); - llvm::Value *OverflowAreaPtr = Builder.CreateIntToPtr(OverflowAreaPtrAsInt, CharPtrPtr); - llvm::Value *RegsaveAreaPtrAsInt = Builder.CreateAdd(OverflowAreaPtrAsInt, Builder.getInt32(4)); - llvm::Value *RegsaveAreaPtr = Builder.CreateIntToPtr(RegsaveAreaPtrAsInt, CharPtrPtr); + llvm::Value *OverflowAreaPtrAsInt = + Builder.CreateAdd(FPRPtrAsInt, Builder.getInt32(3)); + llvm::Value *OverflowAreaPtr = + Builder.CreateIntToPtr(OverflowAreaPtrAsInt, CharPtrPtr); + llvm::Value *RegsaveAreaPtrAsInt = + Builder.CreateAdd(OverflowAreaPtrAsInt, Builder.getInt32(4)); + llvm::Value *RegsaveAreaPtr = + Builder.CreateIntToPtr(RegsaveAreaPtrAsInt, CharPtrPtr); llvm::Value *GPR = Builder.CreateLoad(GPRPtr, false, "gpr"); // Align GPR when TY is i64. if (isI64) { @@ -3175,18 +3191,23 @@ llvm::Value *PPC32_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr, GPR = Builder.CreateSelect(CC64, GPRPlusOne, GPR); } llvm::Value *FPR = Builder.CreateLoad(FPRPtr, false, "fpr"); - llvm::Value *OverflowArea = Builder.CreateLoad(OverflowAreaPtr, false, "overflow_area"); - llvm::Value *OverflowAreaAsInt = Builder.CreatePtrToInt(OverflowArea, CGF.Int32Ty); - llvm::Value *RegsaveArea = Builder.CreateLoad(RegsaveAreaPtr, false, "regsave_area"); - llvm::Value *RegsaveAreaAsInt = Builder.CreatePtrToInt(RegsaveArea, CGF.Int32Ty); + llvm::Value *OverflowArea = + Builder.CreateLoad(OverflowAreaPtr, false, "overflow_area"); + llvm::Value *OverflowAreaAsInt = + Builder.CreatePtrToInt(OverflowArea, CGF.Int32Ty); + llvm::Value *RegsaveArea = + Builder.CreateLoad(RegsaveAreaPtr, false, "regsave_area"); + llvm::Value *RegsaveAreaAsInt = + Builder.CreatePtrToInt(RegsaveArea, CGF.Int32Ty); - llvm::Value *CC = Builder.CreateICmpULT(isInt ? GPR : FPR, - Builder.getInt8(8), "cond"); + llvm::Value *CC = + Builder.CreateICmpULT(isInt ? GPR : FPR, Builder.getInt8(8), "cond"); - llvm::Value *RegConstant = Builder.CreateMul(isInt ? GPR : FPR, - Builder.getInt8(isInt ? 4 : 8)); + llvm::Value *RegConstant = + Builder.CreateMul(isInt ? GPR : FPR, Builder.getInt8(isInt ? 4 : 8)); - llvm::Value *OurReg = Builder.CreateAdd(RegsaveAreaAsInt, Builder.CreateSExt(RegConstant, CGF.Int32Ty)); + llvm::Value *OurReg = Builder.CreateAdd( + RegsaveAreaAsInt, Builder.CreateSExt(RegConstant, CGF.Int32Ty)); if (Ty->isFloatingType()) OurReg = Builder.CreateAdd(OurReg, Builder.getInt32(32)); @@ -3215,8 +3236,10 @@ llvm::Value *PPC32_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr, // Increase the overflow area. llvm::Value *Result2 = Builder.CreateIntToPtr(OverflowAreaAsInt, PTy); - OverflowAreaAsInt = Builder.CreateAdd(OverflowAreaAsInt, Builder.getInt32(isInt ? 4 : 8)); - Builder.CreateStore(Builder.CreateIntToPtr(OverflowAreaAsInt, CharPtr), OverflowAreaPtr); + OverflowAreaAsInt = + Builder.CreateAdd(OverflowAreaAsInt, Builder.getInt32(isInt ? 4 : 8)); + Builder.CreateStore(Builder.CreateIntToPtr(OverflowAreaAsInt, CharPtr), + OverflowAreaPtr); CGF.EmitBranch(Cont); CGF.EmitBlock(Cont); @@ -3226,7 +3249,7 @@ llvm::Value *PPC32_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr, Result->addIncoming(Result2, UsingOverflow); if (Ty->isAggregateType()) { - llvm::Value *AGGPtr = Builder.CreateBitCast(Result, CharPtrPtr, "aggrptr") ; + llvm::Value *AGGPtr = Builder.CreateBitCast(Result, CharPtrPtr, "aggrptr"); return Builder.CreateLoad(AGGPtr, false, "aggr"); } @@ -3795,8 +3818,10 @@ llvm::Value *PPC64_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr, llvm::Value *RealAddr = Builder.CreatePtrToInt(Addr, CGF.Int64Ty); llvm::Value *ImagAddr = RealAddr; if (CGF.CGM.getDataLayout().isBigEndian()) { - RealAddr = Builder.CreateAdd(RealAddr, Builder.getInt64(8 - CplxBaseSize)); - ImagAddr = Builder.CreateAdd(ImagAddr, Builder.getInt64(16 - CplxBaseSize)); + RealAddr = + Builder.CreateAdd(RealAddr, Builder.getInt64(8 - CplxBaseSize)); + ImagAddr = + Builder.CreateAdd(ImagAddr, Builder.getInt64(16 - CplxBaseSize)); } else { ImagAddr = Builder.CreateAdd(ImagAddr, Builder.getInt64(8)); } @@ -4354,8 +4379,9 @@ llvm::Value *AArch64ABIInfo::EmitAAPCSVAArg(llvm::Value *VAListAddr, return ResAddr; } -llvm::Value *AArch64ABIInfo::EmitDarwinVAArg(llvm::Value *VAListAddr, QualType Ty, - CodeGenFunction &CGF) const { +llvm::Value *AArch64ABIInfo::EmitDarwinVAArg(llvm::Value *VAListAddr, + QualType Ty, + CodeGenFunction &CGF) const { // We do not support va_arg for aggregates or illegal vector types. // Lower VAArg here for these cases and use the LLVM va_arg instruction for // other cases. @@ -4511,7 +4537,7 @@ public: return TargetCodeGenInfo::getSizeOfUnwindException(); } - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override { const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); if (!FD) @@ -4558,7 +4584,7 @@ public: WindowsARMTargetCodeGenInfo(CodeGenTypes &CGT, ARMABIInfo::ABIKind K) : ARMTargetCodeGenInfo(CGT, K) {} - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override; }; @@ -4574,16 +4600,17 @@ void WindowsARMTargetCodeGenInfo::addStackProbeSizeTargetAttribute( llvm::utostr(CGM.getCodeGenOpts().StackProbeSize)); } -void WindowsARMTargetCodeGenInfo::SetTargetAttributes( +void WindowsARMTargetCodeGenInfo::setTargetAttributes( const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { - ARMTargetCodeGenInfo::SetTargetAttributes(D, GV, CGM); + ARMTargetCodeGenInfo::setTargetAttributes(D, GV, CGM); addStackProbeSizeTargetAttribute(D, GV, CGM); } } void ARMABIInfo::computeInfo(CGFunctionInfo &FI) const { if (!getCXXABI().classifyReturnType(FI)) - FI.getReturnInfo() = classifyReturnType(FI.getReturnType(), FI.isVariadic()); + FI.getReturnInfo() = + classifyReturnType(FI.getReturnType(), FI.isVariadic()); for (auto &I : FI.arguments()) I.info = classifyArgumentType(I.type, FI.isVariadic()); @@ -5031,7 +5058,7 @@ public: NVPTXTargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new NVPTXABIInfo(CGT)) {} - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const override; private: // Adds a NamedMDNode with F, Name, and Operand as operands, and adds the @@ -5087,7 +5114,7 @@ llvm::Value *NVPTXABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, } void NVPTXTargetCodeGenInfo:: -SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, +setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const{ const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); if (!FD) return; @@ -5499,13 +5526,13 @@ class MSP430TargetCodeGenInfo : public TargetCodeGenInfo { public: MSP430TargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new DefaultABIInfo(CGT)) {} - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const override; }; } -void MSP430TargetCodeGenInfo::SetTargetAttributes(const Decl *D, +void MSP430TargetCodeGenInfo::setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { @@ -5565,7 +5592,7 @@ public: return 29; } - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override { const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); if (!FD) return; @@ -5587,8 +5614,8 @@ public: }; } -void MipsABIInfo::CoerceToIntArgs(uint64_t TySize, - SmallVectorImpl<llvm::Type *> &ArgList) const { +void MipsABIInfo::CoerceToIntArgs( + uint64_t TySize, SmallVectorImpl<llvm::Type *> &ArgList) const { llvm::IntegerType *IntTy = llvm::IntegerType::get(getVMContext(), MinABIStackAlignInBytes * 8); @@ -5627,7 +5654,7 @@ llvm::Type* MipsABIInfo::HandleAggregates(QualType Ty, uint64_t TySize) const { const RecordDecl *RD = RT->getDecl(); const ASTRecordLayout &Layout = getContext().getASTRecordLayout(RD); assert(!(TySize % 8) && "Size of structure must be multiple of 8."); - + uint64_t LastOffset = 0; unsigned idx = 0; llvm::IntegerType *I64 = llvm::IntegerType::get(getVMContext(), 64); @@ -5729,7 +5756,7 @@ MipsABIInfo::returnAggregateInRegs(QualType RetTy, uint64_t Size) const { // 1. The size of the struct/class is no larger than 128-bit. // 2. The struct/class has one or two fields all of which are floating // point types. - // 3. The offset of the first field is zero (this follows what gcc does). + // 3. The offset of the first field is zero (this follows what gcc does). // // Any other composite results are returned in integer registers. // @@ -5799,7 +5826,7 @@ void MipsABIInfo::computeInfo(CGFunctionInfo &FI) const { if (!getCXXABI().classifyReturnType(FI)) RetInfo = classifyReturnType(FI.getReturnType()); - // Check if a pointer to an aggregate is passed as a hidden argument. + // Check if a pointer to an aggregate is passed as a hidden argument. uint64_t Offset = RetInfo.isIndirect() ? MinABIStackAlignInBytes : 0; for (auto &I : FI.arguments()) @@ -5821,7 +5848,7 @@ llvm::Value* MipsABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, Ty = CGF.getContext().getIntTypeForBitwidth(SlotSizeInBits, Ty->isSignedIntegerType()); } - + CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); @@ -5840,7 +5867,7 @@ llvm::Value* MipsABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, AddrTyped = CGF.Builder.CreateIntToPtr(And, PTy); } else - AddrTyped = Builder.CreateBitCast(Addr, PTy); + AddrTyped = Builder.CreateBitCast(Addr, PTy); llvm::Value *AlignedAddr = Builder.CreateBitCast(AddrTyped, BP); TypeAlign = std::max((unsigned)TypeAlign, MinABIStackAlignInBytes); @@ -5850,17 +5877,17 @@ llvm::Value* MipsABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, Builder.CreateGEP(AlignedAddr, llvm::ConstantInt::get(IntTy, Offset), "ap.next"); Builder.CreateStore(NextAddr, VAListAddrAsBPP); - + return AddrTyped; } bool MipsABIInfo::shouldSignExtUnsignedType(QualType Ty) const { int TySize = getContext().getTypeSize(Ty); - + // MIPS64 ABI requires unsigned 32 bit integers to be sign extended. if (Ty->isUnsignedIntegerOrEnumerationType() && TySize == 32) return true; - + return false; } @@ -5894,7 +5921,7 @@ MIPSTargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, //===----------------------------------------------------------------------===// // TCE ABI Implementation (see http://tce.cs.tut.fi). Uses mostly the defaults. -// Currently subclassed only to implement custom OpenCL C function attribute +// Currently subclassed only to implement custom OpenCL C function attribute // handling. //===----------------------------------------------------------------------===// @@ -5905,18 +5932,17 @@ public: TCETargetCodeGenInfo(CodeGenTypes &CGT) : DefaultTargetCodeGenInfo(CGT) {} - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const override; }; -void TCETargetCodeGenInfo::SetTargetAttributes(const Decl *D, - llvm::GlobalValue *GV, - CodeGen::CodeGenModule &M) const { +void TCETargetCodeGenInfo::setTargetAttributes( + const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); if (!FD) return; llvm::Function *F = cast<llvm::Function>(GV); - + if (M.getLangOpts().OpenCL) { if (FD->hasAttr<OpenCLKernelAttr>()) { // OpenCL C Kernel functions are not subject to inlining @@ -5925,8 +5951,9 @@ void TCETargetCodeGenInfo::SetTargetAttributes(const Decl *D, if (Attr) { // Convert the reqd_work_group_size() attributes to metadata. llvm::LLVMContext &Context = F->getContext(); - llvm::NamedMDNode *OpenCLMetadata = - M.getModule().getOrInsertNamedMetadata("opencl.kernel_wg_size_info"); + llvm::NamedMDNode *OpenCLMetadata = + M.getModule().getOrInsertNamedMetadata( + "opencl.kernel_wg_size_info"); SmallVector<llvm::Metadata *, 5> Operands; Operands.push_back(llvm::ConstantAsMetadata::get(F)); @@ -5941,9 +5968,9 @@ void TCETargetCodeGenInfo::SetTargetAttributes(const Decl *D, llvm::ConstantAsMetadata::get(llvm::Constant::getIntegerValue( M.Int32Ty, llvm::APInt(32, Attr->getZDim())))); - // Add a boolean constant operand for "required" (true) or "hint" (false) - // for implementing the work_group_size_hint attr later. Currently - // always true as the hint is not yet implemented. + // Add a boolean constant operand for "required" (true) or "hint" + // (false) for implementing the work_group_size_hint attr later. + // Currently always true as the hint is not yet implemented. Operands.push_back( llvm::ConstantAsMetadata::get(llvm::ConstantInt::getTrue(Context))); OpenCLMetadata->addOperand(llvm::MDNode::get(Context, Operands)); @@ -6097,13 +6124,13 @@ class AMDGPUTargetCodeGenInfo : public TargetCodeGenInfo { public: AMDGPUTargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new DefaultABIInfo(CGT)) {} - void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const override; }; } -void AMDGPUTargetCodeGenInfo::SetTargetAttributes( +void AMDGPUTargetCodeGenInfo::setTargetAttributes( const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { @@ -6419,7 +6446,7 @@ SparcV9TargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, // FSR = 70 // CSR = 71 AssignToArrayRange(Builder, Address, Eight8, 64, 71); - + // 72-87: d0-15, the 8-byte floating-point registers AssignToArrayRange(Builder, Address, Eight8, 72, 87); @@ -6692,7 +6719,7 @@ StringRef TypeStringCache::lookupStr(const IdentifierInfo *ID) { /// /// The TypeString carries type, qualifier, name, size & value details. /// Please see 'Tools Development Guide' section 2.16.2 for format details: -/// <https://www.xmos.com/download/public/Tools-Development-Guide%28X9114A%29.pdf> +/// https://www.xmos.com/download/public/Tools-Development-Guide%28X9114A%29.pdf /// The output is tested by test/CodeGen/xcore-stringtype.c. /// static bool getTypeString(SmallStringEnc &Enc, const Decl *D, @@ -6718,7 +6745,8 @@ static bool appendType(SmallStringEnc &Enc, QualType QType, TypeStringCache &TSC); /// Helper function for appendRecordType(). -/// Builds a SmallVector containing the encoded field types in declaration order. +/// Builds a SmallVector containing the encoded field types in declaration +/// order. static bool extractFieldType(SmallVectorImpl<FieldEncoding> &FE, const RecordDecl *RD, const CodeGen::CodeGenModule &CGM, @@ -6741,7 +6769,7 @@ static bool extractFieldType(SmallVectorImpl<FieldEncoding> &FE, if (Field->isBitField()) Enc += ')'; Enc += '}'; - FE.push_back(FieldEncoding(!Field->getName().empty(), Enc)); + FE.emplace_back(!Field->getName().empty(), Enc); } return true; } @@ -7155,17 +7183,13 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() { bool IsWin32FloatStructABI = Triple.isOSWindows() && !Triple.isOSCygMing(); if (Triple.getOS() == llvm::Triple::Win32) { - return *(TheTargetCodeGenInfo = - new WinX86_32TargetCodeGenInfo(Types, - IsDarwinVectorABI, IsSmallStructInRegABI, - IsWin32FloatStructABI, - CodeGenOpts.NumRegisterParameters)); + return *(TheTargetCodeGenInfo = new WinX86_32TargetCodeGenInfo( + Types, IsDarwinVectorABI, IsSmallStructInRegABI, + IsWin32FloatStructABI, CodeGenOpts.NumRegisterParameters)); } else { - return *(TheTargetCodeGenInfo = - new X86_32TargetCodeGenInfo(Types, - IsDarwinVectorABI, IsSmallStructInRegABI, - IsWin32FloatStructABI, - CodeGenOpts.NumRegisterParameters)); + return *(TheTargetCodeGenInfo = new X86_32TargetCodeGenInfo( + Types, IsDarwinVectorABI, IsSmallStructInRegABI, + IsWin32FloatStructABI, CodeGenOpts.NumRegisterParameters)); } } diff --git a/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h b/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h index cc469d6..bf63265 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h +++ b/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h @@ -53,12 +53,12 @@ public: /// getABIInfo() - Returns ABI info helper for the target. const ABIInfo &getABIInfo() const { return *Info; } - /// SetTargetAttributes - Provides a convenient hook to handle extra + /// setTargetAttributes - Provides a convenient hook to handle extra /// target-specific attributes for the given global. - virtual void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + virtual void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {} - /// EmitTargetMD - Provides a convenient hook to handle extra + /// emitTargetMD - Provides a convenient hook to handle extra /// target-specific metadata for the given global. virtual void emitTargetMD(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {} diff --git a/contrib/llvm/tools/clang/lib/Driver/Driver.cpp b/contrib/llvm/tools/clang/lib/Driver/Driver.cpp index 65d0049..8cca1de 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Driver.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/Driver.cpp @@ -140,10 +140,8 @@ InputArgList *Driver::ParseArgStrings(ArrayRef<const char *> ArgStrings) { } } - for (arg_iterator it = Args->filtered_begin(options::OPT_UNKNOWN), - ie = Args->filtered_end(); it != ie; ++it) { - Diags.Report(diag::err_drv_unknown_argument) << (*it) ->getAsString(*Args); - } + for (const Arg *A : Args->filtered(options::OPT_UNKNOWN)) + Diags.Report(diag::err_drv_unknown_argument) << A->getAsString(*Args); return Args; } @@ -347,9 +345,7 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) { DefaultTargetTriple = A->getValue(); if (const Arg *A = Args->getLastArg(options::OPT_ccc_install_dir)) Dir = InstalledDir = A->getValue(); - for (arg_iterator it = Args->filtered_begin(options::OPT_B), - ie = Args->filtered_end(); it != ie; ++it) { - const Arg *A = *it; + for (const Arg *A : Args->filtered(options::OPT_B)) { A->claim(); PrefixDirs.push_back(A->getValue(0)); } @@ -1467,9 +1463,8 @@ void Driver::BuildJobs(Compilation &C) const { if (Opt.getKind() == Option::FlagClass) { bool DuplicateClaimed = false; - for (arg_iterator it = C.getArgs().filtered_begin(&Opt), - ie = C.getArgs().filtered_end(); it != ie; ++it) { - if ((*it)->isClaimed()) { + for (const Arg *AA : C.getArgs().filtered(&Opt)) { + if (AA->isClaimed()) { DuplicateClaimed = true; break; } @@ -1697,8 +1692,7 @@ const char *Driver::GetNamedOutputPath(Compilation &C, assert(AtTopLevel && isa<PreprocessJobAction>(JA)); StringRef BaseName = llvm::sys::path::filename(BaseInput); StringRef NameArg; - if (Arg *A = C.getArgs().getLastArg(options::OPT__SLASH_Fi, - options::OPT__SLASH_o)) + if (Arg *A = C.getArgs().getLastArg(options::OPT__SLASH_Fi)) NameArg = A->getValue(); return C.addResultFile(MakeCLOutputFilename(C.getArgs(), NameArg, BaseName, types::TY_PP_C), &JA); @@ -1744,7 +1738,7 @@ const char *Driver::GetNamedOutputPath(Compilation &C, // Determine what the derived output name should be. const char *NamedOutput; - if (JA.getType() == types::TY_Object && + if ((JA.getType() == types::TY_Object || JA.getType() == types::TY_LTO_BC) && C.getArgs().hasArg(options::OPT__SLASH_Fo, options::OPT__SLASH_o)) { // The /Fo or /o flag decides the object filename. StringRef Val = C.getArgs().getLastArg(options::OPT__SLASH_Fo, @@ -1878,8 +1872,8 @@ void Driver::generatePrefixedToolNames(const char *Tool, const ToolChain &TC, SmallVectorImpl<std::string> &Names) const { // FIXME: Needs a better variable than DefaultTargetTriple - Names.push_back(DefaultTargetTriple + "-" + Tool); - Names.push_back(Tool); + Names.emplace_back(DefaultTargetTriple + "-" + Tool); + Names.emplace_back(Tool); } static bool ScanDirForExecutable(SmallString<128> &Dir, @@ -2185,6 +2179,6 @@ std::pair<unsigned, unsigned> Driver::getIncludeExcludeOptionFlagMasks() const { return std::make_pair(IncludedFlagsBitmask, ExcludedFlagsBitmask); } -bool clang::driver::isOptimizationLevelFast(const llvm::opt::ArgList &Args) { +bool clang::driver::isOptimizationLevelFast(const ArgList &Args) { return Args.hasFlag(options::OPT_Ofast, options::OPT_O_Group, false); } diff --git a/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp b/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp index 7739cb0..d824fe4 100644 --- a/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "ToolChains.h" +#include "Tools.h" #include "clang/Basic/CharInfo.h" #include "clang/Basic/Version.h" #include "clang/Driver/Compilation.h" @@ -495,3 +496,29 @@ void MSVCToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const { // FIXME: There should probably be logic here to find libc++ on Windows. } + +std::string +MSVCToolChain::ComputeEffectiveClangTriple(const ArgList &Args, + types::ID InputType) const { + std::string TripleStr = + ToolChain::ComputeEffectiveClangTriple(Args, InputType); + llvm::Triple Triple(TripleStr); + VersionTuple MSVT = + tools::visualstudio::getMSVCVersion(/*D=*/nullptr, Triple, Args, + /*IsWindowsMSVC=*/true); + if (MSVT.empty()) + return TripleStr; + + MSVT = VersionTuple(MSVT.getMajor(), MSVT.getMinor().getValueOr(0), + MSVT.getSubminor().getValueOr(0)); + + if (Triple.getEnvironment() == llvm::Triple::MSVC) { + StringRef ObjFmt = Triple.getEnvironmentName().split('-').second; + if (ObjFmt.empty()) + Triple.setEnvironmentName((Twine("msvc") + MSVT.getAsString()).str()); + else + Triple.setEnvironmentName( + (Twine("msvc") + MSVT.getAsString() + Twine('-') + ObjFmt).str()); + } + return Triple.getTriple(); +} diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp b/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp index f7b7402..82eb854 100644 --- a/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp @@ -303,7 +303,7 @@ std::string ToolChain::ComputeLLVMTriple(const ArgList &Args, // Thumb2 is the default for V7 on Darwin. // // FIXME: Thumb should just be another -target-feaure, not in the triple. - StringRef CPU = Triple.isOSBinFormatMachO() + std::string CPU = Triple.isOSBinFormatMachO() ? tools::arm::getARMCPUForMArch(Args, Triple) : tools::arm::getARMTargetCPU(Args, Triple); StringRef Suffix = diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp b/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp index 6d52ab9..115a16f 100644 --- a/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp @@ -29,6 +29,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" +#include "llvm/Support/TargetParser.h" #include "llvm/Support/raw_ostream.h" #include <cstdlib> // ::getenv #include <system_error> @@ -108,9 +109,12 @@ bool Darwin::hasBlocksRuntime() const { } } -// FIXME: Use ARMTargetParser. -static const char *GetArmArchForMArch(StringRef Value) { - return llvm::StringSwitch<const char*>(Value) +// This is just a MachO name translation routine and there's no +// way to join this into ARMTargetParser without breaking all +// other assumptions. Maybe MachO should consider standardising +// their nomenclature. +static const char *ArmMachOArchName(StringRef Arch) { + return llvm::StringSwitch<const char*>(Arch) .Case("armv6k", "armv6") .Case("armv6m", "armv6m") .Case("armv5tej", "armv5") @@ -126,22 +130,23 @@ static const char *GetArmArchForMArch(StringRef Value) { .Default(nullptr); } -// FIXME: Use ARMTargetParser. -static const char *GetArmArchForMCpu(StringRef Value) { - return llvm::StringSwitch<const char *>(Value) - .Cases("arm9e", "arm946e-s", "arm966e-s", "arm968e-s", "arm926ej-s","armv5") - .Cases("arm10e", "arm10tdmi", "armv5") - .Cases("arm1020t", "arm1020e", "arm1022e", "arm1026ej-s", "armv5") - .Case("xscale", "xscale") - .Cases("arm1136j-s", "arm1136jf-s", "arm1176jz-s", "arm1176jzf-s", "armv6") - .Cases("sc000", "cortex-m0", "cortex-m0plus", "cortex-m1", "armv6m") - .Cases("cortex-a5", "cortex-a7", "cortex-a8", "armv7") - .Cases("cortex-a9", "cortex-a12", "cortex-a15", "cortex-a17", "krait", "armv7") - .Cases("cortex-r4", "cortex-r4f", "cortex-r5", "cortex-r7", "armv7r") - .Cases("sc300", "cortex-m3", "armv7m") - .Cases("cortex-m4", "cortex-m7", "armv7em") - .Case("swift", "armv7s") - .Default(nullptr); +static const char *ArmMachOArchNameCPU(StringRef CPU) { + unsigned ArchKind = llvm::ARMTargetParser::parseCPUArch(CPU); + if (ArchKind == llvm::ARM::AK_INVALID) + return nullptr; + StringRef Arch = llvm::ARMTargetParser::getArchName(ArchKind); + + // FIXME: Make sure this MachO triple mangling is really necessary. + // ARMv5* normalises to ARMv5. + if (Arch.startswith("armv5")) + Arch = Arch.substr(0, 5); + // ARMv6*, except ARMv6M, normalises to ARMv6. + else if (Arch.startswith("armv6") && !Arch.endswith("6m")) + Arch = Arch.substr(0, 5); + // ARMv7A normalises to ARMv7. + else if (Arch.endswith("v7a")) + Arch = Arch.substr(0, 5); + return Arch.data(); } static bool isSoftFloatABI(const ArgList &Args) { @@ -166,11 +171,11 @@ StringRef MachO::getMachOArchName(const ArgList &Args) const { case llvm::Triple::thumb: case llvm::Triple::arm: { if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) - if (const char *Arch = GetArmArchForMArch(A->getValue())) + if (const char *Arch = ArmMachOArchName(A->getValue())) return Arch; if (const Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) - if (const char *Arch = GetArmArchForMCpu(A->getValue())) + if (const char *Arch = ArmMachOArchNameCPU(A->getValue())) return Arch; return "arm"; @@ -874,8 +879,8 @@ DerivedArgList *MachO::TranslateArgs(const DerivedArgList &Args, return DAL; } -void MachO::AddLinkRuntimeLibArgs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const { +void MachO::AddLinkRuntimeLibArgs(const ArgList &Args, + ArgStringList &CmdArgs) const { // Embedded targets are simple at the moment, not supporting sanitizers and // with different libraries for each member of the product { static, PIC } x // { hard-float, soft-float } @@ -984,8 +989,8 @@ bool MachO::SupportsProfiling() const { return getArch() == llvm::Triple::x86 || getArch() == llvm::Triple::x86_64; } -void Darwin::addMinVersionArgs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const { +void Darwin::addMinVersionArgs(const ArgList &Args, + ArgStringList &CmdArgs) const { VersionTuple TargetVersion = getTargetVersion(); if (isTargetIOSSimulator()) @@ -1000,8 +1005,8 @@ void Darwin::addMinVersionArgs(const llvm::opt::ArgList &Args, CmdArgs.push_back(Args.MakeArgString(TargetVersion.getAsString())); } -void Darwin::addStartObjectFileArgs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const { +void Darwin::addStartObjectFileArgs(const ArgList &Args, + ArgStringList &CmdArgs) const { // Derived from startfile spec. if (Args.hasArg(options::OPT_dynamiclib)) { // Derived from darwin_dylib1 spec. @@ -1570,7 +1575,7 @@ static Multilib makeMultilib(StringRef commonSuffix) { } static bool findMIPSMultilibs(const llvm::Triple &TargetTriple, StringRef Path, - const llvm::opt::ArgList &Args, + const ArgList &Args, DetectedMultilibs &Result) { // Some MIPS toolchains put libraries and object files compiled // using different options in to the sub-directoris which names @@ -2072,21 +2077,26 @@ bool Generic_GCC::isPICDefaultForced() const { } bool Generic_GCC::IsIntegratedAssemblerDefault() const { - return getTriple().getArch() == llvm::Triple::x86 || - getTriple().getArch() == llvm::Triple::x86_64 || - getTriple().getArch() == llvm::Triple::aarch64 || - getTriple().getArch() == llvm::Triple::aarch64_be || - getTriple().getArch() == llvm::Triple::arm || - getTriple().getArch() == llvm::Triple::armeb || - getTriple().getArch() == llvm::Triple::thumb || - getTriple().getArch() == llvm::Triple::thumbeb || - getTriple().getArch() == llvm::Triple::ppc || - getTriple().getArch() == llvm::Triple::ppc64 || - getTriple().getArch() == llvm::Triple::ppc64le || - getTriple().getArch() == llvm::Triple::sparc || - getTriple().getArch() == llvm::Triple::sparcel || - getTriple().getArch() == llvm::Triple::sparcv9 || - getTriple().getArch() == llvm::Triple::systemz; + switch (getTriple().getArch()) { + case llvm::Triple::x86: + case llvm::Triple::x86_64: + case llvm::Triple::aarch64: + case llvm::Triple::aarch64_be: + case llvm::Triple::arm: + case llvm::Triple::armeb: + case llvm::Triple::thumb: + case llvm::Triple::thumbeb: + case llvm::Triple::ppc: + case llvm::Triple::ppc64: + case llvm::Triple::ppc64le: + case llvm::Triple::sparc: + case llvm::Triple::sparcel: + case llvm::Triple::sparcv9: + case llvm::Triple::systemz: + return true; + default: + return false; + } } void Generic_ELF::addClangTargetOptions(const ArgList &DriverArgs, @@ -2164,14 +2174,9 @@ static void GetHexagonLibraryPaths( //---------------------------------------------------------------------------- // -L Args //---------------------------------------------------------------------------- - for (arg_iterator - it = Args.filtered_begin(options::OPT_L), - ie = Args.filtered_end(); - it != ie; - ++it) { - for (unsigned i = 0, e = (*it)->getNumValues(); i != e; ++i) - LibPaths->push_back((*it)->getValue(i)); - } + for (const Arg *A : Args.filtered(options::OPT_L)) + for (unsigned i = 0, e = A->getNumValues(); i != e; ++i) + LibPaths->push_back(A->getValue(i)); //---------------------------------------------------------------------------- // Other standard paths @@ -3105,6 +3110,14 @@ static std::string getMultiarchTriple(const llvm::Triple &TargetTriple, if (llvm::sys::fs::exists(SysRoot + "/lib/powerpc64le-linux-gnu")) return "powerpc64le-linux-gnu"; return TargetTriple.str(); + case llvm::Triple::sparc: + if (llvm::sys::fs::exists(SysRoot + "/lib/sparc-linux-gnu")) + return "sparc-linux-gnu"; + return TargetTriple.str(); + case llvm::Triple::sparcv9: + if (llvm::sys::fs::exists(SysRoot + "/lib/sparc64-linux-gnu")) + return "sparc64-linux-gnu"; + return TargetTriple.str(); } } @@ -3457,6 +3470,12 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, const StringRef PPC64LEMultiarchIncludeDirs[] = { "/usr/include/powerpc64le-linux-gnu" }; + const StringRef SparcMultiarchIncludeDirs[] = { + "/usr/include/sparc-linux-gnu" + }; + const StringRef Sparc64MultiarchIncludeDirs[] = { + "/usr/include/sparc64-linux-gnu" + }; ArrayRef<StringRef> MultiarchIncludeDirs; if (getTriple().getArch() == llvm::Triple::x86_64) { MultiarchIncludeDirs = X86_64MultiarchIncludeDirs; @@ -3484,6 +3503,10 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, MultiarchIncludeDirs = PPC64MultiarchIncludeDirs; } else if (getTriple().getArch() == llvm::Triple::ppc64le) { MultiarchIncludeDirs = PPC64LEMultiarchIncludeDirs; + } else if (getTriple().getArch() == llvm::Triple::sparc) { + MultiarchIncludeDirs = SparcMultiarchIncludeDirs; + } else if (getTriple().getArch() == llvm::Triple::sparcv9) { + MultiarchIncludeDirs = Sparc64MultiarchIncludeDirs; } for (StringRef Dir : MultiarchIncludeDirs) { if (llvm::sys::fs::exists(SysRoot + Dir)) { @@ -3695,8 +3718,8 @@ void XCore::AddClangSystemIncludeArgs(const ArgList &DriverArgs, } } -void XCore::addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const { +void XCore::addClangTargetOptions(const ArgList &DriverArgs, + ArgStringList &CC1Args) const { CC1Args.push_back("-nostdsysteminc"); } diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChains.h b/contrib/llvm/tools/clang/lib/Driver/ToolChains.h index 8906e21..0b7073f 100644 --- a/contrib/llvm/tools/clang/lib/Driver/ToolChains.h +++ b/contrib/llvm/tools/clang/lib/Driver/ToolChains.h @@ -807,6 +807,9 @@ public: bool getVisualStudioBinariesFolder(const char *clangProgramPath, std::string &path) const; + std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList &Args, + types::ID InputType) const override; + protected: void AddSystemIncludeWithSubfolder(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp index 72a242c..f4eca44 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp @@ -342,10 +342,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, Args.AddLastArg(CmdArgs, options::OPT_MV); // Convert all -MQ <target> args to -MT <quoted target> - for (arg_iterator it = Args.filtered_begin(options::OPT_MT, - options::OPT_MQ), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; + for (const Arg *A : Args.filtered(options::OPT_MT, options::OPT_MQ)) { A->claim(); if (A->getOption().matches(options::OPT_MQ)) { @@ -366,10 +363,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, // replacement into a build system already set up to be generating // .gch files. bool RenderedImplicitInclude = false; - for (arg_iterator it = Args.filtered_begin(options::OPT_clang_i_Group), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = it; - + for (const Arg *A : Args.filtered(options::OPT_clang_i_Group)) { if (A->getOption().matches(options::OPT_include)) { bool IsFirstImplicitInclude = !RenderedImplicitInclude; RenderedImplicitInclude = true; @@ -537,85 +531,13 @@ static void getARMHWDivFeatures(const Driver &D, const Arg *A, } // Handle -mfpu=. -// -// FIXME: Centralize feature selection, defaulting shouldn't be also in the -// frontend target. static void getARMFPUFeatures(const Driver &D, const Arg *A, const ArgList &Args, std::vector<const char *> &Features) { StringRef FPU = A->getValue(); - - // FIXME: Why does "none" disable more than "invalid"? - if (FPU == "none") { - Features.push_back("-vfp2"); - Features.push_back("-vfp3"); - Features.push_back("-vfp4"); - Features.push_back("-fp-armv8"); - Features.push_back("-crypto"); - Features.push_back("-neon"); - return; - } - - // FIXME: Make sure we differentiate sp-only. - if (FPU.find("-sp-") != StringRef::npos) { - Features.push_back("+fp-only-sp"); - } - - // All other FPU types, valid or invalid. - switch(llvm::ARMTargetParser::parseFPU(FPU)) { - case llvm::ARM::FK_INVALID: - case llvm::ARM::FK_SOFTVFP: - Features.push_back("-vfp2"); - Features.push_back("-vfp3"); - Features.push_back("-neon"); - break; - case llvm::ARM::FK_VFP: - case llvm::ARM::FK_VFPV2: - Features.push_back("+vfp2"); - Features.push_back("-neon"); - break; - case llvm::ARM::FK_VFPV3_D16: - Features.push_back("+d16"); - // fall-through - case llvm::ARM::FK_VFPV3: - Features.push_back("+vfp3"); - Features.push_back("-neon"); - break; - case llvm::ARM::FK_VFPV4_D16: - Features.push_back("+d16"); - // fall-through - case llvm::ARM::FK_VFPV4: - Features.push_back("+vfp4"); - Features.push_back("-neon"); - break; - case llvm::ARM::FK_FPV5_D16: - Features.push_back("+d16"); - // fall-through - case llvm::ARM::FK_FP_ARMV8: - Features.push_back("+fp-armv8"); - Features.push_back("-neon"); - Features.push_back("-crypto"); - break; - case llvm::ARM::FK_NEON_FP_ARMV8: - Features.push_back("+fp-armv8"); - Features.push_back("+neon"); - Features.push_back("-crypto"); - break; - case llvm::ARM::FK_CRYPTO_NEON_FP_ARMV8: - Features.push_back("+fp-armv8"); - Features.push_back("+neon"); - Features.push_back("+crypto"); - break; - case llvm::ARM::FK_NEON: - Features.push_back("+neon"); - break; - case llvm::ARM::FK_NEON_VFPV4: - Features.push_back("+neon"); - Features.push_back("+vfp4"); - break; - default: + unsigned FPUID = llvm::ARMTargetParser::parseFPU(FPU); + if (!llvm::ARMTargetParser::getFPUFeatures(FPUID, Features)) D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args); - } } static int getARMSubArchVersionNumber(const llvm::Triple &Triple) { @@ -753,12 +675,12 @@ static void getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, if (const Arg *A = Args.getLastArg(options::OPT_mhwdiv_EQ)) getARMHWDivFeatures(D, A, Args, Features); - // Check if -march is valid by checking if it can be canonicalised. getARMArch - // is used here instead of just checking the -march value in order to handle - // -march=native correctly. + // Check if -march is valid by checking if it can be canonicalised and parsed. + // getARMArch is used here instead of just checking the -march value in order + // to handle -march=native correctly. if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) { StringRef Arch = arm::getARMArch(Args, Triple); - if (llvm::ARMTargetParser::getCanonicalArchName(Arch).empty()) + if (llvm::ARMTargetParser::parseArch(Arch) == llvm::ARM::AK_INVALID) D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args); } @@ -766,7 +688,7 @@ static void getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, // the only function we have to check if a cpu is valid is // getLLVMArchSuffixForARM which also needs an architecture. if (const Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { - StringRef CPU = arm::getARMTargetCPU(Args, Triple); + std::string CPU = arm::getARMTargetCPU(Args, Triple); StringRef Arch = arm::getARMArch(Args, Triple); if (strcmp(arm::getLLVMArchSuffixForARM(CPU, Arch), "") == 0) D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args); @@ -1326,11 +1248,9 @@ static std::string getPPCTargetCPU(const ArgList &Args) { static void getPPCTargetFeatures(const ArgList &Args, std::vector<const char *> &Features) { - for (arg_iterator it = Args.filtered_begin(options::OPT_m_ppc_Features_Group), - ie = Args.filtered_end(); - it != ie; ++it) { - StringRef Name = (*it)->getOption().getName(); - (*it)->claim(); + for (const Arg *A : Args.filtered(options::OPT_m_ppc_Features_Group)) { + StringRef Name = A->getOption().getName(); + A->claim(); // Skip over "-m". assert(Name.startswith("m") && "Invalid feature name."); @@ -1655,9 +1575,10 @@ static void getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, Features.push_back("-fsgsbase"); } + const llvm::Triple::ArchType ArchType = Triple.getArch(); // Add features to be compatible with gcc for Android. if (Triple.getEnvironment() == llvm::Triple::Android) { - if (Triple.getArch() == llvm::Triple::x86_64) { + if (ArchType == llvm::Triple::x86_64) { Features.push_back("+sse4.2"); Features.push_back("+popcnt"); } else @@ -1669,15 +1590,14 @@ static void getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, StringRef Arch = A->getValue(); bool ArchUsed = false; // First, look for flags that are shared in x86 and x86-64. - if (Triple.getArch() == llvm::Triple::x86_64 || - Triple.getArch() == llvm::Triple::x86) { + if (ArchType == llvm::Triple::x86_64 || ArchType == llvm::Triple::x86) { if (Arch == "AVX" || Arch == "AVX2") { ArchUsed = true; Features.push_back(Args.MakeArgString("+" + Arch.lower())); } } // Then, look for x86-specific flags. - if (Triple.getArch() == llvm::Triple::x86) { + if (ArchType == llvm::Triple::x86) { if (Arch == "IA32") { ArchUsed = true; } else if (Arch == "SSE" || Arch == "SSE2") { @@ -1691,11 +1611,9 @@ static void getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, // Now add any that the user explicitly requested on the command line, // which may override the defaults. - for (arg_iterator it = Args.filtered_begin(options::OPT_m_x86_Features_Group), - ie = Args.filtered_end(); - it != ie; ++it) { - StringRef Name = (*it)->getOption().getName(); - (*it)->claim(); + for (const Arg *A : Args.filtered(options::OPT_m_x86_Features_Group)) { + StringRef Name = A->getOption().getName(); + A->claim(); // Skip over "-m". assert(Name.startswith("m") && "Invalid feature name."); @@ -2158,10 +2076,8 @@ static void CollectArgsForIntegratedAssembler(Compilation &C, // When using an integrated assembler, translate -Wa, and -Xassembler // options. bool CompressDebugSections = false; - for (arg_iterator it = Args.filtered_begin(options::OPT_Wa_COMMA, - options::OPT_Xassembler), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; + for (const Arg *A : + Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) { A->claim(); for (unsigned i = 0, e = A->getNumValues(); i != e; ++i) { @@ -2278,6 +2194,55 @@ static void addProfileRT(const ToolChain &TC, const ArgList &Args, CmdArgs.push_back(Args.MakeArgString(getCompilerRT(TC, "profile"))); } +namespace { +enum OpenMPRuntimeKind { + /// An unknown OpenMP runtime. We can't generate effective OpenMP code + /// without knowing what runtime to target. + OMPRT_Unknown, + + /// The LLVM OpenMP runtime. When completed and integrated, this will become + /// the default for Clang. + OMPRT_OMP, + + /// The GNU OpenMP runtime. Clang doesn't support generating OpenMP code for + /// this runtime but can swallow the pragmas, and find and link against the + /// runtime library itself. + OMPRT_GOMP, + + /// The legacy name for the LLVM OpenMP runtime from when it was the Intel + /// OpenMP runtime. We support this mode for users with existing dependencies + /// on this runtime library name. + OMPRT_IOMP5 +}; +} + +/// Compute the desired OpenMP runtime from the flag provided. +static OpenMPRuntimeKind getOpenMPRuntime(const ToolChain &TC, + const ArgList &Args) { + StringRef RuntimeName(CLANG_DEFAULT_OPENMP_RUNTIME); + + const Arg *A = Args.getLastArg(options::OPT_fopenmp_EQ); + if (A) + RuntimeName = A->getValue(); + + auto RT = llvm::StringSwitch<OpenMPRuntimeKind>(RuntimeName) + .Case("libomp", OMPRT_OMP) + .Case("libgomp", OMPRT_GOMP) + .Case("libiomp5", OMPRT_IOMP5) + .Default(OMPRT_Unknown); + + if (RT == OMPRT_Unknown) { + if (A) + TC.getDriver().Diag(diag::err_drv_unsupported_option_argument) + << A->getOption().getName() << A->getValue(); + else + // FIXME: We could use a nicer diagnostic here. + TC.getDriver().Diag(diag::err_drv_unsupported_opt) << "-fopenmp"; + } + + return RT; +} + static void addSanitizerRuntime(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, StringRef Sanitizer, bool IsShared) { @@ -2607,6 +2572,53 @@ static void appendUserToPath(SmallVectorImpl<char> &Result) { Result.append(UID.begin(), UID.end()); } +VersionTuple visualstudio::getMSVCVersion(const Driver *D, + const llvm::Triple &Triple, + const llvm::opt::ArgList &Args, + bool IsWindowsMSVC) { + if (Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions, + IsWindowsMSVC) || + Args.hasArg(options::OPT_fmsc_version) || + Args.hasArg(options::OPT_fms_compatibility_version)) { + const Arg *MSCVersion = Args.getLastArg(options::OPT_fmsc_version); + const Arg *MSCompatibilityVersion = + Args.getLastArg(options::OPT_fms_compatibility_version); + + if (MSCVersion && MSCompatibilityVersion) { + if (D) + D->Diag(diag::err_drv_argument_not_allowed_with) + << MSCVersion->getAsString(Args) + << MSCompatibilityVersion->getAsString(Args); + return VersionTuple(); + } + + if (MSCompatibilityVersion) { + VersionTuple MSVT; + if (MSVT.tryParse(MSCompatibilityVersion->getValue()) && D) + D->Diag(diag::err_drv_invalid_value) + << MSCompatibilityVersion->getAsString(Args) + << MSCompatibilityVersion->getValue(); + return MSVT; + } + + if (MSCVersion) { + unsigned Version = 0; + if (StringRef(MSCVersion->getValue()).getAsInteger(10, Version) && D) + D->Diag(diag::err_drv_invalid_value) << MSCVersion->getAsString(Args) + << MSCVersion->getValue(); + return getMSCompatibilityVersion(Version); + } + + unsigned Major, Minor, Micro; + Triple.getEnvironmentVersion(Major, Minor, Micro); + if (Major || Minor || Micro) + return VersionTuple(Major, Minor, Micro); + + return VersionTuple(18); + } + return VersionTuple(); +} + void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, @@ -2804,7 +2816,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Android-specific defaults for PIC/PIE if (getToolChain().getTriple().getEnvironment() == llvm::Triple::Android) { - switch (getToolChain().getTriple().getArch()) { + switch (getToolChain().getArch()) { case llvm::Triple::arm: case llvm::Triple::armeb: case llvm::Triple::thumb: @@ -2830,10 +2842,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // OpenBSD-specific defaults for PIE if (getToolChain().getTriple().getOS() == llvm::Triple::OpenBSD) { - switch (getToolChain().getTriple().getArch()) { + switch (getToolChain().getArch()) { case llvm::Triple::mips64: case llvm::Triple::mips64el: - case llvm::Triple::sparc: case llvm::Triple::sparcel: case llvm::Triple::x86: case llvm::Triple::x86_64: @@ -2841,6 +2852,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, break; case llvm::Triple::ppc: + case llvm::Triple::sparc: case llvm::Triple::sparcv9: IsPICLevelTwo = true; // "-fPIE" break; @@ -2946,14 +2958,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_frewrite_map_file) || Args.hasArg(options::OPT_frewrite_map_file_EQ)) { - for (arg_iterator - MFI = Args.filtered_begin(options::OPT_frewrite_map_file, - options::OPT_frewrite_map_file_EQ), - MFE = Args.filtered_end(); - MFI != MFE; ++MFI) { + for (const Arg *A : Args.filtered(options::OPT_frewrite_map_file, + options::OPT_frewrite_map_file_EQ)) { CmdArgs.push_back("-frewrite-map-file"); - CmdArgs.push_back((*MFI)->getValue()); - (*MFI)->claim(); + CmdArgs.push_back(A->getValue()); + A->claim(); } } @@ -3581,10 +3590,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } // Warn about ignored options to clang. - for (arg_iterator it = Args.filtered_begin( - options::OPT_clang_ignored_gcc_optimization_f_Group), - ie = Args.filtered_end(); it != ie; ++it) { - D.Diag(diag::warn_ignored_gcc_optimization) << (*it)->getAsString(Args); + for (const Arg *A : + Args.filtered(options::OPT_clang_ignored_gcc_optimization_f_Group)) { + D.Diag(diag::warn_ignored_gcc_optimization) << A->getAsString(Args); } claimNoWarnArgs(Args); @@ -3804,21 +3812,35 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_fno_elide_type); // Forward flags for OpenMP - if (Args.hasArg(options::OPT_fopenmp_EQ) || - Args.hasArg(options::OPT_fopenmp)) { - CmdArgs.push_back("-fopenmp"); - } + if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, + options::OPT_fno_openmp, false)) + switch (getOpenMPRuntime(getToolChain(), Args)) { + case OMPRT_OMP: + case OMPRT_IOMP5: + // Clang can generate useful OpenMP code for these two runtime libraries. + CmdArgs.push_back("-fopenmp"); + break; + default: + // By default, if Clang doesn't know how to generate useful OpenMP code + // for a specific runtime library, we just don't pass the '-fopenmp' flag + // down to the actual compilation. + // FIXME: It would be better to have a mode which *only* omits IR + // generation based on the OpenMP support so that we get consistent + // semantic analysis, etc. + break; + } const SanitizerArgs &Sanitize = getToolChain().getSanitizerArgs(); Sanitize.addArgs(Args, CmdArgs); // Report an error for -faltivec on anything other than PowerPC. - if (const Arg *A = Args.getLastArg(options::OPT_faltivec)) - if (!(getToolChain().getArch() == llvm::Triple::ppc || - getToolChain().getArch() == llvm::Triple::ppc64 || - getToolChain().getArch() == llvm::Triple::ppc64le)) - D.Diag(diag::err_drv_argument_only_allowed_with) - << A->getAsString(Args) << "ppc/ppc64/ppc64le"; + if (const Arg *A = Args.getLastArg(options::OPT_faltivec)) { + const llvm::Triple::ArchType Arch = getToolChain().getArch(); + if (!(Arch == llvm::Triple::ppc || Arch == llvm::Triple::ppc64 || + Arch == llvm::Triple::ppc64le)) + D.Diag(diag::err_drv_argument_only_allowed_with) << A->getAsString(Args) + << "ppc/ppc64/ppc64le"; + } if (getToolChain().SupportsProfiling()) Args.AddLastArg(CmdArgs, options::OPT_pg); @@ -3891,16 +3913,15 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } // --param ssp-buffer-size= - for (arg_iterator it = Args.filtered_begin(options::OPT__param), - ie = Args.filtered_end(); it != ie; ++it) { - StringRef Str((*it)->getValue()); + for (const Arg *A : Args.filtered(options::OPT__param)) { + StringRef Str(A->getValue()); if (Str.startswith("ssp-buffer-size=")) { if (StackProtectorLevel) { CmdArgs.push_back("-stack-protector-buffer-size"); // FIXME: Verify the argument is a valid integer. CmdArgs.push_back(Args.MakeArgString(Str.drop_front(16))); } - (*it)->claim(); + A->claim(); } } @@ -3929,8 +3950,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-mstack-probe-size=0"); } - if (getToolChain().getTriple().getArch() == llvm::Triple::aarch64 || - getToolChain().getTriple().getArch() == llvm::Triple::aarch64_be) + if (getToolChain().getArch() == llvm::Triple::aarch64 || + getToolChain().getArch() == llvm::Triple::aarch64_be) CmdArgs.push_back("-fallow-half-arguments-and-returns"); if (Arg *A = Args.getLastArg(options::OPT_mrestrict_it, @@ -4190,38 +4211,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-fms-compatibility"); // -fms-compatibility-version=18.00 is default. - VersionTuple MSVT; - if (Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions, - IsWindowsMSVC) || - Args.hasArg(options::OPT_fmsc_version) || - Args.hasArg(options::OPT_fms_compatibility_version)) { - const Arg *MSCVersion = Args.getLastArg(options::OPT_fmsc_version); - const Arg *MSCompatibilityVersion = - Args.getLastArg(options::OPT_fms_compatibility_version); - - if (MSCVersion && MSCompatibilityVersion) - D.Diag(diag::err_drv_argument_not_allowed_with) - << MSCVersion->getAsString(Args) - << MSCompatibilityVersion->getAsString(Args); - - if (MSCompatibilityVersion) { - if (MSVT.tryParse(MSCompatibilityVersion->getValue())) - D.Diag(diag::err_drv_invalid_value) - << MSCompatibilityVersion->getAsString(Args) - << MSCompatibilityVersion->getValue(); - } else if (MSCVersion) { - unsigned Version = 0; - if (StringRef(MSCVersion->getValue()).getAsInteger(10, Version)) - D.Diag(diag::err_drv_invalid_value) << MSCVersion->getAsString(Args) - << MSCVersion->getValue(); - MSVT = getMSCompatibilityVersion(Version); - } else { - MSVT = VersionTuple(18); - } - + VersionTuple MSVT = visualstudio::getMSVCVersion( + &D, getToolChain().getTriple(), Args, IsWindowsMSVC); + if (!MSVT.empty()) CmdArgs.push_back( Args.MakeArgString("-fms-compatibility-version=" + MSVT.getAsString())); - } bool IsMSVC2015Compatible = MSVT.getMajor() >= 19; if (ImplyVCPPCXXVer) { @@ -4287,7 +4281,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // When ObjectiveC legacy runtime is in effect on MacOSX, // turn on the option to do Array/Dictionary subscripting // by default. - if (getToolChain().getTriple().getArch() == llvm::Triple::x86 && + if (getToolChain().getArch() == llvm::Triple::x86 && getToolChain().getTriple().isMacOSX() && !getToolChain().getTriple().isMacOSXVersionLT(10, 7) && objcRuntime.getKind() == ObjCRuntime::FragileMacOSX && @@ -4667,17 +4661,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // parser. Args.AddAllArgValues(CmdArgs, options::OPT_Xclang); bool OptDisabled = false; - for (arg_iterator it = Args.filtered_begin(options::OPT_mllvm), - ie = Args.filtered_end(); it != ie; ++it) { - (*it)->claim(); + for (const Arg *A : Args.filtered(options::OPT_mllvm)) { + A->claim(); // We translate this by hand to the -cc1 argument, since nightly test uses // it and developers have been trained to spell it with -mllvm. - if (StringRef((*it)->getValue(0)) == "-disable-llvm-optzns") { + if (StringRef(A->getValue(0)) == "-disable-llvm-optzns") { CmdArgs.push_back("-disable-llvm-optzns"); OptDisabled = true; } else - (*it)->render(Args, CmdArgs); + A->render(Args, CmdArgs); } // With -save-temps, we want to save the unoptimized bitcode output from the @@ -5016,8 +5009,8 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const { } unsigned VolatileOptionID; - if (getToolChain().getTriple().getArch() == llvm::Triple::x86_64 || - getToolChain().getTriple().getArch() == llvm::Triple::x86) + if (getToolChain().getArch() == llvm::Triple::x86_64 || + getToolChain().getArch() == llvm::Triple::x86) VolatileOptionID = options::OPT__SLASH_volatile_ms; else VolatileOptionID = options::OPT__SLASH_volatile_iso; @@ -5208,10 +5201,8 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA, // doesn't handle that so rather than warning about unused flags that are // actually used, we'll lie by omission instead. // FIXME: Stop lying and consume only the appropriate driver flags - for (arg_iterator it = Args.filtered_begin(options::OPT_W_Group), - ie = Args.filtered_end(); - it != ie; ++it) - (*it)->claim(); + for (const Arg *A : Args.filtered(options::OPT_W_Group)) + A->claim(); CollectArgsForIntegratedAssembler(C, Args, CmdArgs, getToolChain().getDriver()); @@ -5282,7 +5273,7 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA, // // FIXME: The triple class should directly provide the information we want // here. - llvm::Triple::ArchType Arch = getToolChain().getArch(); + const llvm::Triple::ArchType Arch = getToolChain().getArch(); if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::ppc) CmdArgs.push_back("-m32"); else if (Arch == llvm::Triple::x86_64 || Arch == llvm::Triple::ppc64 || @@ -5542,10 +5533,9 @@ static void constructHexagonLinkArgs(Compilation &C, const JobAction &JA, std::vector<std::string> oslibs; bool hasStandalone= false; - for (arg_iterator it = Args.filtered_begin(options::OPT_moslib_EQ), - ie = Args.filtered_end(); it != ie; ++it) { - (*it)->claim(); - oslibs.push_back((*it)->getValue()); + for (const Arg *A : Args.filtered(options::OPT_moslib_EQ)) { + A->claim(); + oslibs.emplace_back(A->getValue()); hasStandalone = hasStandalone || (oslibs.back() == "standalone"); } if (oslibs.empty()) { @@ -5684,12 +5674,12 @@ const char *arm::getARMCPUForMArch(const ArgList &Args, } /// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targeting. -StringRef arm::getARMTargetCPU(const ArgList &Args, +std::string arm::getARMTargetCPU(const ArgList &Args, const llvm::Triple &Triple) { // FIXME: Warn on inconsistent use of -mcpu and -march. // If we have -mcpu=, use that. if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { - StringRef MCPU = A->getValue(); + std::string MCPU = StringRef(A->getValue()).lower(); // Handle -mcpu=native. if (MCPU == "native") return llvm::sys::getHostCPUName(); @@ -5702,45 +5692,16 @@ StringRef arm::getARMTargetCPU(const ArgList &Args, /// getLLVMArchSuffixForARM - Get the LLVM arch name to use for a particular /// CPU (or Arch, if CPU is generic). -// // FIXME: This is redundant with -mcpu, why does LLVM use this. -// FIXME: tblgen this, or kill it! -// FIXME: Use ARMTargetParser. const char *arm::getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch) { - // FIXME: Use ARMTargetParser - if (CPU == "generic") { - if (Arch == "armv8.1a" || Arch == "armv8.1-a" || - Arch == "armebv8.1a" || Arch == "armebv8.1-a") { - return "v8.1a"; - } - } - - // FIXME: Use ARMTargetParser - return llvm::StringSwitch<const char *>(CPU) - .Cases("arm8", "arm810", "v4") - .Cases("strongarm", "strongarm110", "strongarm1100", "strongarm1110", "v4") - .Cases("arm7tdmi", "arm7tdmi-s", "arm710t", "v4t") - .Cases("arm720t", "arm9", "arm9tdmi", "v4t") - .Cases("arm920", "arm920t", "arm922t", "v4t") - .Cases("arm940t", "ep9312","v4t") - .Cases("arm10tdmi", "arm1020t", "v5") - .Cases("arm9e", "arm926ej-s", "arm946e-s", "v5e") - .Cases("arm966e-s", "arm968e-s", "arm10e", "v5e") - .Cases("arm1020e", "arm1022e", "xscale", "iwmmxt", "v5e") - .Cases("arm1136j-s", "arm1136jf-s", "v6") - .Cases("arm1176jz-s", "arm1176jzf-s", "v6k") - .Cases("mpcorenovfp", "mpcore", "v6k") - .Cases("arm1156t2-s", "arm1156t2f-s", "v6t2") - .Cases("cortex-a5", "cortex-a7", "cortex-a8", "v7") - .Cases("cortex-a9", "cortex-a12", "cortex-a15", "cortex-a17", "krait", "v7") - .Cases("cortex-r4", "cortex-r4f", "cortex-r5", "cortex-r7", "v7r") - .Cases("sc000", "cortex-m0", "cortex-m0plus", "cortex-m1", "v6m") - .Cases("sc300", "cortex-m3", "v7m") - .Cases("cortex-m4", "cortex-m7", "v7em") - .Case("swift", "v7s") - .Case("cyclone", "v8") - .Cases("cortex-a53", "cortex-a57", "cortex-a72", "v8") - .Default(""); + if (CPU == "generic" && + llvm::ARMTargetParser::parseArch(Arch) == llvm::ARM::AK_ARMV8_1A) + return "v8.1a"; + + unsigned ArchKind = llvm::ARMTargetParser::parseCPUArch(CPU); + if (ArchKind == llvm::ARM::AK_INVALID) + return ""; + return llvm::ARMTargetParser::getSubArch(ArchKind); } void arm::appendEBLinkFlags(const ArgList &Args, ArgStringList &CmdArgs, @@ -5851,7 +5812,7 @@ llvm::Triple::ArchType darwin::getArchTypeForMachOArchName(StringRef Str) { } void darwin::setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str) { - llvm::Triple::ArchType Arch = getArchTypeForMachOArchName(Str); + const llvm::Triple::ArchType Arch = getArchTypeForMachOArchName(Str); T.setArch(Arch); if (Str == "x86_64h") @@ -6238,33 +6199,6 @@ void darwin::Link::AddLinkArgs(Compilation &C, Args.AddLastArg(CmdArgs, options::OPT_Mach); } -enum LibOpenMP { - LibUnknown, - LibGOMP, - LibIOMP5 -}; - -/// Map a -fopenmp=<blah> macro to the corresponding library. -static LibOpenMP getOpenMPLibByName(StringRef Name) { - return llvm::StringSwitch<LibOpenMP>(Name).Case("libgomp", LibGOMP) - .Case("libiomp5", LibIOMP5) - .Default(LibUnknown); -} - -/// Get the default -l<blah> flag to use for -fopenmp, if no library is -/// specified. This can be overridden at configure time. -static const char *getDefaultOpenMPLibFlag() { -#ifndef OPENMP_DEFAULT_LIB -#define OPENMP_DEFAULT_LIB iomp5 -#endif - -#define STR2(lib) #lib -#define STR(lib) STR2(lib) - return "-l" STR(OPENMP_DEFAULT_LIB); -#undef STR -#undef STR2 -} - void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, @@ -6322,21 +6256,22 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgs(CmdArgs, options::OPT_L); - if (const Arg *A = Args.getLastArg(options::OPT_fopenmp_EQ)) { - switch (getOpenMPLibByName(A->getValue())) { - case LibGOMP: + if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, + options::OPT_fno_openmp, false)) { + switch (getOpenMPRuntime(getToolChain(), Args)) { + case OMPRT_OMP: + CmdArgs.push_back("-lomp"); + break; + case OMPRT_GOMP: CmdArgs.push_back("-lgomp"); break; - case LibIOMP5: + case OMPRT_IOMP5: CmdArgs.push_back("-liomp5"); break; - case LibUnknown: - getToolChain().getDriver().Diag(diag::err_drv_unsupported_option_argument) - << A->getOption().getName() << A->getValue(); + case OMPRT_Unknown: + // Already diagnosed. break; } - } else if (Args.hasArg(options::OPT_fopenmp)) { - CmdArgs.push_back(getDefaultOpenMPLibFlag()); } AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs); @@ -6403,10 +6338,8 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgs(CmdArgs, options::OPT_F); // -iframework should be forwarded as -F. - for (auto it = Args.filtered_begin(options::OPT_iframework), - ie = Args.filtered_end(); it != ie; ++it) - CmdArgs.push_back(Args.MakeArgString(std::string("-F") + - (*it)->getValue())); + for (const Arg *A : Args.filtered(options::OPT_iframework)) + CmdArgs.push_back(Args.MakeArgString(std::string("-F") + A->getValue())); if (!Args.hasArg(options::OPT_nostdlib) && !Args.hasArg(options::OPT_nodefaultlibs)) { @@ -6521,7 +6454,7 @@ void solaris::Link::ConstructJob(Compilation &C, const JobAction &JA, std::string GCCLibPath = "/usr/gcc/4.5/lib/gcc/"; const llvm::Triple &T = getToolChain().getTriple(); std::string LibPath = "/usr/lib/"; - llvm::Triple::ArchType Arch = T.getArch(); + const llvm::Triple::ArchType Arch = T.getArch(); switch (Arch) { case llvm::Triple::x86: GCCLibPath += @@ -6927,7 +6860,7 @@ void bitrig::Link::ConstructJob(Compilation &C, const JobAction &JA, } StringRef MyArch; - switch (getToolChain().getTriple().getArch()) { + switch (getToolChain().getArch()) { case llvm::Triple::arm: MyArch = "arm"; break; @@ -7046,12 +6979,13 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const { - const toolchains::FreeBSD& ToolChain = - static_cast<const toolchains::FreeBSD&>(getToolChain()); + const toolchains::FreeBSD &ToolChain = + static_cast<const toolchains::FreeBSD &>(getToolChain()); const Driver &D = ToolChain.getDriver(); + const llvm::Triple::ArchType Arch = ToolChain.getArch(); const bool IsPIE = - !Args.hasArg(options::OPT_shared) && - (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault()); + !Args.hasArg(options::OPT_shared) && + (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault()); ArgStringList CmdArgs; // Silence warning for "clang -g foo.o -o foo" @@ -7081,7 +7015,6 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("/libexec/ld-elf.so.1"); } if (ToolChain.getTriple().getOSMajorVersion() >= 9) { - llvm::Triple::ArchType Arch = ToolChain.getArch(); if (Arch == llvm::Triple::arm || Arch == llvm::Triple::sparc || Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) { CmdArgs.push_back("--hash-style=both"); @@ -7092,12 +7025,12 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA, // When building 32-bit code on FreeBSD/amd64, we have to explicitly // instruct ld in the base system to link 32-bit code. - if (ToolChain.getArch() == llvm::Triple::x86) { + if (Arch == llvm::Triple::x86) { CmdArgs.push_back("-m"); CmdArgs.push_back("elf_i386_fbsd"); } - if (ToolChain.getArch() == llvm::Triple::ppc) { + if (Arch == llvm::Triple::ppc) { CmdArgs.push_back("-m"); CmdArgs.push_back("elf32ppc_fbsd"); } @@ -7254,7 +7187,7 @@ void netbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA, case llvm::Triple::armeb: case llvm::Triple::thumb: case llvm::Triple::thumbeb: { - std::string MArch(arm::getARMTargetCPU(Args, getToolChain().getTriple())); + std::string MArch = arm::getARMTargetCPU(Args, getToolChain().getTriple()); CmdArgs.push_back(Args.MakeArgString("-mcpu=" + MArch)); break; } @@ -7601,7 +7534,7 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA, // march from being picked in the absence of a cpu flag. Arg *A; if ((A = Args.getLastArg(options::OPT_mcpu_EQ)) && - StringRef(A->getValue()) == "krait") + StringRef(A->getValue()).lower() == "krait") CmdArgs.push_back("-march=armv7-a"); else Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ); @@ -7765,35 +7698,33 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D, static std::string getLinuxDynamicLinker(const ArgList &Args, const toolchains::Linux &ToolChain) { + const llvm::Triple::ArchType Arch = ToolChain.getArch(); + if (ToolChain.getTriple().getEnvironment() == llvm::Triple::Android) { if (ToolChain.getTriple().isArch64Bit()) return "/system/bin/linker64"; else return "/system/bin/linker"; - } else if (ToolChain.getArch() == llvm::Triple::x86 || - ToolChain.getArch() == llvm::Triple::sparc || - ToolChain.getArch() == llvm::Triple::sparcel) + } else if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::sparc || + Arch == llvm::Triple::sparcel) return "/lib/ld-linux.so.2"; - else if (ToolChain.getArch() == llvm::Triple::aarch64) + else if (Arch == llvm::Triple::aarch64) return "/lib/ld-linux-aarch64.so.1"; - else if (ToolChain.getArch() == llvm::Triple::aarch64_be) + else if (Arch == llvm::Triple::aarch64_be) return "/lib/ld-linux-aarch64_be.so.1"; - else if (ToolChain.getArch() == llvm::Triple::arm || - ToolChain.getArch() == llvm::Triple::thumb) { + else if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) { if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF) return "/lib/ld-linux-armhf.so.3"; else return "/lib/ld-linux.so.3"; - } else if (ToolChain.getArch() == llvm::Triple::armeb || - ToolChain.getArch() == llvm::Triple::thumbeb) { + } else if (Arch == llvm::Triple::armeb || Arch == llvm::Triple::thumbeb) { + // TODO: check which dynamic linker name. if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF) - return "/lib/ld-linux-armhf.so.3"; /* TODO: check which dynamic linker name. */ + return "/lib/ld-linux-armhf.so.3"; else - return "/lib/ld-linux.so.3"; /* TODO: check which dynamic linker name. */ - } else if (ToolChain.getArch() == llvm::Triple::mips || - ToolChain.getArch() == llvm::Triple::mipsel || - ToolChain.getArch() == llvm::Triple::mips64 || - ToolChain.getArch() == llvm::Triple::mips64el) { + return "/lib/ld-linux.so.3"; + } else if (Arch == llvm::Triple::mips || Arch == llvm::Triple::mipsel || + Arch == llvm::Triple::mips64 || Arch == llvm::Triple::mips64el) { StringRef CPUName; StringRef ABIName; mips::getMipsCPUAndABI(Args, ToolChain.getTriple(), CPUName, ABIName); @@ -7811,21 +7742,21 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, LibName = IsNaN2008 ? "ld-linux-mipsn8.so.1" : "ld.so.1"; return (LibDir + "/" + LibName).str(); - } else if (ToolChain.getArch() == llvm::Triple::ppc) + } else if (Arch == llvm::Triple::ppc) return "/lib/ld.so.1"; - else if (ToolChain.getArch() == llvm::Triple::ppc64) { + else if (Arch == llvm::Triple::ppc64) { if (ppc::hasPPCAbiArg(Args, "elfv2")) return "/lib64/ld64.so.2"; return "/lib64/ld64.so.1"; - } else if (ToolChain.getArch() == llvm::Triple::ppc64le) { + } else if (Arch == llvm::Triple::ppc64le) { if (ppc::hasPPCAbiArg(Args, "elfv1")) return "/lib64/ld64.so.1"; return "/lib64/ld64.so.2"; - } else if (ToolChain.getArch() == llvm::Triple::systemz) + } else if (Arch == llvm::Triple::systemz) return "/lib64/ld64.so.1"; - else if (ToolChain.getArch() == llvm::Triple::sparcv9) + else if (Arch == llvm::Triple::sparcv9) return "/lib64/ld-linux.so.2"; - else if (ToolChain.getArch() == llvm::Triple::x86_64 && + else if (Arch == llvm::Triple::x86_64 && ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUX32) return "/libx32/ld-linux-x32.so.2"; else @@ -7906,15 +7837,15 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const { - const toolchains::Linux& ToolChain = - static_cast<const toolchains::Linux&>(getToolChain()); + const toolchains::Linux &ToolChain = + static_cast<const toolchains::Linux &>(getToolChain()); const Driver &D = ToolChain.getDriver(); + const llvm::Triple::ArchType Arch = ToolChain.getArch(); const bool isAndroid = - ToolChain.getTriple().getEnvironment() == llvm::Triple::Android; + ToolChain.getTriple().getEnvironment() == llvm::Triple::Android; const bool IsPIE = - !Args.hasArg(options::OPT_shared) && - !Args.hasArg(options::OPT_static) && - (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault()); + !Args.hasArg(options::OPT_shared) && !Args.hasArg(options::OPT_static) && + (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault()); ArgStringList CmdArgs; @@ -7938,9 +7869,9 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_s)) CmdArgs.push_back("-s"); - if (ToolChain.getArch() == llvm::Triple::armeb || - ToolChain.getArch() == llvm::Triple::thumbeb) - arm::appendEBLinkFlags(Args, CmdArgs, + if (Arch == llvm::Triple::armeb || Arch == llvm::Triple::thumbeb) + arm::appendEBLinkFlags( + Args, CmdArgs, llvm::Triple(getToolChain().ComputeEffectiveClangTriple(Args))); for (const auto &Opt : ToolChain.ExtraOpts) @@ -7954,10 +7885,8 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(getLDMOption(ToolChain.getTriple(), Args)); if (Args.hasArg(options::OPT_static)) { - if (ToolChain.getArch() == llvm::Triple::arm || - ToolChain.getArch() == llvm::Triple::armeb || - ToolChain.getArch() == llvm::Triple::thumb || - ToolChain.getArch() == llvm::Triple::thumbeb) + if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb || + Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb) CmdArgs.push_back("-Bstatic"); else CmdArgs.push_back("-static"); @@ -7965,10 +7894,8 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-shared"); } - if (ToolChain.getArch() == llvm::Triple::arm || - ToolChain.getArch() == llvm::Triple::armeb || - ToolChain.getArch() == llvm::Triple::thumb || - ToolChain.getArch() == llvm::Triple::thumbeb || + if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb || + Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb || (!Args.hasArg(options::OPT_static) && !Args.hasArg(options::OPT_shared))) { CmdArgs.push_back("-dynamic-linker"); @@ -8054,30 +7981,36 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, if (NeedsSanitizerDeps) linkSanitizerRuntimeDeps(ToolChain, CmdArgs); - bool WantPthread = true; - if (const Arg *A = Args.getLastArg(options::OPT_fopenmp_EQ)) { - switch (getOpenMPLibByName(A->getValue())) { - case LibGOMP: + bool WantPthread = Args.hasArg(options::OPT_pthread) || + Args.hasArg(options::OPT_pthreads); + + if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, + options::OPT_fno_openmp, false)) { + // OpenMP runtimes implies pthreads when using the GNU toolchain. + // FIXME: Does this really make sense for all GNU toolchains? + WantPthread = true; + + // Also link the particular OpenMP runtimes. + switch (getOpenMPRuntime(ToolChain, Args)) { + case OMPRT_OMP: + CmdArgs.push_back("-lomp"); + break; + case OMPRT_GOMP: CmdArgs.push_back("-lgomp"); // FIXME: Exclude this for platforms with libgomp that don't require // librt. Most modern Linux platforms require it, but some may not. CmdArgs.push_back("-lrt"); break; - case LibIOMP5: + case OMPRT_IOMP5: CmdArgs.push_back("-liomp5"); break; - case LibUnknown: - D.Diag(diag::err_drv_unsupported_option_argument) - << A->getOption().getName() << A->getValue(); + case OMPRT_Unknown: + // Already diagnosed. break; } - } else if (Args.hasArg(options::OPT_fopenmp)) { - CmdArgs.push_back(getDefaultOpenMPLibFlag()); - } else { - WantPthread = Args.hasArg(options::OPT_pthread) || - Args.hasArg(options::OPT_pthreads); } + AddRunTimeLibs(ToolChain, D, CmdArgs, Args); if (WantPthread && !isAndroid) @@ -8137,17 +8070,17 @@ void nacltools::AssembleARM::ConstructJob(Compilation &C, const JobAction &JA, // others. Eventually we can support more of that and hopefully migrate back // to gnutools::link. void nacltools::Link::ConstructJob(Compilation &C, const JobAction &JA, - const InputInfo &Output, - const InputInfoList &Inputs, - const ArgList &Args, - const char *LinkingOutput) const { + const InputInfo &Output, + const InputInfoList &Inputs, + const ArgList &Args, + const char *LinkingOutput) const { - const toolchains::NaCl_TC& ToolChain = - static_cast<const toolchains::NaCl_TC&>(getToolChain()); + const toolchains::NaCl_TC &ToolChain = + static_cast<const toolchains::NaCl_TC &>(getToolChain()); const Driver &D = ToolChain.getDriver(); + const llvm::Triple::ArchType Arch = ToolChain.getArch(); const bool IsStatic = - !Args.hasArg(options::OPT_dynamic) && - !Args.hasArg(options::OPT_shared); + !Args.hasArg(options::OPT_dynamic) && !Args.hasArg(options::OPT_shared); ArgStringList CmdArgs; @@ -8176,16 +8109,15 @@ void nacltools::Link::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("--eh-frame-hdr"); CmdArgs.push_back("-m"); - if (ToolChain.getArch() == llvm::Triple::x86) + if (Arch == llvm::Triple::x86) CmdArgs.push_back("elf_i386_nacl"); - else if (ToolChain.getArch() == llvm::Triple::arm) + else if (Arch == llvm::Triple::arm) CmdArgs.push_back("armelf_nacl"); - else if (ToolChain.getArch() == llvm::Triple::x86_64) + else if (Arch == llvm::Triple::x86_64) CmdArgs.push_back("elf_x86_64_nacl"); else - D.Diag(diag::err_target_unsupported_arch) << ToolChain.getArchName() << - "Native Client"; - + D.Diag(diag::err_target_unsupported_arch) << ToolChain.getArchName() + << "Native Client"; if (IsStatic) CmdArgs.push_back("-static"); diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.h b/contrib/llvm/tools/clang/lib/Driver/Tools.h index 25fe063..133a389 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Tools.h +++ b/contrib/llvm/tools/clang/lib/Driver/Tools.h @@ -10,6 +10,7 @@ #ifndef LLVM_CLANG_LIB_DRIVER_TOOLS_H #define LLVM_CLANG_LIB_DRIVER_TOOLS_H +#include "clang/Basic/VersionTuple.h" #include "clang/Driver/Tool.h" #include "clang/Driver/Types.h" #include "clang/Driver/Util.h" @@ -224,8 +225,8 @@ namespace hexagon { } // end namespace hexagon. namespace arm { - StringRef getARMTargetCPU(const llvm::opt::ArgList &Args, - const llvm::Triple &Triple); + std::string getARMTargetCPU(const llvm::opt::ArgList &Args, + const llvm::Triple &Triple); const StringRef getARMArch(const llvm::opt::ArgList &Args, const llvm::Triple &Triple); const char* getARMCPUForMArch(const llvm::opt::ArgList &Args, @@ -630,6 +631,10 @@ namespace dragonfly { /// Visual studio tools. namespace visualstudio { + VersionTuple getMSVCVersion(const Driver *D, const llvm::Triple &Triple, + const llvm::opt::ArgList &Args, + bool IsWindowsMSVC); + class LLVM_LIBRARY_VISIBILITY Link : public Tool { public: Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC, @@ -726,7 +731,7 @@ public: }; } -} // end namespace toolchains +} // end namespace tools } // end namespace driver } // end namespace clang diff --git a/contrib/llvm/tools/clang/lib/Driver/Types.cpp b/contrib/llvm/tools/clang/lib/Driver/Types.cpp index 7b28145..0b0878f 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Types.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/Types.cpp @@ -45,7 +45,7 @@ types::ID types::getPreprocessedType(ID Id) { } const char *types::getTypeTempSuffix(ID Id, bool CLMode) { - if (Id == TY_Object && CLMode) + if ((Id == TY_Object || Id == TY_LTO_BC) && CLMode) return "obj"; if (Id == TY_Image && CLMode) return "exe"; diff --git a/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp b/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp index 66e935a..e3e162d 100644 --- a/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp +++ b/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp @@ -183,7 +183,7 @@ void BreakableStringLiteral::insertBreak(unsigned LineIndex, } static StringRef getLineCommentIndentPrefix(StringRef Comment) { - static const char *const KnownPrefixes[] = { "///", "//" }; + static const char *const KnownPrefixes[] = { "///", "//", "//!" }; StringRef LongestPrefix; for (StringRef KnownPrefix : KnownPrefixes) { if (Comment.startswith(KnownPrefix)) { @@ -210,6 +210,8 @@ BreakableLineComment::BreakableLineComment( Prefix = "// "; else if (Prefix == "///") Prefix = "/// "; + else if (Prefix == "//!") + Prefix = "//! "; } } diff --git a/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp b/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp index 4e8f5af..91bc64b 100644 --- a/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp +++ b/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp @@ -159,7 +159,8 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { if (((Previous.is(TT_DictLiteral) && Previous.is(tok::l_brace)) || Previous.is(TT_ArrayInitializerLSquare)) && Style.ColumnLimit > 0 && - getLengthToMatchingParen(Previous) + State.Column > getColumnLimit(State)) + getLengthToMatchingParen(Previous) + State.Column - 1 > + getColumnLimit(State)) return true; if (Current.is(TT_CtorInitializerColon) && ((Style.AllowShortFunctionsOnASingleLine != FormatStyle::SFS_All) || @@ -328,7 +329,7 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, State.Column > getNewLineColumn(State)) State.Stack.back().ContainsUnwrappedBuilder = true; - if (Current.is(TT_LambdaArrow)) + if (Current.is(TT_LambdaArrow) && Style.Language == FormatStyle::LK_Java) State.Stack.back().NoLineBreak = true; if (Current.isMemberAccess() && Previous.is(tok::r_paren) && (Previous.MatchingParen && @@ -462,6 +463,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, if (NextNonComment->is(tok::question) || (PreviousNonComment && PreviousNonComment->is(tok::question))) State.Stack.back().BreakBeforeParameter = true; + if (Current.is(TT_BinaryOperator) && Current.CanBreakBefore) + State.Stack.back().BreakBeforeParameter = false; if (!DryRun) { unsigned Newlines = std::max( @@ -481,11 +484,9 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, bool NestedBlockSpecialCase = Current.is(tok::r_brace) && State.Stack.size() > 1 && State.Stack[State.Stack.size() - 2].NestedBlockInlined; - if (!NestedBlockSpecialCase) { - for (unsigned i = 0, e = State.Stack.size() - 1; i != e; ++i) { + if (!NestedBlockSpecialCase) + for (unsigned i = 0, e = State.Stack.size() - 1; i != e; ++i) State.Stack[i].BreakBeforeParameter = true; - } - } if (PreviousNonComment && !PreviousNonComment->isOneOf(tok::comma, tok::semi) && @@ -689,11 +690,9 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State, // }, a, b, c); if (Current.isNot(tok::comment) && Previous && Previous->is(tok::l_brace) && State.Stack.size() > 1) { - if (State.Stack[State.Stack.size() - 2].NestedBlockInlined && Newline) { - for (unsigned i = 0, e = State.Stack.size() - 1; i != e; ++i) { + if (State.Stack[State.Stack.size() - 2].NestedBlockInlined && Newline) + for (unsigned i = 0, e = State.Stack.size() - 1; i != e; ++i) State.Stack[i].NoLineBreak = true; - } - } State.Stack[State.Stack.size() - 2].NestedBlockInlined = false; } if (Previous && (Previous->isOneOf(tok::l_paren, tok::comma, tok::colon) || diff --git a/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h b/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h index 36691d9..1da6bd9 100644 --- a/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h +++ b/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h @@ -297,11 +297,11 @@ struct ParenState { if (VariablePos != Other.VariablePos) return VariablePos < Other.VariablePos; if (ContainsLineBreak != Other.ContainsLineBreak) - return ContainsLineBreak < Other.ContainsLineBreak; + return ContainsLineBreak; if (ContainsUnwrappedBuilder != Other.ContainsUnwrappedBuilder) - return ContainsUnwrappedBuilder < Other.ContainsUnwrappedBuilder; + return ContainsUnwrappedBuilder; if (NestedBlockInlined != Other.NestedBlockInlined) - return NestedBlockInlined < Other.NestedBlockInlined; + return NestedBlockInlined; return false; } }; diff --git a/contrib/llvm/tools/clang/lib/Format/Format.cpp b/contrib/llvm/tools/clang/lib/Format/Format.cpp index 10c68f9..c725b4b 100644 --- a/contrib/llvm/tools/clang/lib/Format/Format.cpp +++ b/contrib/llvm/tools/clang/lib/Format/Format.cpp @@ -1640,8 +1640,6 @@ FormatStyle getStyle(StringRef StyleName, StringRef FileName, return Style; } } - llvm::errs() << "Can't find usable .clang-format, using " << FallbackStyle - << " style\n"; if (!UnsuitableConfigFiles.empty()) { llvm::errs() << "Configuration file(s) do(es) not support " << getLanguageName(Style.Language) << ": " diff --git a/contrib/llvm/tools/clang/lib/Format/FormatToken.h b/contrib/llvm/tools/clang/lib/Format/FormatToken.h index ec0fdf4..dd12969 100644 --- a/contrib/llvm/tools/clang/lib/Format/FormatToken.h +++ b/contrib/llvm/tools/clang/lib/Format/FormatToken.h @@ -51,6 +51,7 @@ enum TokenType { TT_InlineASMBrace, TT_InlineASMColon, TT_JavaAnnotation, + TT_JsComputedPropertyName, TT_JsFatArrow, TT_JsTypeColon, TT_JsTypeOptionalQuestion, diff --git a/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp index 98f5709..78e6103 100644 --- a/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp @@ -260,6 +260,7 @@ private: Left->ParentBracket = Contexts.back().ContextKind; FormatToken *Parent = Left->getPreviousNonComment(); bool StartsObjCMethodExpr = + Style.Language == FormatStyle::LK_Cpp && Contexts.back().CanBeExpression && Left->isNot(TT_LambdaLSquare) && CurrentToken->isNot(tok::l_brace) && (!Parent || @@ -268,19 +269,31 @@ private: Parent->isUnaryOperator() || Parent->isOneOf(TT_ObjCForIn, TT_CastRParen) || getBinOpPrecedence(Parent->Tok.getKind(), true, true) > prec::Unknown); - ScopedContextCreator ContextCreator(*this, tok::l_square, 10); - Contexts.back().IsExpression = true; bool ColonFound = false; - if (StartsObjCMethodExpr) { - Contexts.back().ColonIsObjCMethodExpr = true; - Left->Type = TT_ObjCMethodExpr; - } else if (Parent && Parent->is(tok::at)) { - Left->Type = TT_ArrayInitializerLSquare; - } else if (Left->is(TT_Unknown)) { - Left->Type = TT_ArraySubscriptLSquare; + unsigned BindingIncrease = 1; + if (Left->is(TT_Unknown)) { + if (StartsObjCMethodExpr) { + Left->Type = TT_ObjCMethodExpr; + } else if (Style.Language == FormatStyle::LK_JavaScript && Parent && + Contexts.back().ContextKind == tok::l_brace && + Parent->isOneOf(tok::l_brace, tok::comma)) { + Left->Type = TT_JsComputedPropertyName; + } else if (Parent && + Parent->isOneOf(tok::at, tok::equal, tok::comma, tok::l_paren, + tok::l_square, tok::question, tok::colon, + tok::kw_return)) { + Left->Type = TT_ArrayInitializerLSquare; + } else { + BindingIncrease = 10; + Left->Type = TT_ArraySubscriptLSquare; + } } + ScopedContextCreator ContextCreator(*this, tok::l_square, BindingIncrease); + Contexts.back().IsExpression = true; + Contexts.back().ColonIsObjCMethodExpr = StartsObjCMethodExpr; + while (CurrentToken) { if (CurrentToken->is(tok::r_square)) { if (CurrentToken->Next && CurrentToken->Next->is(tok::l_paren) && @@ -321,10 +334,8 @@ private: } ColonFound = true; } - if (CurrentToken->is(tok::comma) && - Style.Language != FormatStyle::LK_Proto && - (Left->is(TT_ArraySubscriptLSquare) || - (Left->is(TT_ObjCMethodExpr) && !ColonFound))) + if (CurrentToken->is(tok::comma) && Left->is(TT_ObjCMethodExpr) && + !ColonFound) Left->Type = TT_ArrayInitializerLSquare; FormatToken *Tok = CurrentToken; if (!consumeToken()) @@ -437,7 +448,8 @@ private: !Line.First->isOneOf(tok::kw_enum, tok::kw_case)) || Contexts.back().ContextKind == tok::l_paren || // function params Contexts.back().ContextKind == tok::l_square || // array type - Line.MustBeDeclaration) { // method/property declaration + (Contexts.size() == 1 && + Line.MustBeDeclaration)) { // method/property declaration Tok->Type = TT_JsTypeColon; break; } @@ -742,8 +754,8 @@ private: // recovered from an error (e.g. failure to find the matching >). if (!CurrentToken->isOneOf(TT_LambdaLSquare, TT_ForEachMacro, TT_FunctionLBrace, TT_ImplicitStringLiteral, - TT_InlineASMBrace, TT_RegexLiteral, - TT_TrailingReturnArrow)) + TT_InlineASMBrace, TT_JsFatArrow, TT_LambdaArrow, + TT_RegexLiteral)) CurrentToken->Type = TT_Unknown; CurrentToken->Role.reset(); CurrentToken->MatchingParen = nullptr; @@ -832,6 +844,8 @@ private: Contexts.back().IsExpression = true; } else if (Current.is(TT_TrailingReturnArrow)) { Contexts.back().IsExpression = false; + } else if (Current.is(TT_LambdaArrow)) { + Contexts.back().IsExpression = Style.Language == FormatStyle::LK_Java; } else if (Current.is(tok::l_paren) && !Line.MustBeDeclaration && !Line.InPPDirective && (!Current.Previous || @@ -1308,25 +1322,27 @@ private: const FormatToken *NextNonComment = Current->getNextNonComment(); if (Current->is(TT_ConditionalExpr)) return prec::Conditional; - else if (NextNonComment && NextNonComment->is(tok::colon) && - NextNonComment->is(TT_DictLiteral)) + if (NextNonComment && NextNonComment->is(tok::colon) && + NextNonComment->is(TT_DictLiteral)) return prec::Comma; - else if (Current->is(TT_LambdaArrow)) + if (Current->is(TT_LambdaArrow)) return prec::Comma; - else if (Current->isOneOf(tok::semi, TT_InlineASMColon, - TT_SelectorName) || - (Current->is(tok::comment) && NextNonComment && - NextNonComment->is(TT_SelectorName))) + if (Current->is(TT_JsFatArrow)) + return prec::Assignment; + if (Current->isOneOf(tok::semi, TT_InlineASMColon, TT_SelectorName, + TT_JsComputedPropertyName) || + (Current->is(tok::comment) && NextNonComment && + NextNonComment->is(TT_SelectorName))) return 0; - else if (Current->is(TT_RangeBasedForLoopColon)) + if (Current->is(TT_RangeBasedForLoopColon)) return prec::Comma; - else if (Current->is(TT_BinaryOperator) || Current->is(tok::comma)) + if (Current->is(TT_BinaryOperator) || Current->is(tok::comma)) return Current->getPrecedence(); - else if (Current->isOneOf(tok::period, tok::arrow)) + if (Current->isOneOf(tok::period, tok::arrow)) return PrecedenceArrowAndPeriod; - else if (Style.Language == FormatStyle::LK_Java && - Current->isOneOf(Keywords.kw_extends, Keywords.kw_implements, - Keywords.kw_throws)) + if (Style.Language == FormatStyle::LK_Java && + Current->isOneOf(Keywords.kw_extends, Keywords.kw_implements, + Keywords.kw_throws)) return 0; } return -1; @@ -1615,7 +1631,8 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line, // Slightly prefer formatting local lambda definitions like functions. if (Right.is(TT_LambdaLSquare) && Left.is(tok::equal)) return 50; - if (!Right.isOneOf(TT_ObjCMethodExpr, TT_LambdaLSquare)) + if (!Right.isOneOf(TT_ObjCMethodExpr, TT_LambdaLSquare, + TT_ArrayInitializerLSquare)) return 500; } @@ -1631,7 +1648,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line, } if (Right.is(TT_PointerOrReference)) return 190; - if (Right.is(TT_TrailingReturnArrow)) + if (Right.is(TT_LambdaArrow)) return 110; if (Left.is(tok::equal) && Right.is(tok::l_brace)) return 150; @@ -1867,7 +1884,7 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, Left.isOneOf(Keywords.kw_returns, Keywords.kw_option)) return true; } else if (Style.Language == FormatStyle::LK_JavaScript) { - if (Left.is(Keywords.kw_var)) + if (Left.isOneOf(Keywords.kw_var, TT_JsFatArrow)) return true; if (Right.isOneOf(TT_JsTypeColon, TT_JsTypeOptionalQuestion)) return false; @@ -1886,8 +1903,6 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, } else if (Style.Language == FormatStyle::LK_Java) { if (Left.is(tok::r_square) && Right.is(tok::l_brace)) return true; - if (Left.is(TT_LambdaArrow) || Right.is(TT_LambdaArrow)) - return true; if (Left.is(Keywords.kw_synchronized) && Right.is(tok::l_paren)) return Style.SpaceBeforeParens != FormatStyle::SBPO_Never; if ((Left.isOneOf(tok::kw_static, tok::kw_public, tok::kw_private, @@ -1912,7 +1927,8 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, (Right.is(tok::equal) || Left.is(tok::equal))) return false; - if (Right.is(TT_TrailingReturnArrow) || Left.is(TT_TrailingReturnArrow)) + if (Right.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow) || + Left.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow)) return true; if (Left.is(tok::comma)) return true; @@ -1947,10 +1963,9 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, return Style.SpaceAfterCStyleCast || Right.isOneOf(TT_BinaryOperator, TT_SelectorName); - if (Left.is(tok::greater) && Right.is(tok::greater)) { + if (Left.is(tok::greater) && Right.is(tok::greater)) return Right.is(TT_TemplateCloser) && Left.is(TT_TemplateCloser) && (Style.Standard != FormatStyle::LS_Cpp11 || Style.SpacesInAngles); - } if (Right.isOneOf(tok::arrow, tok::period, tok::arrowstar, tok::periodstar) || Left.isOneOf(tok::arrow, tok::period, tok::arrowstar, tok::periodstar)) return false; @@ -2094,6 +2109,7 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line, const FormatToken &Right) { const FormatToken &Left = *Right.Previous; + // Language-specific stuff. if (Style.Language == FormatStyle::LK_Java) { if (Left.isOneOf(Keywords.kw_throws, Keywords.kw_extends, Keywords.kw_implements)) @@ -2101,6 +2117,9 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line, if (Right.isOneOf(Keywords.kw_throws, Keywords.kw_extends, Keywords.kw_implements)) return true; + } else if (Style.Language == FormatStyle::LK_JavaScript) { + if (Left.is(TT_JsFatArrow) && Right.is(tok::l_brace)) + return false; } if (Left.is(tok::at)) diff --git a/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp index 939528f..6ad4329 100644 --- a/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp @@ -887,9 +887,8 @@ void UnwrappedLineParser::parseStructuralElement() { // followed by a curly. if (FormatTok->is(TT_JsFatArrow)) { nextToken(); - if (FormatTok->is(tok::l_brace)) { + if (FormatTok->is(tok::l_brace)) parseChildBlock(); - } break; } @@ -912,6 +911,10 @@ void UnwrappedLineParser::parseStructuralElement() { } bool UnwrappedLineParser::tryToParseLambda() { + if (Style.Language != FormatStyle::LK_Cpp) { + nextToken(); + return false; + } // FIXME: This is a dirty way to access the previous token. Find a better // solution. if (!Line->Tokens.empty() && @@ -950,7 +953,7 @@ bool UnwrappedLineParser::tryToParseLambda() { nextToken(); break; case tok::arrow: - FormatTok->Type = TT_TrailingReturnArrow; + FormatTok->Type = TT_LambdaArrow; nextToken(); break; default: @@ -1019,7 +1022,7 @@ void UnwrappedLineParser::tryToParseJSFunction() { return; // Parse formal parameter list. - parseBalanced(tok::l_paren, tok::r_paren); + parseParens(); if (FormatTok->is(tok::colon)) { // Parse a type definition. @@ -1027,34 +1030,16 @@ void UnwrappedLineParser::tryToParseJSFunction() { // Eat the type declaration. For braced inline object types, balance braces, // otherwise just parse until finding an l_brace for the function body. - if (FormatTok->is(tok::l_brace)) { - parseBalanced(tok::l_brace, tok::r_brace); - } else { - while(FormatTok->isNot(tok::l_brace) && !eof()) { + if (FormatTok->is(tok::l_brace)) + tryToParseBracedList(); + else + while(FormatTok->isNot(tok::l_brace) && !eof()) nextToken(); - } - } } parseChildBlock(); } -void UnwrappedLineParser::parseBalanced(tok::TokenKind OpenKind, - tok::TokenKind CloseKind) { - assert(FormatTok->is(OpenKind)); - nextToken(); - int Depth = 1; - while (Depth > 0 && !eof()) { - // Parse the formal parameter list. - if (FormatTok->is(OpenKind)) { - ++Depth; - } else if (FormatTok->is(CloseKind)) { - --Depth; - } - nextToken(); - } -} - bool UnwrappedLineParser::tryToParseBracedList() { if (FormatTok->BlockKind == BK_Unknown) calculateBraceTypes(); @@ -1076,7 +1061,8 @@ bool UnwrappedLineParser::parseBracedList(bool ContinueOnSemicolons) { if (FormatTok->is(Keywords.kw_function)) { tryToParseJSFunction(); continue; - } else if (FormatTok->is(TT_JsFatArrow)) { + } + if (FormatTok->is(TT_JsFatArrow)) { nextToken(); // Fat arrows can be followed by simple expressions or by child blocks // in curly braces. @@ -1780,15 +1766,12 @@ void UnwrappedLineParser::addUnwrappedLine() { if (CurrentLines == &Lines) printDebugInfo(*Line); }); - CurrentLines->push_back(*Line); + CurrentLines->push_back(std::move(*Line)); Line->Tokens.clear(); if (CurrentLines == &Lines && !PreprocessorDirectives.empty()) { - for (SmallVectorImpl<UnwrappedLine>::iterator - I = PreprocessorDirectives.begin(), - E = PreprocessorDirectives.end(); - I != E; ++I) { - CurrentLines->push_back(*I); - } + CurrentLines->append( + std::make_move_iterator(PreprocessorDirectives.begin()), + std::make_move_iterator(PreprocessorDirectives.end())); PreprocessorDirectives.clear(); } } diff --git a/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h b/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h index 6a6e56f..c2fa029 100644 --- a/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h +++ b/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h @@ -107,11 +107,6 @@ private: bool tryToParseLambda(); bool tryToParseLambdaIntroducer(); void tryToParseJSFunction(); - /// \brief Parses tokens until encountering the CloseKind token, but balances - /// tokens when encountering more OpenKind tokens. Useful for e.g. parsing a - /// curly brace delimited block that can contain nested blocks. - /// The parser must be positioned on a token of OpenKind. - void parseBalanced(tok::TokenKind OpenKind, tok::TokenKind CloseKind); void addUnwrappedLine(); bool eof() const; void nextToken(); diff --git a/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp index 4baaab1..6539527 100644 --- a/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp +++ b/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp @@ -402,7 +402,7 @@ void WhitespaceManager::appendNewlineText(std::string &Text, unsigned Newlines, unsigned Offset = std::min<int>(EscapedNewlineColumn - 1, PreviousEndOfTokenColumn); for (unsigned i = 0; i < Newlines; ++i) { - Text.append(std::string(EscapedNewlineColumn - Offset - 1, ' ')); + Text.append(EscapedNewlineColumn - Offset - 1, ' '); Text.append(UseCRLF ? "\\\r\n" : "\\\n"); Offset = 0; } @@ -414,7 +414,7 @@ void WhitespaceManager::appendIndentText(std::string &Text, unsigned WhitespaceStartColumn) { switch (Style.UseTab) { case FormatStyle::UT_Never: - Text.append(std::string(Spaces, ' ')); + Text.append(Spaces, ' '); break; case FormatStyle::UT_Always: { unsigned FirstTabWidth = @@ -424,8 +424,8 @@ void WhitespaceManager::appendIndentText(std::string &Text, Spaces -= FirstTabWidth; Text.append("\t"); } - Text.append(std::string(Spaces / Style.TabWidth, '\t')); - Text.append(std::string(Spaces % Style.TabWidth, ' ')); + Text.append(Spaces / Style.TabWidth, '\t'); + Text.append(Spaces % Style.TabWidth, ' '); break; } case FormatStyle::UT_ForIndentation: @@ -436,10 +436,10 @@ void WhitespaceManager::appendIndentText(std::string &Text, if (Indentation > Spaces) Indentation = Spaces; unsigned Tabs = Indentation / Style.TabWidth; - Text.append(std::string(Tabs, '\t')); + Text.append(Tabs, '\t'); Spaces -= Tabs * Style.TabWidth; } - Text.append(std::string(Spaces, ' ')); + Text.append(Spaces, ' '); break; } } diff --git a/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp b/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp index 7226344..4fd330d4 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp @@ -613,7 +613,7 @@ void StoredDiagnosticConsumer::HandleDiagnostic(DiagnosticsEngine::Level Level, // about. This effectively drops diagnostics from modules we're building. // FIXME: In the long run, ee don't want to drop source managers from modules. if (!Info.hasSourceManager() || &Info.getSourceManager() == SourceMgr) - StoredDiags.push_back(StoredDiagnostic(Level, Info)); + StoredDiags.emplace_back(Level, Info); } ASTMutationListener *ASTUnit::getASTMutationListener() { diff --git a/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp b/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp index 9e01727..aef3905 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp @@ -946,12 +946,11 @@ static bool compileModuleImpl(CompilerInstance &ImportingInstance, if (const FileEntry *ModuleMapFile = ModMap.getContainingModuleMapFile(Module)) { // Use the module map where this module resides. - FrontendOpts.Inputs.push_back( - FrontendInputFile(ModuleMapFile->getName(), IK)); + FrontendOpts.Inputs.emplace_back(ModuleMapFile->getName(), IK); } else { SmallString<128> FakeModuleMapFile(Module->Directory->getName()); llvm::sys::path::append(FakeModuleMapFile, "__inferred_module.map"); - FrontendOpts.Inputs.push_back(FrontendInputFile(FakeModuleMapFile, IK)); + FrontendOpts.Inputs.emplace_back(FakeModuleMapFile, IK); llvm::raw_string_ostream OS(InferredModuleMapContent); Module->print(OS); diff --git a/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp b/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp index 8d3d312..4f7d15f 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp @@ -126,7 +126,7 @@ static void addDiagnosticArgs(ArgList &Args, OptSpecifier Group, } else { // Otherwise, add its value (for OPT_W_Joined and similar). for (const char *Arg : A->getValues()) - Diagnostics.push_back(Arg); + Diagnostics.emplace_back(Arg); } } } @@ -239,10 +239,8 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, Opts.InlineMaxStackDepth, Diags); Opts.CheckersControlList.clear(); - for (arg_iterator it = Args.filtered_begin(OPT_analyzer_checker, - OPT_analyzer_disable_checker), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; + for (const Arg *A : + Args.filtered(OPT_analyzer_checker, OPT_analyzer_disable_checker)) { A->claim(); bool enable = (A->getOption().getID() == OPT_analyzer_checker); // We can have a list of comma separated checker names, e.g: @@ -250,14 +248,12 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, StringRef checkerList = A->getValue(); SmallVector<StringRef, 4> checkers; checkerList.split(checkers, ","); - for (unsigned i = 0, e = checkers.size(); i != e; ++i) - Opts.CheckersControlList.push_back(std::make_pair(checkers[i], enable)); + for (StringRef checker : checkers) + Opts.CheckersControlList.emplace_back(checker, enable); } // Go through the analyzer configuration options. - for (arg_iterator it = Args.filtered_begin(OPT_analyzer_config), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; + for (const Arg *A : Args.filtered(OPT_analyzer_config)) { A->claim(); // We can have a list of comma separated config names, e.g: // '-analyzer-config key1=val1,key2=val2' @@ -429,7 +425,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.Autolink = !Args.hasArg(OPT_fno_autolink); Opts.SampleProfileFile = Args.getLastArgValue(OPT_fprofile_sample_use_EQ); Opts.ProfileInstrGenerate = Args.hasArg(OPT_fprofile_instr_generate) || - Args.hasArg(OPT_fprofile_instr_generate_EQ);; + Args.hasArg(OPT_fprofile_instr_generate_EQ); Opts.InstrProfileOutput = Args.getLastArgValue(OPT_fprofile_instr_generate_EQ); Opts.InstrProfileInput = Args.getLastArgValue(OPT_fprofile_instr_use_EQ); Opts.CoverageMapping = Args.hasArg(OPT_fcoverage_mapping); @@ -867,26 +863,21 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, } if (const Arg* A = Args.getLastArg(OPT_plugin)) { - Opts.Plugins.push_back(A->getValue(0)); + Opts.Plugins.emplace_back(A->getValue(0)); Opts.ProgramAction = frontend::PluginAction; Opts.ActionName = A->getValue(); - for (arg_iterator it = Args.filtered_begin(OPT_plugin_arg), - end = Args.filtered_end(); it != end; ++it) { - if ((*it)->getValue(0) == Opts.ActionName) - Opts.PluginArgs.push_back((*it)->getValue(1)); - } + for (const Arg *AA : Args.filtered(OPT_plugin_arg)) + if (AA->getValue(0) == Opts.ActionName) + Opts.PluginArgs.emplace_back(AA->getValue(1)); } Opts.AddPluginActions = Args.getAllArgValues(OPT_add_plugin); Opts.AddPluginArgs.resize(Opts.AddPluginActions.size()); - for (int i = 0, e = Opts.AddPluginActions.size(); i != e; ++i) { - for (arg_iterator it = Args.filtered_begin(OPT_plugin_arg), - end = Args.filtered_end(); it != end; ++it) { - if ((*it)->getValue(0) == Opts.AddPluginActions[i]) - Opts.AddPluginArgs[i].push_back((*it)->getValue(1)); - } - } + for (int i = 0, e = Opts.AddPluginActions.size(); i != e; ++i) + for (const Arg *A : Args.filtered(OPT_plugin_arg)) + if (A->getValue(0) == Opts.AddPluginActions[i]) + Opts.AddPluginArgs[i].emplace_back(A->getValue(1)); if (const Arg *A = Args.getLastArg(OPT_code_completion_at)) { Opts.CodeCompletionAt = @@ -1035,7 +1026,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, if (i == 0) DashX = IK; } - Opts.Inputs.push_back(FrontendInputFile(Inputs[i], IK)); + Opts.Inputs.emplace_back(std::move(Inputs[i]), IK); } return DashX; @@ -1088,98 +1079,77 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) { Opts.ModulesValidateSystemHeaders = Args.hasArg(OPT_fmodules_validate_system_headers); - for (arg_iterator it = Args.filtered_begin(OPT_fmodules_ignore_macro), - ie = Args.filtered_end(); - it != ie; ++it) { - StringRef MacroDef = (*it)->getValue(); + for (const Arg *A : Args.filtered(OPT_fmodules_ignore_macro)) { + StringRef MacroDef = A->getValue(); Opts.ModulesIgnoreMacros.insert(MacroDef.split('=').first); } // Add -I..., -F..., and -index-header-map options in order. bool IsIndexHeaderMap = false; - for (arg_iterator it = Args.filtered_begin(OPT_I, OPT_F, - OPT_index_header_map), - ie = Args.filtered_end(); it != ie; ++it) { - if ((*it)->getOption().matches(OPT_index_header_map)) { + for (const Arg *A : Args.filtered(OPT_I, OPT_F, OPT_index_header_map)) { + if (A->getOption().matches(OPT_index_header_map)) { // -index-header-map applies to the next -I or -F. IsIndexHeaderMap = true; continue; } - - frontend::IncludeDirGroup Group - = IsIndexHeaderMap? frontend::IndexHeaderMap : frontend::Angled; - - Opts.AddPath((*it)->getValue(), Group, - /*IsFramework=*/ (*it)->getOption().matches(OPT_F), true); + + frontend::IncludeDirGroup Group = + IsIndexHeaderMap ? frontend::IndexHeaderMap : frontend::Angled; + + Opts.AddPath(A->getValue(), Group, + /*IsFramework=*/A->getOption().matches(OPT_F), true); IsIndexHeaderMap = false; } // Add -iprefix/-iwithprefix/-iwithprefixbefore options. StringRef Prefix = ""; // FIXME: This isn't the correct default prefix. - for (arg_iterator it = Args.filtered_begin(OPT_iprefix, OPT_iwithprefix, - OPT_iwithprefixbefore), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; + for (const Arg *A : + Args.filtered(OPT_iprefix, OPT_iwithprefix, OPT_iwithprefixbefore)) { if (A->getOption().matches(OPT_iprefix)) Prefix = A->getValue(); else if (A->getOption().matches(OPT_iwithprefix)) - Opts.AddPath(Prefix.str() + A->getValue(), - frontend::After, false, true); + Opts.AddPath(Prefix.str() + A->getValue(), frontend::After, false, true); else - Opts.AddPath(Prefix.str() + A->getValue(), - frontend::Angled, false, true); - } - - for (arg_iterator it = Args.filtered_begin(OPT_idirafter), - ie = Args.filtered_end(); it != ie; ++it) - Opts.AddPath((*it)->getValue(), frontend::After, false, true); - for (arg_iterator it = Args.filtered_begin(OPT_iquote), - ie = Args.filtered_end(); it != ie; ++it) - Opts.AddPath((*it)->getValue(), frontend::Quoted, false, true); - for (arg_iterator it = Args.filtered_begin(OPT_isystem, - OPT_iwithsysroot), ie = Args.filtered_end(); it != ie; ++it) - Opts.AddPath((*it)->getValue(), frontend::System, false, - !(*it)->getOption().matches(OPT_iwithsysroot)); - for (arg_iterator it = Args.filtered_begin(OPT_iframework), - ie = Args.filtered_end(); it != ie; ++it) - Opts.AddPath((*it)->getValue(), frontend::System, true, true); + Opts.AddPath(Prefix.str() + A->getValue(), frontend::Angled, false, true); + } + + for (const Arg *A : Args.filtered(OPT_idirafter)) + Opts.AddPath(A->getValue(), frontend::After, false, true); + for (const Arg *A : Args.filtered(OPT_iquote)) + Opts.AddPath(A->getValue(), frontend::Quoted, false, true); + for (const Arg *A : Args.filtered(OPT_isystem, OPT_iwithsysroot)) + Opts.AddPath(A->getValue(), frontend::System, false, + !A->getOption().matches(OPT_iwithsysroot)); + for (const Arg *A : Args.filtered(OPT_iframework)) + Opts.AddPath(A->getValue(), frontend::System, true, true); // Add the paths for the various language specific isystem flags. - for (arg_iterator it = Args.filtered_begin(OPT_c_isystem), - ie = Args.filtered_end(); it != ie; ++it) - Opts.AddPath((*it)->getValue(), frontend::CSystem, false, true); - for (arg_iterator it = Args.filtered_begin(OPT_cxx_isystem), - ie = Args.filtered_end(); it != ie; ++it) - Opts.AddPath((*it)->getValue(), frontend::CXXSystem, false, true); - for (arg_iterator it = Args.filtered_begin(OPT_objc_isystem), - ie = Args.filtered_end(); it != ie; ++it) - Opts.AddPath((*it)->getValue(), frontend::ObjCSystem, false,true); - for (arg_iterator it = Args.filtered_begin(OPT_objcxx_isystem), - ie = Args.filtered_end(); it != ie; ++it) - Opts.AddPath((*it)->getValue(), frontend::ObjCXXSystem, false, true); + for (const Arg *A : Args.filtered(OPT_c_isystem)) + Opts.AddPath(A->getValue(), frontend::CSystem, false, true); + for (const Arg *A : Args.filtered(OPT_cxx_isystem)) + Opts.AddPath(A->getValue(), frontend::CXXSystem, false, true); + for (const Arg *A : Args.filtered(OPT_objc_isystem)) + Opts.AddPath(A->getValue(), frontend::ObjCSystem, false,true); + for (const Arg *A : Args.filtered(OPT_objcxx_isystem)) + Opts.AddPath(A->getValue(), frontend::ObjCXXSystem, false, true); // Add the internal paths from a driver that detects standard include paths. - for (arg_iterator I = Args.filtered_begin(OPT_internal_isystem, - OPT_internal_externc_isystem), - E = Args.filtered_end(); - I != E; ++I) { + for (const Arg *A : + Args.filtered(OPT_internal_isystem, OPT_internal_externc_isystem)) { frontend::IncludeDirGroup Group = frontend::System; - if ((*I)->getOption().matches(OPT_internal_externc_isystem)) + if (A->getOption().matches(OPT_internal_externc_isystem)) Group = frontend::ExternCSystem; - Opts.AddPath((*I)->getValue(), Group, false, true); + Opts.AddPath(A->getValue(), Group, false, true); } // Add the path prefixes which are implicitly treated as being system headers. - for (arg_iterator I = Args.filtered_begin(OPT_system_header_prefix, - OPT_no_system_header_prefix), - E = Args.filtered_end(); - I != E; ++I) + for (const Arg *A : + Args.filtered(OPT_system_header_prefix, OPT_no_system_header_prefix)) Opts.AddSystemHeaderPrefix( - (*I)->getValue(), (*I)->getOption().matches(OPT_system_header_prefix)); + A->getValue(), A->getOption().matches(OPT_system_header_prefix)); - for (arg_iterator I = Args.filtered_begin(OPT_ivfsoverlay), - E = Args.filtered_end(); I != E; ++I) - Opts.AddVFSOverlayFile((*I)->getValue()); + for (const Arg *A : Args.filtered(OPT_ivfsoverlay)) + Opts.AddVFSOverlayFile(A->getValue()); } void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK, @@ -1708,11 +1678,8 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, Opts.DisablePCHValidation = Args.hasArg(OPT_fno_validate_pch); Opts.DumpDeserializedPCHDecls = Args.hasArg(OPT_dump_deserialized_pch_decls); - for (arg_iterator it = Args.filtered_begin(OPT_error_on_deserialized_pch_decl), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; + for (const Arg *A : Args.filtered(OPT_error_on_deserialized_pch_decl)) Opts.DeserializedPCHDeclsToErrorOn.insert(A->getValue()); - } if (const Arg *A = Args.getLastArg(OPT_preamble_bytes_EQ)) { StringRef Value(A->getValue()); @@ -1731,38 +1698,28 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, } // Add macros from the command line. - for (arg_iterator it = Args.filtered_begin(OPT_D, OPT_U), - ie = Args.filtered_end(); it != ie; ++it) { - if ((*it)->getOption().matches(OPT_D)) - Opts.addMacroDef((*it)->getValue()); + for (const Arg *A : Args.filtered(OPT_D, OPT_U)) { + if (A->getOption().matches(OPT_D)) + Opts.addMacroDef(A->getValue()); else - Opts.addMacroUndef((*it)->getValue()); + Opts.addMacroUndef(A->getValue()); } Opts.MacroIncludes = Args.getAllArgValues(OPT_imacros); // Add the ordered list of -includes. - for (arg_iterator it = Args.filtered_begin(OPT_include), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; - Opts.Includes.push_back(A->getValue()); - } + for (const Arg *A : Args.filtered(OPT_include)) + Opts.Includes.emplace_back(A->getValue()); - for (arg_iterator it = Args.filtered_begin(OPT_chain_include), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; - Opts.ChainedIncludes.push_back(A->getValue()); - } + for (const Arg *A : Args.filtered(OPT_chain_include)) + Opts.ChainedIncludes.emplace_back(A->getValue()); // Include 'altivec.h' if -faltivec option present if (Args.hasArg(OPT_faltivec)) - Opts.Includes.push_back("altivec.h"); + Opts.Includes.emplace_back("altivec.h"); - for (arg_iterator it = Args.filtered_begin(OPT_remap_file), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; - std::pair<StringRef,StringRef> Split = - StringRef(A->getValue()).split(';'); + for (const Arg *A : Args.filtered(OPT_remap_file)) { + std::pair<StringRef, StringRef> Split = StringRef(A->getValue()).split(';'); if (Split.second.empty()) { Diags.Report(diag::err_drv_invalid_remap_file) << A->getAsString(Args); @@ -1771,7 +1728,7 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, Opts.addRemappedFile(Split.first, Split.second); } - + if (Arg *A = Args.getLastArg(OPT_fobjc_arc_cxxlib_EQ)) { StringRef Name = A->getValue(); unsigned Library = llvm::StringSwitch<unsigned>(Name) @@ -1874,24 +1831,22 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, } // Issue errors on unknown arguments. - for (arg_iterator it = Args->filtered_begin(OPT_UNKNOWN), - ie = Args->filtered_end(); it != ie; ++it) { - Diags.Report(diag::err_drv_unknown_argument) << (*it)->getAsString(*Args); + for (const Arg *A : Args->filtered(OPT_UNKNOWN)) { + Diags.Report(diag::err_drv_unknown_argument) << A->getAsString(*Args); Success = false; } - Success = ParseAnalyzerArgs(*Res.getAnalyzerOpts(), *Args, Diags) && Success; - Success = ParseMigratorArgs(Res.getMigratorOpts(), *Args) && Success; + Success &= ParseAnalyzerArgs(*Res.getAnalyzerOpts(), *Args, Diags); + Success &= ParseMigratorArgs(Res.getMigratorOpts(), *Args); ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), *Args); - Success = ParseDiagnosticArgs(Res.getDiagnosticOpts(), *Args, &Diags) - && Success; + Success &= ParseDiagnosticArgs(Res.getDiagnosticOpts(), *Args, &Diags); ParseCommentArgs(Res.getLangOpts()->CommentOpts, *Args); ParseFileSystemArgs(Res.getFileSystemOpts(), *Args); // FIXME: We shouldn't have to pass the DashX option around here InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), *Args, Diags); ParseTargetArgs(Res.getTargetOpts(), *Args); - Success = ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags, - Res.getTargetOpts()) && Success; + Success &= ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags, + Res.getTargetOpts()); ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), *Args); if (DashX != IK_AST && DashX != IK_LLVM_IR) { ParseLangArgs(*Res.getLangOpts(), *Args, DashX, Diags); diff --git a/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp b/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp index 2bd999e..bf8470e 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp @@ -65,7 +65,7 @@ public: /// AddSystemHeaderPrefix - Add the specified prefix to the system header /// prefix list. void AddSystemHeaderPrefix(StringRef Prefix, bool IsSystemHeader) { - SystemHeaderPrefixes.push_back(std::make_pair(Prefix, IsSystemHeader)); + SystemHeaderPrefixes.emplace_back(Prefix, IsSystemHeader); } /// AddGnuCPlusPlusIncludePaths - Add the necessary paths to support a gnu diff --git a/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp index 037a6a5..6192554 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -128,7 +128,7 @@ public: CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, const Module *Imported) override; - void Ident(SourceLocation Loc, const std::string &str) override; + void Ident(SourceLocation Loc, StringRef str) override; void PragmaMessage(SourceLocation Loc, StringRef Namespace, PragmaMessageKind Kind, StringRef Str) override; void PragmaDebug(SourceLocation Loc, StringRef DebugType) override; @@ -337,11 +337,11 @@ void PrintPPOutputPPCallbacks::InclusionDirective(SourceLocation HashLoc, /// Ident - Handle #ident directives when read by the preprocessor. /// -void PrintPPOutputPPCallbacks::Ident(SourceLocation Loc, const std::string &S) { +void PrintPPOutputPPCallbacks::Ident(SourceLocation Loc, StringRef S) { MoveToLine(Loc); OS.write("#ident ", strlen("#ident ")); - OS.write(&S[0], S.size()); + OS.write(S.begin(), S.size()); EmittedTokensOnThisLine = true; } diff --git a/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp b/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp index 9c6bebb..d49e983 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp @@ -30,17 +30,17 @@ void TextDiagnosticBuffer::HandleDiagnostic(DiagnosticsEngine::Level Level, default: llvm_unreachable( "Diagnostic not handled during diagnostic buffering!"); case DiagnosticsEngine::Note: - Notes.push_back(std::make_pair(Info.getLocation(), Buf.str())); + Notes.emplace_back(Info.getLocation(), Buf.str()); break; case DiagnosticsEngine::Warning: - Warnings.push_back(std::make_pair(Info.getLocation(), Buf.str())); + Warnings.emplace_back(Info.getLocation(), Buf.str()); break; case DiagnosticsEngine::Remark: - Remarks.push_back(std::make_pair(Info.getLocation(), Buf.str())); + Remarks.emplace_back(Info.getLocation(), Buf.str()); break; case DiagnosticsEngine::Error: case DiagnosticsEngine::Fatal: - Errors.push_back(std::make_pair(Info.getLocation(), Buf.str())); + Errors.emplace_back(Info.getLocation(), Buf.str()); break; } } diff --git a/contrib/llvm/tools/clang/lib/Headers/altivec.h b/contrib/llvm/tools/clang/lib/Headers/altivec.h index 1f8c831..7427ed5 100644 --- a/contrib/llvm/tools/clang/lib/Headers/altivec.h +++ b/contrib/llvm/tools/clang/lib/Headers/altivec.h @@ -29,251 +29,215 @@ /* constants for mapping CR6 bits to predicate result. */ -#define __CR6_EQ 0 +#define __CR6_EQ 0 #define __CR6_EQ_REV 1 -#define __CR6_LT 2 +#define __CR6_LT 2 #define __CR6_LT_REV 3 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__)) -static vector signed char __ATTRS_o_ai -vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c); +static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a, + vector signed char __b, + vector unsigned char __c); -static vector unsigned char __ATTRS_o_ai -vec_perm(vector unsigned char __a, - vector unsigned char __b, - vector unsigned char __c); +static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a, + vector unsigned char __b, + vector unsigned char __c); -static vector bool char __ATTRS_o_ai -vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c); +static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a, + vector bool char __b, + vector unsigned char __c); -static vector short __ATTRS_o_ai -vec_perm(vector short __a, vector short __b, vector unsigned char __c); +static vector short __ATTRS_o_ai vec_perm(vector short __a, vector short __b, + vector unsigned char __c); -static vector unsigned short __ATTRS_o_ai -vec_perm(vector unsigned short __a, - vector unsigned short __b, - vector unsigned char __c); +static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a, + vector unsigned short __b, + vector unsigned char __c); -static vector bool short __ATTRS_o_ai -vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c); +static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a, + vector bool short __b, + vector unsigned char __c); -static vector pixel __ATTRS_o_ai -vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c); +static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b, + vector unsigned char __c); -static vector int __ATTRS_o_ai -vec_perm(vector int __a, vector int __b, vector unsigned char __c); +static vector int __ATTRS_o_ai vec_perm(vector int __a, vector int __b, + vector unsigned char __c); -static vector unsigned int __ATTRS_o_ai -vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c); +static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a, + vector unsigned int __b, + vector unsigned char __c); -static vector bool int __ATTRS_o_ai -vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c); +static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a, + vector bool int __b, + vector unsigned char __c); -static vector float __ATTRS_o_ai -vec_perm(vector float __a, vector float __b, vector unsigned char __c); +static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b, + vector unsigned char __c); #ifdef __VSX__ -static vector long long __ATTRS_o_ai -vec_perm(vector long long __a, vector long long __b, vector unsigned char __c); +static vector long long __ATTRS_o_ai vec_perm(vector long long __a, + vector long long __b, + vector unsigned char __c); static vector unsigned long long __ATTRS_o_ai vec_perm(vector unsigned long long __a, vector unsigned long long __b, vector unsigned char __c); -static vector double __ATTRS_o_ai -vec_perm(vector double __a, vector double __b, vector unsigned char __c); +static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b, + vector unsigned char __c); #endif -static vector unsigned char __ATTRS_o_ai -vec_xor(vector unsigned char __a, vector unsigned char __b); +static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, + vector unsigned char __b); /* vec_abs */ #define __builtin_altivec_abs_v16qi vec_abs -#define __builtin_altivec_abs_v8hi vec_abs -#define __builtin_altivec_abs_v4si vec_abs +#define __builtin_altivec_abs_v8hi vec_abs +#define __builtin_altivec_abs_v4si vec_abs -static vector signed char __ATTRS_o_ai -vec_abs(vector signed char __a) -{ +static vector signed char __ATTRS_o_ai vec_abs(vector signed char __a) { return __builtin_altivec_vmaxsb(__a, -__a); } -static vector signed short __ATTRS_o_ai -vec_abs(vector signed short __a) -{ +static vector signed short __ATTRS_o_ai vec_abs(vector signed short __a) { return __builtin_altivec_vmaxsh(__a, -__a); } -static vector signed int __ATTRS_o_ai -vec_abs(vector signed int __a) -{ +static vector signed int __ATTRS_o_ai vec_abs(vector signed int __a) { return __builtin_altivec_vmaxsw(__a, -__a); } -static vector float __ATTRS_o_ai -vec_abs(vector float __a) -{ - vector unsigned int __res = (vector unsigned int)__a - & (vector unsigned int)(0x7FFFFFFF); +static vector float __ATTRS_o_ai vec_abs(vector float __a) { + vector unsigned int __res = + (vector unsigned int)__a & (vector unsigned int)(0x7FFFFFFF); return (vector float)__res; } /* vec_abss */ #define __builtin_altivec_abss_v16qi vec_abss -#define __builtin_altivec_abss_v8hi vec_abss -#define __builtin_altivec_abss_v4si vec_abss +#define __builtin_altivec_abss_v8hi vec_abss +#define __builtin_altivec_abss_v4si vec_abss -static vector signed char __ATTRS_o_ai -vec_abss(vector signed char __a) -{ - return __builtin_altivec_vmaxsb - (__a, __builtin_altivec_vsubsbs((vector signed char)(0), __a)); +static vector signed char __ATTRS_o_ai vec_abss(vector signed char __a) { + return __builtin_altivec_vmaxsb( + __a, __builtin_altivec_vsubsbs((vector signed char)(0), __a)); } -static vector signed short __ATTRS_o_ai -vec_abss(vector signed short __a) -{ - return __builtin_altivec_vmaxsh - (__a, __builtin_altivec_vsubshs((vector signed short)(0), __a)); +static vector signed short __ATTRS_o_ai vec_abss(vector signed short __a) { + return __builtin_altivec_vmaxsh( + __a, __builtin_altivec_vsubshs((vector signed short)(0), __a)); } -static vector signed int __ATTRS_o_ai -vec_abss(vector signed int __a) -{ - return __builtin_altivec_vmaxsw - (__a, __builtin_altivec_vsubsws((vector signed int)(0), __a)); +static vector signed int __ATTRS_o_ai vec_abss(vector signed int __a) { + return __builtin_altivec_vmaxsw( + __a, __builtin_altivec_vsubsws((vector signed int)(0), __a)); } /* vec_add */ -static vector signed char __ATTRS_o_ai -vec_add(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_add(vector signed char __a, + vector signed char __b) { return __a + __b; } -static vector signed char __ATTRS_o_ai -vec_add(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_add(vector bool char __a, + vector signed char __b) { return (vector signed char)__a + __b; } -static vector signed char __ATTRS_o_ai -vec_add(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_add(vector signed char __a, + vector bool char __b) { return __a + (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_add(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a, + vector unsigned char __b) { return __a + __b; } -static vector unsigned char __ATTRS_o_ai -vec_add(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_add(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a + __b; } -static vector unsigned char __ATTRS_o_ai -vec_add(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a, + vector bool char __b) { return __a + (vector unsigned char)__b; } -static vector short __ATTRS_o_ai -vec_add(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_add(vector short __a, vector short __b) { return __a + __b; } -static vector short __ATTRS_o_ai -vec_add(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_add(vector bool short __a, + vector short __b) { return (vector short)__a + __b; } -static vector short __ATTRS_o_ai -vec_add(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_add(vector short __a, + vector bool short __b) { return __a + (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_add(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a, + vector unsigned short __b) { return __a + __b; } -static vector unsigned short __ATTRS_o_ai -vec_add(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_add(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a + __b; } -static vector unsigned short __ATTRS_o_ai -vec_add(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a, + vector bool short __b) { return __a + (vector unsigned short)__b; } -static vector int __ATTRS_o_ai -vec_add(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_add(vector int __a, vector int __b) { return __a + __b; } -static vector int __ATTRS_o_ai -vec_add(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_add(vector bool int __a, vector int __b) { return (vector int)__a + __b; } -static vector int __ATTRS_o_ai -vec_add(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_add(vector int __a, vector bool int __b) { return __a + (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_add(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a, + vector unsigned int __b) { return __a + __b; } -static vector unsigned int __ATTRS_o_ai -vec_add(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_add(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a + __b; } -static vector unsigned int __ATTRS_o_ai -vec_add(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a, + vector bool int __b) { return __a + (vector unsigned int)__b; } #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) -static vector signed __int128 __ATTRS_o_ai -vec_add(vector signed __int128 __a, vector signed __int128 __b) -{ +static vector signed __int128 __ATTRS_o_ai vec_add(vector signed __int128 __a, + vector signed __int128 __b) { return __a + __b; } static vector unsigned __int128 __ATTRS_o_ai -vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) -{ +vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __a + __b; } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) -static vector float __ATTRS_o_ai -vec_add(vector float __a, vector float __b) -{ +static vector float __ATTRS_o_ai vec_add(vector float __a, vector float __b) { return __a + __b; } @@ -281,39 +245,33 @@ vec_add(vector float __a, vector float __b) #define __builtin_altivec_vaddubm vec_vaddubm -static vector signed char __ATTRS_o_ai -vec_vaddubm(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a, + vector signed char __b) { return __a + __b; } -static vector signed char __ATTRS_o_ai -vec_vaddubm(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vaddubm(vector bool char __a, + vector signed char __b) { return (vector signed char)__a + __b; } -static vector signed char __ATTRS_o_ai -vec_vaddubm(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a, + vector bool char __b) { return __a + (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_vaddubm(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a, + vector unsigned char __b) { return __a + __b; } -static vector unsigned char __ATTRS_o_ai -vec_vaddubm(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a + __b; } -static vector unsigned char __ATTRS_o_ai -vec_vaddubm(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a, + vector bool char __b) { return __a + (vector unsigned char)__b; } @@ -321,39 +279,33 @@ vec_vaddubm(vector unsigned char __a, vector bool char __b) #define __builtin_altivec_vadduhm vec_vadduhm -static vector short __ATTRS_o_ai -vec_vadduhm(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vadduhm(vector short __a, + vector short __b) { return __a + __b; } -static vector short __ATTRS_o_ai -vec_vadduhm(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vadduhm(vector bool short __a, + vector short __b) { return (vector short)__a + __b; } -static vector short __ATTRS_o_ai -vec_vadduhm(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vadduhm(vector short __a, + vector bool short __b) { return __a + (vector short)__b; } static vector unsigned short __ATTRS_o_ai -vec_vadduhm(vector unsigned short __a, vector unsigned short __b) -{ +vec_vadduhm(vector unsigned short __a, vector unsigned short __b) { return __a + __b; } static vector unsigned short __ATTRS_o_ai -vec_vadduhm(vector bool short __a, vector unsigned short __b) -{ +vec_vadduhm(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a + __b; } -static vector unsigned short __ATTRS_o_ai -vec_vadduhm(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vadduhm(vector unsigned short __a, + vector bool short __b) { return __a + (vector unsigned short)__b; } @@ -361,57 +313,48 @@ vec_vadduhm(vector unsigned short __a, vector bool short __b) #define __builtin_altivec_vadduwm vec_vadduwm -static vector int __ATTRS_o_ai -vec_vadduwm(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b) { return __a + __b; } -static vector int __ATTRS_o_ai -vec_vadduwm(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vadduwm(vector bool int __a, + vector int __b) { return (vector int)__a + __b; } -static vector int __ATTRS_o_ai -vec_vadduwm(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vadduwm(vector int __a, + vector bool int __b) { return __a + (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_vadduwm(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a, + vector unsigned int __b) { return __a + __b; } -static vector unsigned int __ATTRS_o_ai -vec_vadduwm(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a + __b; } -static vector unsigned int __ATTRS_o_ai -vec_vadduwm(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a, + vector bool int __b) { return __a + (vector unsigned int)__b; } /* vec_vaddfp */ -#define __builtin_altivec_vaddfp vec_vaddfp +#define __builtin_altivec_vaddfp vec_vaddfp static vector float __attribute__((__always_inline__)) -vec_vaddfp(vector float __a, vector float __b) -{ +vec_vaddfp(vector float __a, vector float __b) { return __a + __b; } /* vec_addc */ -static vector unsigned int __ATTRS_o_ai -vec_addc(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_addc(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vaddcuw(__a, __b); } @@ -430,238 +373,196 @@ vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) { /* vec_vaddcuw */ static vector unsigned int __attribute__((__always_inline__)) -vec_vaddcuw(vector unsigned int __a, vector unsigned int __b) -{ +vec_vaddcuw(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vaddcuw(__a, __b); } /* vec_adds */ -static vector signed char __ATTRS_o_ai -vec_adds(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vaddsbs(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_adds(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_adds(vector bool char __a, + vector signed char __b) { return __builtin_altivec_vaddsbs((vector signed char)__a, __b); } -static vector signed char __ATTRS_o_ai -vec_adds(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vaddsbs(__a, (vector signed char)__b); } -static vector unsigned char __ATTRS_o_ai -vec_adds(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vaddubs(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_adds(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_adds(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vaddubs((vector unsigned char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_adds(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b); } -static vector short __ATTRS_o_ai -vec_adds(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_adds(vector short __a, vector short __b) { return __builtin_altivec_vaddshs(__a, __b); } -static vector short __ATTRS_o_ai -vec_adds(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_adds(vector bool short __a, + vector short __b) { return __builtin_altivec_vaddshs((vector short)__a, __b); } -static vector short __ATTRS_o_ai -vec_adds(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_adds(vector short __a, + vector bool short __b) { return __builtin_altivec_vaddshs(__a, (vector short)__b); } -static vector unsigned short __ATTRS_o_ai -vec_adds(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vadduhs(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_adds(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_adds(vector bool short __a, + vector unsigned short __b) { return __builtin_altivec_vadduhs((vector unsigned short)__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_adds(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a, + vector bool short __b) { return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b); } -static vector int __ATTRS_o_ai -vec_adds(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_adds(vector int __a, vector int __b) { return __builtin_altivec_vaddsws(__a, __b); } -static vector int __ATTRS_o_ai -vec_adds(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_adds(vector bool int __a, vector int __b) { return __builtin_altivec_vaddsws((vector int)__a, __b); } -static vector int __ATTRS_o_ai -vec_adds(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_adds(vector int __a, vector bool int __b) { return __builtin_altivec_vaddsws(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_adds(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vadduws(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_adds(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_adds(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vadduws((vector unsigned int)__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_adds(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vadduws(__a, (vector unsigned int)__b); } /* vec_vaddsbs */ -static vector signed char __ATTRS_o_ai -vec_vaddsbs(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vaddsbs(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_vaddsbs(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vaddsbs(vector bool char __a, + vector signed char __b) { return __builtin_altivec_vaddsbs((vector signed char)__a, __b); } -static vector signed char __ATTRS_o_ai -vec_vaddsbs(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vaddsbs(__a, (vector signed char)__b); } /* vec_vaddubs */ -static vector unsigned char __ATTRS_o_ai -vec_vaddubs(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vaddubs(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vaddubs(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vaddubs((vector unsigned char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vaddubs(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b); } /* vec_vaddshs */ -static vector short __ATTRS_o_ai -vec_vaddshs(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vaddshs(vector short __a, + vector short __b) { return __builtin_altivec_vaddshs(__a, __b); } -static vector short __ATTRS_o_ai -vec_vaddshs(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vaddshs(vector bool short __a, + vector short __b) { return __builtin_altivec_vaddshs((vector short)__a, __b); } -static vector short __ATTRS_o_ai -vec_vaddshs(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vaddshs(vector short __a, + vector bool short __b) { return __builtin_altivec_vaddshs(__a, (vector short)__b); } /* vec_vadduhs */ static vector unsigned short __ATTRS_o_ai -vec_vadduhs(vector unsigned short __a, vector unsigned short __b) -{ +vec_vadduhs(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vadduhs(__a, __b); } static vector unsigned short __ATTRS_o_ai -vec_vadduhs(vector bool short __a, vector unsigned short __b) -{ +vec_vadduhs(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vadduhs((vector unsigned short)__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_vadduhs(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a, + vector bool short __b) { return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b); } /* vec_vaddsws */ -static vector int __ATTRS_o_ai -vec_vaddsws(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b) { return __builtin_altivec_vaddsws(__a, __b); } -static vector int __ATTRS_o_ai -vec_vaddsws(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vaddsws(vector bool int __a, + vector int __b) { return __builtin_altivec_vaddsws((vector int)__a, __b); } -static vector int __ATTRS_o_ai -vec_vaddsws(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vaddsws(vector int __a, + vector bool int __b) { return __builtin_altivec_vaddsws(__a, (vector int)__b); } /* vec_vadduws */ -static vector unsigned int __ATTRS_o_ai -vec_vadduws(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vadduws(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vadduws(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vadduws(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vadduws((vector unsigned int)__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vadduws(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vadduws(__a, (vector unsigned int)__b); } @@ -669,14 +570,12 @@ vec_vadduws(vector unsigned int __a, vector bool int __b) /* vec_vadduqm */ static vector signed __int128 __ATTRS_o_ai -vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b) -{ +vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b) { return __a + __b; } static vector unsigned __int128 __ATTRS_o_ai -vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) -{ +vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __a + __b; } @@ -697,14 +596,12 @@ vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b, /* vec_vaddcuq */ static vector signed __int128 __ATTRS_o_ai -vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) -{ +vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) { return __builtin_altivec_vaddcuq(__a, __b); } static vector unsigned __int128 __ATTRS_o_ai -vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) -{ +vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __builtin_altivec_vaddcuq(__a, __b); } @@ -727,1667 +624,1507 @@ vec_vaddecuq(vector unsigned __int128 __a, vector unsigned __int128 __b, #define __builtin_altivec_vand vec_and -static vector signed char __ATTRS_o_ai -vec_and(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_and(vector signed char __a, + vector signed char __b) { return __a & __b; } -static vector signed char __ATTRS_o_ai -vec_and(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_and(vector bool char __a, + vector signed char __b) { return (vector signed char)__a & __b; } -static vector signed char __ATTRS_o_ai -vec_and(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_and(vector signed char __a, + vector bool char __b) { return __a & (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_and(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a, + vector unsigned char __b) { return __a & __b; } -static vector unsigned char __ATTRS_o_ai -vec_and(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_and(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a & __b; } -static vector unsigned char __ATTRS_o_ai -vec_and(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a, + vector bool char __b) { return __a & (vector unsigned char)__b; } -static vector bool char __ATTRS_o_ai -vec_and(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_and(vector bool char __a, + vector bool char __b) { return __a & __b; } -static vector short __ATTRS_o_ai -vec_and(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_and(vector short __a, vector short __b) { return __a & __b; } -static vector short __ATTRS_o_ai -vec_and(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_and(vector bool short __a, + vector short __b) { return (vector short)__a & __b; } -static vector short __ATTRS_o_ai -vec_and(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_and(vector short __a, + vector bool short __b) { return __a & (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_and(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a, + vector unsigned short __b) { return __a & __b; } -static vector unsigned short __ATTRS_o_ai -vec_and(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_and(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a & __b; } -static vector unsigned short __ATTRS_o_ai -vec_and(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a, + vector bool short __b) { return __a & (vector unsigned short)__b; } -static vector bool short __ATTRS_o_ai -vec_and(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_and(vector bool short __a, + vector bool short __b) { return __a & __b; } -static vector int __ATTRS_o_ai -vec_and(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_and(vector int __a, vector int __b) { return __a & __b; } -static vector int __ATTRS_o_ai -vec_and(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_and(vector bool int __a, vector int __b) { return (vector int)__a & __b; } -static vector int __ATTRS_o_ai -vec_and(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_and(vector int __a, vector bool int __b) { return __a & (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_and(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a, + vector unsigned int __b) { return __a & __b; } -static vector unsigned int __ATTRS_o_ai -vec_and(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_and(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a & __b; } -static vector unsigned int __ATTRS_o_ai -vec_and(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a, + vector bool int __b) { return __a & (vector unsigned int)__b; } -static vector bool int __ATTRS_o_ai -vec_and(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_and(vector bool int __a, + vector bool int __b) { return __a & __b; } -static vector float __ATTRS_o_ai -vec_and(vector float __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_and(vector float __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_and(vector bool int __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_and(vector bool int __a, + vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_and(vector float __a, vector bool int __b) -{ - vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_and(vector float __a, + vector bool int __b) { + vector unsigned int __res = + (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_and(vector signed long long __a, vector signed long long __b) { + return __a & __b; +} + +static vector signed long long __ATTRS_o_ai +vec_and(vector bool long long __a, vector signed long long __b) { + return (vector signed long long)__a & __b; +} + +static vector signed long long __ATTRS_o_ai vec_and(vector signed long long __a, + vector bool long long __b) { + return __a & (vector signed long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_and(vector unsigned long long __a, vector unsigned long long __b) { + return __a & __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_and(vector bool long long __a, vector unsigned long long __b) { + return (vector unsigned long long)__a & __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_and(vector unsigned long long __a, vector bool long long __b) { + return __a & (vector unsigned long long)__b; +} + +static vector bool long long __ATTRS_o_ai vec_and(vector bool long long __a, + vector bool long long __b) { + return __a & __b; +} +#endif + /* vec_vand */ -static vector signed char __ATTRS_o_ai -vec_vand(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a, + vector signed char __b) { return __a & __b; } -static vector signed char __ATTRS_o_ai -vec_vand(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vand(vector bool char __a, + vector signed char __b) { return (vector signed char)__a & __b; } -static vector signed char __ATTRS_o_ai -vec_vand(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a, + vector bool char __b) { return __a & (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_vand(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a, + vector unsigned char __b) { return __a & __b; } -static vector unsigned char __ATTRS_o_ai -vec_vand(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vand(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a & __b; } -static vector unsigned char __ATTRS_o_ai -vec_vand(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a, + vector bool char __b) { return __a & (vector unsigned char)__b; } -static vector bool char __ATTRS_o_ai -vec_vand(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_vand(vector bool char __a, + vector bool char __b) { return __a & __b; } -static vector short __ATTRS_o_ai -vec_vand(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vand(vector short __a, vector short __b) { return __a & __b; } -static vector short __ATTRS_o_ai -vec_vand(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vand(vector bool short __a, + vector short __b) { return (vector short)__a & __b; } -static vector short __ATTRS_o_ai -vec_vand(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vand(vector short __a, + vector bool short __b) { return __a & (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_vand(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a, + vector unsigned short __b) { return __a & __b; } -static vector unsigned short __ATTRS_o_ai -vec_vand(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vand(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a & __b; } -static vector unsigned short __ATTRS_o_ai -vec_vand(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a, + vector bool short __b) { return __a & (vector unsigned short)__b; } -static vector bool short __ATTRS_o_ai -vec_vand(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_vand(vector bool short __a, + vector bool short __b) { return __a & __b; } -static vector int __ATTRS_o_ai -vec_vand(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vand(vector int __a, vector int __b) { return __a & __b; } -static vector int __ATTRS_o_ai -vec_vand(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vand(vector bool int __a, vector int __b) { return (vector int)__a & __b; } -static vector int __ATTRS_o_ai -vec_vand(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vand(vector int __a, vector bool int __b) { return __a & (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_vand(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a, + vector unsigned int __b) { return __a & __b; } -static vector unsigned int __ATTRS_o_ai -vec_vand(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vand(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a & __b; } -static vector unsigned int __ATTRS_o_ai -vec_vand(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a, + vector bool int __b) { return __a & (vector unsigned int)__b; } -static vector bool int __ATTRS_o_ai -vec_vand(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_vand(vector bool int __a, + vector bool int __b) { return __a & __b; } -static vector float __ATTRS_o_ai -vec_vand(vector float __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vand(vector float __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vand(vector bool int __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vand(vector bool int __a, + vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vand(vector float __a, vector bool int __b) -{ - vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vand(vector float __a, + vector bool int __b) { + vector unsigned int __res = + (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_vand(vector signed long long __a, vector signed long long __b) { + return __a & __b; +} + +static vector signed long long __ATTRS_o_ai +vec_vand(vector bool long long __a, vector signed long long __b) { + return (vector signed long long)__a & __b; +} + +static vector signed long long __ATTRS_o_ai +vec_vand(vector signed long long __a, vector bool long long __b) { + return __a & (vector signed long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vand(vector unsigned long long __a, vector unsigned long long __b) { + return __a & __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vand(vector bool long long __a, vector unsigned long long __b) { + return (vector unsigned long long)__a & __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vand(vector unsigned long long __a, vector bool long long __b) { + return __a & (vector unsigned long long)__b; +} + +static vector bool long long __ATTRS_o_ai vec_vand(vector bool long long __a, + vector bool long long __b) { + return __a & __b; +} +#endif + /* vec_andc */ #define __builtin_altivec_vandc vec_andc -static vector signed char __ATTRS_o_ai -vec_andc(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, + vector signed char __b) { return __a & ~__b; } -static vector signed char __ATTRS_o_ai -vec_andc(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_andc(vector bool char __a, + vector signed char __b) { return (vector signed char)__a & ~__b; } -static vector signed char __ATTRS_o_ai -vec_andc(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, + vector bool char __b) { return __a & ~(vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_andc(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a, + vector unsigned char __b) { return __a & ~__b; } -static vector unsigned char __ATTRS_o_ai -vec_andc(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_andc(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a & ~__b; } -static vector unsigned char __ATTRS_o_ai -vec_andc(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a, + vector bool char __b) { return __a & ~(vector unsigned char)__b; } -static vector bool char __ATTRS_o_ai -vec_andc(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_andc(vector bool char __a, + vector bool char __b) { return __a & ~__b; } -static vector short __ATTRS_o_ai -vec_andc(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_andc(vector short __a, vector short __b) { return __a & ~__b; } -static vector short __ATTRS_o_ai -vec_andc(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_andc(vector bool short __a, + vector short __b) { return (vector short)__a & ~__b; } -static vector short __ATTRS_o_ai -vec_andc(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_andc(vector short __a, + vector bool short __b) { return __a & ~(vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_andc(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a, + vector unsigned short __b) { return __a & ~__b; } -static vector unsigned short __ATTRS_o_ai -vec_andc(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_andc(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a & ~__b; } -static vector unsigned short __ATTRS_o_ai -vec_andc(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a, + vector bool short __b) { return __a & ~(vector unsigned short)__b; } -static vector bool short __ATTRS_o_ai -vec_andc(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_andc(vector bool short __a, + vector bool short __b) { return __a & ~__b; } -static vector int __ATTRS_o_ai -vec_andc(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_andc(vector int __a, vector int __b) { return __a & ~__b; } -static vector int __ATTRS_o_ai -vec_andc(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_andc(vector bool int __a, vector int __b) { return (vector int)__a & ~__b; } -static vector int __ATTRS_o_ai -vec_andc(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_andc(vector int __a, vector bool int __b) { return __a & ~(vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_andc(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a, + vector unsigned int __b) { return __a & ~__b; } -static vector unsigned int __ATTRS_o_ai -vec_andc(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_andc(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a & ~__b; } -static vector unsigned int __ATTRS_o_ai -vec_andc(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a, + vector bool int __b) { return __a & ~(vector unsigned int)__b; } -static vector bool int __ATTRS_o_ai -vec_andc(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_andc(vector bool int __a, + vector bool int __b) { return __a & ~__b; } -static vector float __ATTRS_o_ai -vec_andc(vector float __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_andc(vector float __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_andc(vector bool int __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_andc(vector bool int __a, + vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_andc(vector float __a, vector bool int __b) -{ - vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_andc(vector float __a, + vector bool int __b) { + vector unsigned int __res = + (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_andc(vector signed long long __a, vector signed long long __b) { + return __a & ~__b; +} + +static vector signed long long __ATTRS_o_ai +vec_andc(vector bool long long __a, vector signed long long __b) { + return (vector signed long long)__a & ~__b; +} + +static vector signed long long __ATTRS_o_ai +vec_andc(vector signed long long __a, vector bool long long __b) { + return __a & ~(vector signed long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_andc(vector unsigned long long __a, vector unsigned long long __b) { + return __a & ~__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_andc(vector bool long long __a, vector unsigned long long __b) { + return (vector unsigned long long)__a & ~__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_andc(vector unsigned long long __a, vector bool long long __b) { + return __a & ~(vector unsigned long long)__b; +} + +static vector bool long long __ATTRS_o_ai vec_andc(vector bool long long __a, + vector bool long long __b) { + return __a & ~__b; +} +#endif + /* vec_vandc */ -static vector signed char __ATTRS_o_ai -vec_vandc(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a, + vector signed char __b) { return __a & ~__b; } -static vector signed char __ATTRS_o_ai -vec_vandc(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vandc(vector bool char __a, + vector signed char __b) { return (vector signed char)__a & ~__b; } -static vector signed char __ATTRS_o_ai -vec_vandc(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a, + vector bool char __b) { return __a & ~(vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_vandc(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a, + vector unsigned char __b) { return __a & ~__b; } -static vector unsigned char __ATTRS_o_ai -vec_vandc(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vandc(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a & ~__b; } -static vector unsigned char __ATTRS_o_ai -vec_vandc(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a, + vector bool char __b) { return __a & ~(vector unsigned char)__b; } -static vector bool char __ATTRS_o_ai -vec_vandc(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_vandc(vector bool char __a, + vector bool char __b) { return __a & ~__b; } -static vector short __ATTRS_o_ai -vec_vandc(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vandc(vector short __a, vector short __b) { return __a & ~__b; } -static vector short __ATTRS_o_ai -vec_vandc(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vandc(vector bool short __a, + vector short __b) { return (vector short)__a & ~__b; } -static vector short __ATTRS_o_ai -vec_vandc(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vandc(vector short __a, + vector bool short __b) { return __a & ~(vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_vandc(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a, + vector unsigned short __b) { return __a & ~__b; } -static vector unsigned short __ATTRS_o_ai -vec_vandc(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vandc(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a & ~__b; } -static vector unsigned short __ATTRS_o_ai -vec_vandc(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a, + vector bool short __b) { return __a & ~(vector unsigned short)__b; } -static vector bool short __ATTRS_o_ai -vec_vandc(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_vandc(vector bool short __a, + vector bool short __b) { return __a & ~__b; } -static vector int __ATTRS_o_ai -vec_vandc(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector int __b) { return __a & ~__b; } -static vector int __ATTRS_o_ai -vec_vandc(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vandc(vector bool int __a, vector int __b) { return (vector int)__a & ~__b; } -static vector int __ATTRS_o_ai -vec_vandc(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector bool int __b) { return __a & ~(vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_vandc(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a, + vector unsigned int __b) { return __a & ~__b; } -static vector unsigned int __ATTRS_o_ai -vec_vandc(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vandc(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a & ~__b; } -static vector unsigned int __ATTRS_o_ai -vec_vandc(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a, + vector bool int __b) { return __a & ~(vector unsigned int)__b; } -static vector bool int __ATTRS_o_ai -vec_vandc(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_vandc(vector bool int __a, + vector bool int __b) { return __a & ~__b; } -static vector float __ATTRS_o_ai -vec_vandc(vector float __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vandc(vector float __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vandc(vector bool int __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vandc(vector bool int __a, + vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vandc(vector float __a, vector bool int __b) -{ - vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vandc(vector float __a, + vector bool int __b) { + vector unsigned int __res = + (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_vandc(vector signed long long __a, vector signed long long __b) { + return __a & ~__b; +} + +static vector signed long long __ATTRS_o_ai +vec_vandc(vector bool long long __a, vector signed long long __b) { + return (vector signed long long)__a & ~__b; +} + +static vector signed long long __ATTRS_o_ai +vec_vandc(vector signed long long __a, vector bool long long __b) { + return __a & ~(vector signed long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vandc(vector unsigned long long __a, vector unsigned long long __b) { + return __a & ~__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vandc(vector bool long long __a, vector unsigned long long __b) { + return (vector unsigned long long)__a & ~__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vandc(vector unsigned long long __a, vector bool long long __b) { + return __a & ~(vector unsigned long long)__b; +} + +static vector bool long long __ATTRS_o_ai vec_vandc(vector bool long long __a, + vector bool long long __b) { + return __a & ~__b; +} +#endif + /* vec_avg */ -static vector signed char __ATTRS_o_ai -vec_avg(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_avg(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vavgsb(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_avg(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_avg(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vavgub(__a, __b); } -static vector short __ATTRS_o_ai -vec_avg(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_avg(vector short __a, vector short __b) { return __builtin_altivec_vavgsh(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_avg(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_avg(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vavguh(__a, __b); } -static vector int __ATTRS_o_ai -vec_avg(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_avg(vector int __a, vector int __b) { return __builtin_altivec_vavgsw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_avg(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_avg(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vavguw(__a, __b); } /* vec_vavgsb */ static vector signed char __attribute__((__always_inline__)) -vec_vavgsb(vector signed char __a, vector signed char __b) -{ +vec_vavgsb(vector signed char __a, vector signed char __b) { return __builtin_altivec_vavgsb(__a, __b); } /* vec_vavgub */ static vector unsigned char __attribute__((__always_inline__)) -vec_vavgub(vector unsigned char __a, vector unsigned char __b) -{ +vec_vavgub(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vavgub(__a, __b); } /* vec_vavgsh */ static vector short __attribute__((__always_inline__)) -vec_vavgsh(vector short __a, vector short __b) -{ +vec_vavgsh(vector short __a, vector short __b) { return __builtin_altivec_vavgsh(__a, __b); } /* vec_vavguh */ static vector unsigned short __attribute__((__always_inline__)) -vec_vavguh(vector unsigned short __a, vector unsigned short __b) -{ +vec_vavguh(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vavguh(__a, __b); } /* vec_vavgsw */ static vector int __attribute__((__always_inline__)) -vec_vavgsw(vector int __a, vector int __b) -{ +vec_vavgsw(vector int __a, vector int __b) { return __builtin_altivec_vavgsw(__a, __b); } /* vec_vavguw */ static vector unsigned int __attribute__((__always_inline__)) -vec_vavguw(vector unsigned int __a, vector unsigned int __b) -{ +vec_vavguw(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vavguw(__a, __b); } /* vec_ceil */ static vector float __attribute__((__always_inline__)) -vec_ceil(vector float __a) -{ +vec_ceil(vector float __a) { return __builtin_altivec_vrfip(__a); } /* vec_vrfip */ static vector float __attribute__((__always_inline__)) -vec_vrfip(vector float __a) -{ +vec_vrfip(vector float __a) { return __builtin_altivec_vrfip(__a); } /* vec_cmpb */ static vector int __attribute__((__always_inline__)) -vec_cmpb(vector float __a, vector float __b) -{ +vec_cmpb(vector float __a, vector float __b) { return __builtin_altivec_vcmpbfp(__a, __b); } /* vec_vcmpbfp */ static vector int __attribute__((__always_inline__)) -vec_vcmpbfp(vector float __a, vector float __b) -{ +vec_vcmpbfp(vector float __a, vector float __b) { return __builtin_altivec_vcmpbfp(__a, __b); } /* vec_cmpeq */ -static vector bool char __ATTRS_o_ai -vec_cmpeq(vector signed char __a, vector signed char __b) -{ - return (vector bool char) - __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b); +static vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, + vector signed char __b) { + return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a, + (vector char)__b); } -static vector bool char __ATTRS_o_ai -vec_cmpeq(vector unsigned char __a, vector unsigned char __b) -{ - return (vector bool char) - __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b); +static vector bool char __ATTRS_o_ai vec_cmpeq(vector unsigned char __a, + vector unsigned char __b) { + return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a, + (vector char)__b); } -static vector bool short __ATTRS_o_ai -vec_cmpeq(vector short __a, vector short __b) -{ +static vector bool short __ATTRS_o_ai vec_cmpeq(vector short __a, + vector short __b) { return (vector bool short)__builtin_altivec_vcmpequh(__a, __b); } -static vector bool short __ATTRS_o_ai -vec_cmpeq(vector unsigned short __a, vector unsigned short __b) -{ - return (vector bool short) - __builtin_altivec_vcmpequh((vector short)__a, (vector short)__b); +static vector bool short __ATTRS_o_ai vec_cmpeq(vector unsigned short __a, + vector unsigned short __b) { + return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a, + (vector short)__b); } -static vector bool int __ATTRS_o_ai -vec_cmpeq(vector int __a, vector int __b) -{ +static vector bool int __ATTRS_o_ai vec_cmpeq(vector int __a, vector int __b) { return (vector bool int)__builtin_altivec_vcmpequw(__a, __b); } -static vector bool int __ATTRS_o_ai -vec_cmpeq(vector unsigned int __a, vector unsigned int __b) -{ - return (vector bool int) - __builtin_altivec_vcmpequw((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_cmpeq(vector unsigned int __a, + vector unsigned int __b) { + return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a, + (vector int)__b); } #ifdef __POWER8_VECTOR__ static vector bool long long __ATTRS_o_ai -vec_cmpeq(vector signed long long __a, vector signed long long __b) -{ - return (vector bool long long) __builtin_altivec_vcmpequd(__a, __b); +vec_cmpeq(vector signed long long __a, vector signed long long __b) { + return (vector bool long long)__builtin_altivec_vcmpequd(__a, __b); } static vector bool long long __ATTRS_o_ai -vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) -{ - return (vector bool long long) - __builtin_altivec_vcmpequd((vector long long)__a, (vector long long) __b); +vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) { + return (vector bool long long)__builtin_altivec_vcmpequd( + (vector long long)__a, (vector long long)__b); } #endif -static vector bool int __ATTRS_o_ai -vec_cmpeq(vector float __a, vector float __b) -{ +static vector bool int __ATTRS_o_ai vec_cmpeq(vector float __a, + vector float __b) { return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b); } /* vec_cmpge */ static vector bool int __attribute__((__always_inline__)) -vec_cmpge(vector float __a, vector float __b) -{ +vec_cmpge(vector float __a, vector float __b) { return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b); } /* vec_vcmpgefp */ static vector bool int __attribute__((__always_inline__)) -vec_vcmpgefp(vector float __a, vector float __b) -{ +vec_vcmpgefp(vector float __a, vector float __b) { return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b); } /* vec_cmpgt */ -static vector bool char __ATTRS_o_ai -vec_cmpgt(vector signed char __a, vector signed char __b) -{ +static vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a, + vector signed char __b) { return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b); } -static vector bool char __ATTRS_o_ai -vec_cmpgt(vector unsigned char __a, vector unsigned char __b) -{ +static vector bool char __ATTRS_o_ai vec_cmpgt(vector unsigned char __a, + vector unsigned char __b) { return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b); } -static vector bool short __ATTRS_o_ai -vec_cmpgt(vector short __a, vector short __b) -{ +static vector bool short __ATTRS_o_ai vec_cmpgt(vector short __a, + vector short __b) { return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b); } -static vector bool short __ATTRS_o_ai -vec_cmpgt(vector unsigned short __a, vector unsigned short __b) -{ +static vector bool short __ATTRS_o_ai vec_cmpgt(vector unsigned short __a, + vector unsigned short __b) { return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b); } -static vector bool int __ATTRS_o_ai -vec_cmpgt(vector int __a, vector int __b) -{ +static vector bool int __ATTRS_o_ai vec_cmpgt(vector int __a, vector int __b) { return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b); } -static vector bool int __ATTRS_o_ai -vec_cmpgt(vector unsigned int __a, vector unsigned int __b) -{ +static vector bool int __ATTRS_o_ai vec_cmpgt(vector unsigned int __a, + vector unsigned int __b) { return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b); } #ifdef __POWER8_VECTOR__ static vector bool long long __ATTRS_o_ai -vec_cmpgt(vector signed long long __a, vector signed long long __b) -{ +vec_cmpgt(vector signed long long __a, vector signed long long __b) { return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b); } static vector bool long long __ATTRS_o_ai -vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) { return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b); } #endif -static vector bool int __ATTRS_o_ai -vec_cmpgt(vector float __a, vector float __b) -{ +static vector bool int __ATTRS_o_ai vec_cmpgt(vector float __a, + vector float __b) { return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b); } /* vec_vcmpgtsb */ static vector bool char __attribute__((__always_inline__)) -vec_vcmpgtsb(vector signed char __a, vector signed char __b) -{ +vec_vcmpgtsb(vector signed char __a, vector signed char __b) { return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b); } /* vec_vcmpgtub */ static vector bool char __attribute__((__always_inline__)) -vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b) -{ +vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b); } /* vec_vcmpgtsh */ static vector bool short __attribute__((__always_inline__)) -vec_vcmpgtsh(vector short __a, vector short __b) -{ +vec_vcmpgtsh(vector short __a, vector short __b) { return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b); } /* vec_vcmpgtuh */ static vector bool short __attribute__((__always_inline__)) -vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b) -{ +vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b); } /* vec_vcmpgtsw */ static vector bool int __attribute__((__always_inline__)) -vec_vcmpgtsw(vector int __a, vector int __b) -{ +vec_vcmpgtsw(vector int __a, vector int __b) { return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b); } /* vec_vcmpgtuw */ static vector bool int __attribute__((__always_inline__)) -vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b) -{ +vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b); } /* vec_vcmpgtfp */ static vector bool int __attribute__((__always_inline__)) -vec_vcmpgtfp(vector float __a, vector float __b) -{ +vec_vcmpgtfp(vector float __a, vector float __b) { return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b); } /* vec_cmple */ static vector bool int __attribute__((__always_inline__)) -vec_cmple(vector float __a, vector float __b) -{ +vec_cmple(vector float __a, vector float __b) { return (vector bool int)__builtin_altivec_vcmpgefp(__b, __a); } /* vec_cmplt */ -static vector bool char __ATTRS_o_ai -vec_cmplt(vector signed char __a, vector signed char __b) -{ +static vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a, + vector signed char __b) { return (vector bool char)__builtin_altivec_vcmpgtsb(__b, __a); } -static vector bool char __ATTRS_o_ai -vec_cmplt(vector unsigned char __a, vector unsigned char __b) -{ +static vector bool char __ATTRS_o_ai vec_cmplt(vector unsigned char __a, + vector unsigned char __b) { return (vector bool char)__builtin_altivec_vcmpgtub(__b, __a); } -static vector bool short __ATTRS_o_ai -vec_cmplt(vector short __a, vector short __b) -{ +static vector bool short __ATTRS_o_ai vec_cmplt(vector short __a, + vector short __b) { return (vector bool short)__builtin_altivec_vcmpgtsh(__b, __a); } -static vector bool short __ATTRS_o_ai -vec_cmplt(vector unsigned short __a, vector unsigned short __b) -{ +static vector bool short __ATTRS_o_ai vec_cmplt(vector unsigned short __a, + vector unsigned short __b) { return (vector bool short)__builtin_altivec_vcmpgtuh(__b, __a); } -static vector bool int __ATTRS_o_ai -vec_cmplt(vector int __a, vector int __b) -{ +static vector bool int __ATTRS_o_ai vec_cmplt(vector int __a, vector int __b) { return (vector bool int)__builtin_altivec_vcmpgtsw(__b, __a); } -static vector bool int __ATTRS_o_ai -vec_cmplt(vector unsigned int __a, vector unsigned int __b) -{ +static vector bool int __ATTRS_o_ai vec_cmplt(vector unsigned int __a, + vector unsigned int __b) { return (vector bool int)__builtin_altivec_vcmpgtuw(__b, __a); } -static vector bool int __ATTRS_o_ai -vec_cmplt(vector float __a, vector float __b) -{ +static vector bool int __ATTRS_o_ai vec_cmplt(vector float __a, + vector float __b) { return (vector bool int)__builtin_altivec_vcmpgtfp(__b, __a); } /* vec_ctf */ -static vector float __ATTRS_o_ai -vec_ctf(vector int __a, int __b) -{ +static vector float __ATTRS_o_ai vec_ctf(vector int __a, int __b) { return __builtin_altivec_vcfsx(__a, __b); } -static vector float __ATTRS_o_ai -vec_ctf(vector unsigned int __a, int __b) -{ +static vector float __ATTRS_o_ai vec_ctf(vector unsigned int __a, int __b) { return __builtin_altivec_vcfux((vector int)__a, __b); } /* vec_vcfsx */ static vector float __attribute__((__always_inline__)) -vec_vcfsx(vector int __a, int __b) -{ +vec_vcfsx(vector int __a, int __b) { return __builtin_altivec_vcfsx(__a, __b); } /* vec_vcfux */ static vector float __attribute__((__always_inline__)) -vec_vcfux(vector unsigned int __a, int __b) -{ +vec_vcfux(vector unsigned int __a, int __b) { return __builtin_altivec_vcfux((vector int)__a, __b); } /* vec_cts */ static vector int __attribute__((__always_inline__)) -vec_cts(vector float __a, int __b) -{ +vec_cts(vector float __a, int __b) { return __builtin_altivec_vctsxs(__a, __b); } /* vec_vctsxs */ static vector int __attribute__((__always_inline__)) -vec_vctsxs(vector float __a, int __b) -{ +vec_vctsxs(vector float __a, int __b) { return __builtin_altivec_vctsxs(__a, __b); } /* vec_ctu */ static vector unsigned int __attribute__((__always_inline__)) -vec_ctu(vector float __a, int __b) -{ +vec_ctu(vector float __a, int __b) { return __builtin_altivec_vctuxs(__a, __b); } /* vec_vctuxs */ static vector unsigned int __attribute__((__always_inline__)) -vec_vctuxs(vector float __a, int __b) -{ +vec_vctuxs(vector float __a, int __b) { return __builtin_altivec_vctuxs(__a, __b); } /* vec_div */ #ifdef __VSX__ -static vector float __ATTRS_o_ai -vec_div(vector float __a, vector float __b) -{ +static vector float __ATTRS_o_ai vec_div(vector float __a, vector float __b) { return __builtin_vsx_xvdivsp(__a, __b); } -static vector double __ATTRS_o_ai -vec_div(vector double __a, vector double __b) -{ +static vector double __ATTRS_o_ai vec_div(vector double __a, + vector double __b) { return __builtin_vsx_xvdivdp(__a, __b); } #endif /* vec_dss */ -static void __attribute__((__always_inline__)) -vec_dss(int __a) -{ +static void __attribute__((__always_inline__)) vec_dss(int __a) { __builtin_altivec_dss(__a); } /* vec_dssall */ -static void __attribute__((__always_inline__)) -vec_dssall(void) -{ +static void __attribute__((__always_inline__)) vec_dssall(void) { __builtin_altivec_dssall(); } /* vec_dst */ static void __attribute__((__always_inline__)) -vec_dst(const void *__a, int __b, int __c) -{ +vec_dst(const void *__a, int __b, int __c) { __builtin_altivec_dst(__a, __b, __c); } /* vec_dstst */ static void __attribute__((__always_inline__)) -vec_dstst(const void *__a, int __b, int __c) -{ +vec_dstst(const void *__a, int __b, int __c) { __builtin_altivec_dstst(__a, __b, __c); } /* vec_dststt */ static void __attribute__((__always_inline__)) -vec_dststt(const void *__a, int __b, int __c) -{ +vec_dststt(const void *__a, int __b, int __c) { __builtin_altivec_dststt(__a, __b, __c); } /* vec_dstt */ static void __attribute__((__always_inline__)) -vec_dstt(const void *__a, int __b, int __c) -{ +vec_dstt(const void *__a, int __b, int __c) { __builtin_altivec_dstt(__a, __b, __c); } /* vec_expte */ static vector float __attribute__((__always_inline__)) -vec_expte(vector float __a) -{ +vec_expte(vector float __a) { return __builtin_altivec_vexptefp(__a); } /* vec_vexptefp */ static vector float __attribute__((__always_inline__)) -vec_vexptefp(vector float __a) -{ +vec_vexptefp(vector float __a) { return __builtin_altivec_vexptefp(__a); } /* vec_floor */ static vector float __attribute__((__always_inline__)) -vec_floor(vector float __a) -{ +vec_floor(vector float __a) { return __builtin_altivec_vrfim(__a); } /* vec_vrfim */ static vector float __attribute__((__always_inline__)) -vec_vrfim(vector float __a) -{ +vec_vrfim(vector float __a) { return __builtin_altivec_vrfim(__a); } /* vec_ld */ -static vector signed char __ATTRS_o_ai -vec_ld(int __a, const vector signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_ld(int __a, + const vector signed char *__b) { return (vector signed char)__builtin_altivec_lvx(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_ld(int __a, const signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_ld(int __a, const signed char *__b) { return (vector signed char)__builtin_altivec_lvx(__a, __b); } static vector unsigned char __ATTRS_o_ai -vec_ld(int __a, const vector unsigned char *__b) -{ +vec_ld(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvx(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_ld(int __a, const unsigned char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_ld(int __a, + const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvx(__a, __b); } -static vector bool char __ATTRS_o_ai -vec_ld(int __a, const vector bool char *__b) -{ +static vector bool char __ATTRS_o_ai vec_ld(int __a, + const vector bool char *__b) { return (vector bool char)__builtin_altivec_lvx(__a, __b); } -static vector short __ATTRS_o_ai -vec_ld(int __a, const vector short *__b) -{ +static vector short __ATTRS_o_ai vec_ld(int __a, const vector short *__b) { return (vector short)__builtin_altivec_lvx(__a, __b); } -static vector short __ATTRS_o_ai -vec_ld(int __a, const short *__b) -{ +static vector short __ATTRS_o_ai vec_ld(int __a, const short *__b) { return (vector short)__builtin_altivec_lvx(__a, __b); } static vector unsigned short __ATTRS_o_ai -vec_ld(int __a, const vector unsigned short *__b) -{ +vec_ld(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvx(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_ld(int __a, const unsigned short *__b) -{ +static vector unsigned short __ATTRS_o_ai vec_ld(int __a, + const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvx(__a, __b); } -static vector bool short __ATTRS_o_ai -vec_ld(int __a, const vector bool short *__b) -{ +static vector bool short __ATTRS_o_ai vec_ld(int __a, + const vector bool short *__b) { return (vector bool short)__builtin_altivec_lvx(__a, __b); } -static vector pixel __ATTRS_o_ai -vec_ld(int __a, const vector pixel *__b) -{ +static vector pixel __ATTRS_o_ai vec_ld(int __a, const vector pixel *__b) { return (vector pixel)__builtin_altivec_lvx(__a, __b); } -static vector int __ATTRS_o_ai -vec_ld(int __a, const vector int *__b) -{ +static vector int __ATTRS_o_ai vec_ld(int __a, const vector int *__b) { return (vector int)__builtin_altivec_lvx(__a, __b); } -static vector int __ATTRS_o_ai -vec_ld(int __a, const int *__b) -{ +static vector int __ATTRS_o_ai vec_ld(int __a, const int *__b) { return (vector int)__builtin_altivec_lvx(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_ld(int __a, const vector unsigned int *__b) -{ +static vector unsigned int __ATTRS_o_ai vec_ld(int __a, + const vector unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvx(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_ld(int __a, const unsigned int *__b) -{ +static vector unsigned int __ATTRS_o_ai vec_ld(int __a, + const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvx(__a, __b); } -static vector bool int __ATTRS_o_ai -vec_ld(int __a, const vector bool int *__b) -{ +static vector bool int __ATTRS_o_ai vec_ld(int __a, + const vector bool int *__b) { return (vector bool int)__builtin_altivec_lvx(__a, __b); } -static vector float __ATTRS_o_ai -vec_ld(int __a, const vector float *__b) -{ +static vector float __ATTRS_o_ai vec_ld(int __a, const vector float *__b) { return (vector float)__builtin_altivec_lvx(__a, __b); } -static vector float __ATTRS_o_ai -vec_ld(int __a, const float *__b) -{ +static vector float __ATTRS_o_ai vec_ld(int __a, const float *__b) { return (vector float)__builtin_altivec_lvx(__a, __b); } /* vec_lvx */ -static vector signed char __ATTRS_o_ai -vec_lvx(int __a, const vector signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_lvx(int __a, + const vector signed char *__b) { return (vector signed char)__builtin_altivec_lvx(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_lvx(int __a, const signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_lvx(int __a, + const signed char *__b) { return (vector signed char)__builtin_altivec_lvx(__a, __b); } static vector unsigned char __ATTRS_o_ai -vec_lvx(int __a, const vector unsigned char *__b) -{ +vec_lvx(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvx(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_lvx(int __a, const unsigned char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvx(int __a, + const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvx(__a, __b); } -static vector bool char __ATTRS_o_ai -vec_lvx(int __a, const vector bool char *__b) -{ +static vector bool char __ATTRS_o_ai vec_lvx(int __a, + const vector bool char *__b) { return (vector bool char)__builtin_altivec_lvx(__a, __b); } -static vector short __ATTRS_o_ai -vec_lvx(int __a, const vector short *__b) -{ +static vector short __ATTRS_o_ai vec_lvx(int __a, const vector short *__b) { return (vector short)__builtin_altivec_lvx(__a, __b); } -static vector short __ATTRS_o_ai -vec_lvx(int __a, const short *__b) -{ +static vector short __ATTRS_o_ai vec_lvx(int __a, const short *__b) { return (vector short)__builtin_altivec_lvx(__a, __b); } static vector unsigned short __ATTRS_o_ai -vec_lvx(int __a, const vector unsigned short *__b) -{ +vec_lvx(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvx(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_lvx(int __a, const unsigned short *__b) -{ +static vector unsigned short __ATTRS_o_ai vec_lvx(int __a, + const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvx(__a, __b); } -static vector bool short __ATTRS_o_ai -vec_lvx(int __a, const vector bool short *__b) -{ +static vector bool short __ATTRS_o_ai vec_lvx(int __a, + const vector bool short *__b) { return (vector bool short)__builtin_altivec_lvx(__a, __b); } -static vector pixel __ATTRS_o_ai -vec_lvx(int __a, const vector pixel *__b) -{ +static vector pixel __ATTRS_o_ai vec_lvx(int __a, const vector pixel *__b) { return (vector pixel)__builtin_altivec_lvx(__a, __b); } -static vector int __ATTRS_o_ai -vec_lvx(int __a, const vector int *__b) -{ +static vector int __ATTRS_o_ai vec_lvx(int __a, const vector int *__b) { return (vector int)__builtin_altivec_lvx(__a, __b); } -static vector int __ATTRS_o_ai -vec_lvx(int __a, const int *__b) -{ +static vector int __ATTRS_o_ai vec_lvx(int __a, const int *__b) { return (vector int)__builtin_altivec_lvx(__a, __b); } static vector unsigned int __ATTRS_o_ai -vec_lvx(int __a, const vector unsigned int *__b) -{ +vec_lvx(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvx(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_lvx(int __a, const unsigned int *__b) -{ +static vector unsigned int __ATTRS_o_ai vec_lvx(int __a, + const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvx(__a, __b); } -static vector bool int __ATTRS_o_ai -vec_lvx(int __a, const vector bool int *__b) -{ +static vector bool int __ATTRS_o_ai vec_lvx(int __a, + const vector bool int *__b) { return (vector bool int)__builtin_altivec_lvx(__a, __b); } -static vector float __ATTRS_o_ai -vec_lvx(int __a, const vector float *__b) -{ +static vector float __ATTRS_o_ai vec_lvx(int __a, const vector float *__b) { return (vector float)__builtin_altivec_lvx(__a, __b); } -static vector float __ATTRS_o_ai -vec_lvx(int __a, const float *__b) -{ +static vector float __ATTRS_o_ai vec_lvx(int __a, const float *__b) { return (vector float)__builtin_altivec_lvx(__a, __b); } /* vec_lde */ -static vector signed char __ATTRS_o_ai -vec_lde(int __a, const signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_lde(int __a, + const signed char *__b) { return (vector signed char)__builtin_altivec_lvebx(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_lde(int __a, const unsigned char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lde(int __a, + const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvebx(__a, __b); } -static vector short __ATTRS_o_ai -vec_lde(int __a, const short *__b) -{ +static vector short __ATTRS_o_ai vec_lde(int __a, const short *__b) { return (vector short)__builtin_altivec_lvehx(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_lde(int __a, const unsigned short *__b) -{ +static vector unsigned short __ATTRS_o_ai vec_lde(int __a, + const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvehx(__a, __b); } -static vector int __ATTRS_o_ai -vec_lde(int __a, const int *__b) -{ +static vector int __ATTRS_o_ai vec_lde(int __a, const int *__b) { return (vector int)__builtin_altivec_lvewx(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_lde(int __a, const unsigned int *__b) -{ +static vector unsigned int __ATTRS_o_ai vec_lde(int __a, + const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvewx(__a, __b); } -static vector float __ATTRS_o_ai -vec_lde(int __a, const float *__b) -{ +static vector float __ATTRS_o_ai vec_lde(int __a, const float *__b) { return (vector float)__builtin_altivec_lvewx(__a, __b); } /* vec_lvebx */ -static vector signed char __ATTRS_o_ai -vec_lvebx(int __a, const signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_lvebx(int __a, + const signed char *__b) { return (vector signed char)__builtin_altivec_lvebx(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_lvebx(int __a, const unsigned char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvebx(int __a, + const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvebx(__a, __b); } /* vec_lvehx */ -static vector short __ATTRS_o_ai -vec_lvehx(int __a, const short *__b) -{ +static vector short __ATTRS_o_ai vec_lvehx(int __a, const short *__b) { return (vector short)__builtin_altivec_lvehx(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_lvehx(int __a, const unsigned short *__b) -{ +static vector unsigned short __ATTRS_o_ai vec_lvehx(int __a, + const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvehx(__a, __b); } /* vec_lvewx */ -static vector int __ATTRS_o_ai -vec_lvewx(int __a, const int *__b) -{ +static vector int __ATTRS_o_ai vec_lvewx(int __a, const int *__b) { return (vector int)__builtin_altivec_lvewx(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_lvewx(int __a, const unsigned int *__b) -{ +static vector unsigned int __ATTRS_o_ai vec_lvewx(int __a, + const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvewx(__a, __b); } -static vector float __ATTRS_o_ai -vec_lvewx(int __a, const float *__b) -{ +static vector float __ATTRS_o_ai vec_lvewx(int __a, const float *__b) { return (vector float)__builtin_altivec_lvewx(__a, __b); } /* vec_ldl */ -static vector signed char __ATTRS_o_ai -vec_ldl(int __a, const vector signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_ldl(int __a, + const vector signed char *__b) { return (vector signed char)__builtin_altivec_lvxl(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_ldl(int __a, const signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_ldl(int __a, + const signed char *__b) { return (vector signed char)__builtin_altivec_lvxl(__a, __b); } static vector unsigned char __ATTRS_o_ai -vec_ldl(int __a, const vector unsigned char *__b) -{ +vec_ldl(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvxl(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_ldl(int __a, const unsigned char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_ldl(int __a, + const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvxl(__a, __b); } -static vector bool char __ATTRS_o_ai -vec_ldl(int __a, const vector bool char *__b) -{ +static vector bool char __ATTRS_o_ai vec_ldl(int __a, + const vector bool char *__b) { return (vector bool char)__builtin_altivec_lvxl(__a, __b); } -static vector short __ATTRS_o_ai -vec_ldl(int __a, const vector short *__b) -{ +static vector short __ATTRS_o_ai vec_ldl(int __a, const vector short *__b) { return (vector short)__builtin_altivec_lvxl(__a, __b); } -static vector short __ATTRS_o_ai -vec_ldl(int __a, const short *__b) -{ +static vector short __ATTRS_o_ai vec_ldl(int __a, const short *__b) { return (vector short)__builtin_altivec_lvxl(__a, __b); } static vector unsigned short __ATTRS_o_ai -vec_ldl(int __a, const vector unsigned short *__b) -{ +vec_ldl(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvxl(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_ldl(int __a, const unsigned short *__b) -{ +static vector unsigned short __ATTRS_o_ai vec_ldl(int __a, + const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvxl(__a, __b); } -static vector bool short __ATTRS_o_ai -vec_ldl(int __a, const vector bool short *__b) -{ +static vector bool short __ATTRS_o_ai vec_ldl(int __a, + const vector bool short *__b) { return (vector bool short)__builtin_altivec_lvxl(__a, __b); } -static vector pixel __ATTRS_o_ai -vec_ldl(int __a, const vector pixel *__b) -{ +static vector pixel __ATTRS_o_ai vec_ldl(int __a, const vector pixel *__b) { return (vector pixel short)__builtin_altivec_lvxl(__a, __b); } -static vector int __ATTRS_o_ai -vec_ldl(int __a, const vector int *__b) -{ +static vector int __ATTRS_o_ai vec_ldl(int __a, const vector int *__b) { return (vector int)__builtin_altivec_lvxl(__a, __b); } -static vector int __ATTRS_o_ai -vec_ldl(int __a, const int *__b) -{ +static vector int __ATTRS_o_ai vec_ldl(int __a, const int *__b) { return (vector int)__builtin_altivec_lvxl(__a, __b); } static vector unsigned int __ATTRS_o_ai -vec_ldl(int __a, const vector unsigned int *__b) -{ +vec_ldl(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvxl(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_ldl(int __a, const unsigned int *__b) -{ +static vector unsigned int __ATTRS_o_ai vec_ldl(int __a, + const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvxl(__a, __b); } -static vector bool int __ATTRS_o_ai -vec_ldl(int __a, const vector bool int *__b) -{ +static vector bool int __ATTRS_o_ai vec_ldl(int __a, + const vector bool int *__b) { return (vector bool int)__builtin_altivec_lvxl(__a, __b); } -static vector float __ATTRS_o_ai -vec_ldl(int __a, const vector float *__b) -{ +static vector float __ATTRS_o_ai vec_ldl(int __a, const vector float *__b) { return (vector float)__builtin_altivec_lvxl(__a, __b); } -static vector float __ATTRS_o_ai -vec_ldl(int __a, const float *__b) -{ +static vector float __ATTRS_o_ai vec_ldl(int __a, const float *__b) { return (vector float)__builtin_altivec_lvxl(__a, __b); } /* vec_lvxl */ -static vector signed char __ATTRS_o_ai -vec_lvxl(int __a, const vector signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_lvxl(int __a, + const vector signed char *__b) { return (vector signed char)__builtin_altivec_lvxl(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_lvxl(int __a, const signed char *__b) -{ +static vector signed char __ATTRS_o_ai vec_lvxl(int __a, + const signed char *__b) { return (vector signed char)__builtin_altivec_lvxl(__a, __b); } static vector unsigned char __ATTRS_o_ai -vec_lvxl(int __a, const vector unsigned char *__b) -{ +vec_lvxl(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvxl(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_lvxl(int __a, const unsigned char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvxl(int __a, + const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvxl(__a, __b); } -static vector bool char __ATTRS_o_ai -vec_lvxl(int __a, const vector bool char *__b) -{ +static vector bool char __ATTRS_o_ai vec_lvxl(int __a, + const vector bool char *__b) { return (vector bool char)__builtin_altivec_lvxl(__a, __b); } -static vector short __ATTRS_o_ai -vec_lvxl(int __a, const vector short *__b) -{ +static vector short __ATTRS_o_ai vec_lvxl(int __a, const vector short *__b) { return (vector short)__builtin_altivec_lvxl(__a, __b); } -static vector short __ATTRS_o_ai -vec_lvxl(int __a, const short *__b) -{ +static vector short __ATTRS_o_ai vec_lvxl(int __a, const short *__b) { return (vector short)__builtin_altivec_lvxl(__a, __b); } static vector unsigned short __ATTRS_o_ai -vec_lvxl(int __a, const vector unsigned short *__b) -{ +vec_lvxl(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvxl(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_lvxl(int __a, const unsigned short *__b) -{ +static vector unsigned short __ATTRS_o_ai vec_lvxl(int __a, + const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvxl(__a, __b); } -static vector bool short __ATTRS_o_ai -vec_lvxl(int __a, const vector bool short *__b) -{ +static vector bool short __ATTRS_o_ai vec_lvxl(int __a, + const vector bool short *__b) { return (vector bool short)__builtin_altivec_lvxl(__a, __b); } -static vector pixel __ATTRS_o_ai -vec_lvxl(int __a, const vector pixel *__b) -{ +static vector pixel __ATTRS_o_ai vec_lvxl(int __a, const vector pixel *__b) { return (vector pixel)__builtin_altivec_lvxl(__a, __b); } -static vector int __ATTRS_o_ai -vec_lvxl(int __a, const vector int *__b) -{ +static vector int __ATTRS_o_ai vec_lvxl(int __a, const vector int *__b) { return (vector int)__builtin_altivec_lvxl(__a, __b); } -static vector int __ATTRS_o_ai -vec_lvxl(int __a, const int *__b) -{ +static vector int __ATTRS_o_ai vec_lvxl(int __a, const int *__b) { return (vector int)__builtin_altivec_lvxl(__a, __b); } static vector unsigned int __ATTRS_o_ai -vec_lvxl(int __a, const vector unsigned int *__b) -{ +vec_lvxl(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvxl(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_lvxl(int __a, const unsigned int *__b) -{ +static vector unsigned int __ATTRS_o_ai vec_lvxl(int __a, + const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvxl(__a, __b); } -static vector bool int __ATTRS_o_ai -vec_lvxl(int __a, const vector bool int *__b) -{ +static vector bool int __ATTRS_o_ai vec_lvxl(int __a, + const vector bool int *__b) { return (vector bool int)__builtin_altivec_lvxl(__a, __b); } -static vector float __ATTRS_o_ai -vec_lvxl(int __a, const vector float *__b) -{ +static vector float __ATTRS_o_ai vec_lvxl(int __a, const vector float *__b) { return (vector float)__builtin_altivec_lvxl(__a, __b); } -static vector float __ATTRS_o_ai -vec_lvxl(int __a, const float *__b) -{ +static vector float __ATTRS_o_ai vec_lvxl(int __a, const float *__b) { return (vector float)__builtin_altivec_lvxl(__a, __b); } /* vec_loge */ static vector float __attribute__((__always_inline__)) -vec_loge(vector float __a) -{ +vec_loge(vector float __a) { return __builtin_altivec_vlogefp(__a); } /* vec_vlogefp */ static vector float __attribute__((__always_inline__)) -vec_vlogefp(vector float __a) -{ +vec_vlogefp(vector float __a) { return __builtin_altivec_vlogefp(__a); } @@ -2395,133 +2132,116 @@ vec_vlogefp(vector float __a) #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsl(int __a, const signed char *__b) -{ - vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsl(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsl(int __a, const signed char *__b) { + vector unsigned char mask = + (vector unsigned char)__builtin_altivec_lvsl(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsl(int __a, const signed char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, + const signed char *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsl(int __a, const unsigned char *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsl(int __a, const unsigned char *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsl(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsl(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsl(int __a, const unsigned char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, + const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsl(int __a, const short *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsl(int __a, const short *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsl(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsl(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsl(int __a, const short *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const short *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsl(int __a, const unsigned short *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsl(int __a, const unsigned short *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsl(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsl(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsl(int __a, const unsigned short *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, + const unsigned short *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsl(int __a, const int *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsl(int __a, const int *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsl(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsl(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsl(int __a, const int *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const int *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsl(int __a, const unsigned int *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsl(int __a, const unsigned int *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsl(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsl(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsl(int __a, const unsigned int *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, + const unsigned int *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsl(int __a, const float *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsl(int __a, const float *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsl(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsl(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsl(int __a, const float *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const float *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif @@ -2530,133 +2250,116 @@ vec_lvsl(int __a, const float *__b) #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsr(int __a, const signed char *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsr(int __a, const signed char *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsr(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsr(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsr(int __a, const signed char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, + const signed char *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsr(int __a, const unsigned char *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsr(int __a, const unsigned char *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsr(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsr(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsr(int __a, const unsigned char *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, + const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsr(int __a, const short *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsr(int __a, const short *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsr(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsr(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsr(int __a, const short *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const short *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsr(int __a, const unsigned short *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsr(int __a, const unsigned short *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsr(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsr(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsr(int __a, const unsigned short *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, + const unsigned short *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsr(int __a, const int *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsr(int __a, const int *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsr(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsr(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsr(int __a, const int *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const int *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsr(int __a, const unsigned int *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsr(int __a, const unsigned int *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsr(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsr(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsr(int __a, const unsigned int *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, + const unsigned int *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif #ifdef __LITTLE_ENDIAN__ static vector unsigned char __ATTRS_o_ai -__attribute__((__deprecated__("use assignment for unaligned little endian \ -loads/stores"))) -vec_lvsr(int __a, const float *__b) -{ + __attribute__((__deprecated__("use assignment for unaligned little endian \ +loads/stores"))) vec_lvsr(int __a, const float *__b) { vector unsigned char mask = - (vector unsigned char)__builtin_altivec_lvsr(__a, __b); - vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}; + (vector unsigned char)__builtin_altivec_lvsr(__a, __b); + vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else -static vector unsigned char __ATTRS_o_ai -vec_lvsr(int __a, const float *__b) -{ +static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const float *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif @@ -2664,163 +2367,153 @@ vec_lvsr(int __a, const float *__b) /* vec_madd */ static vector float __attribute__((__always_inline__)) -vec_madd(vector float __a, vector float __b, vector float __c) -{ +vec_madd(vector float __a, vector float __b, vector float __c) { return __builtin_altivec_vmaddfp(__a, __b, __c); } /* vec_vmaddfp */ static vector float __attribute__((__always_inline__)) -vec_vmaddfp(vector float __a, vector float __b, vector float __c) -{ +vec_vmaddfp(vector float __a, vector float __b, vector float __c) { return __builtin_altivec_vmaddfp(__a, __b, __c); } /* vec_madds */ static vector signed short __attribute__((__always_inline__)) -vec_madds(vector signed short __a, vector signed short __b, vector signed short __c) -{ +vec_madds(vector signed short __a, vector signed short __b, + vector signed short __c) { return __builtin_altivec_vmhaddshs(__a, __b, __c); } /* vec_vmhaddshs */ static vector signed short __attribute__((__always_inline__)) -vec_vmhaddshs(vector signed short __a, - vector signed short __b, - vector signed short __c) -{ +vec_vmhaddshs(vector signed short __a, vector signed short __b, + vector signed short __c) { return __builtin_altivec_vmhaddshs(__a, __b, __c); } /* vec_max */ -static vector signed char __ATTRS_o_ai -vec_max(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_max(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vmaxsb(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_max(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_max(vector bool char __a, + vector signed char __b) { return __builtin_altivec_vmaxsb((vector signed char)__a, __b); } -static vector signed char __ATTRS_o_ai -vec_max(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_max(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vmaxsb(__a, (vector signed char)__b); } -static vector unsigned char __ATTRS_o_ai -vec_max(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vmaxub(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_max(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_max(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vmaxub((vector unsigned char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_max(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b); } -static vector short __ATTRS_o_ai -vec_max(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_max(vector short __a, vector short __b) { return __builtin_altivec_vmaxsh(__a, __b); } -static vector short __ATTRS_o_ai -vec_max(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_max(vector bool short __a, + vector short __b) { return __builtin_altivec_vmaxsh((vector short)__a, __b); } -static vector short __ATTRS_o_ai -vec_max(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_max(vector short __a, + vector bool short __b) { return __builtin_altivec_vmaxsh(__a, (vector short)__b); } -static vector unsigned short __ATTRS_o_ai -vec_max(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vmaxuh(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_max(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_max(vector bool short __a, + vector unsigned short __b) { return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_max(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a, + vector bool short __b) { return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b); } -static vector int __ATTRS_o_ai -vec_max(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_max(vector int __a, vector int __b) { return __builtin_altivec_vmaxsw(__a, __b); } -static vector int __ATTRS_o_ai -vec_max(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_max(vector bool int __a, vector int __b) { return __builtin_altivec_vmaxsw((vector int)__a, __b); } -static vector int __ATTRS_o_ai -vec_max(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_max(vector int __a, vector bool int __b) { return __builtin_altivec_vmaxsw(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_max(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vmaxuw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_max(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_max(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_max(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ static vector signed long long __ATTRS_o_ai -vec_max(vector signed long long __a, vector signed long long __b) -{ +vec_max(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vmaxsd(__a, __b); } +static vector signed long long __ATTRS_o_ai +vec_max(vector bool long long __a, vector signed long long __b) { + return __builtin_altivec_vmaxsd((vector signed long long)__a, __b); +} + +static vector signed long long __ATTRS_o_ai vec_max(vector signed long long __a, + vector bool long long __b) { + return __builtin_altivec_vmaxsd(__a, (vector signed long long)__b); +} + static vector unsigned long long __ATTRS_o_ai -vec_max(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_max(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vmaxud(__a, __b); } + +static vector unsigned long long __ATTRS_o_ai +vec_max(vector bool long long __a, vector unsigned long long __b) { + return __builtin_altivec_vmaxud((vector unsigned long long)__a, __b); +} + +static vector unsigned long long __ATTRS_o_ai +vec_max(vector unsigned long long __a, vector bool long long __b) { + return __builtin_altivec_vmaxud(__a, (vector unsigned long long)__b); +} #endif -static vector float __ATTRS_o_ai -vec_max(vector float __a, vector float __b) -{ +static vector float __ATTRS_o_ai vec_max(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvmaxsp(__a, __b); #else @@ -2829,138 +2522,115 @@ vec_max(vector float __a, vector float __b) } #ifdef __VSX__ -static vector double __ATTRS_o_ai -vec_max(vector double __a, vector double __b) -{ +static vector double __ATTRS_o_ai vec_max(vector double __a, + vector double __b) { return __builtin_vsx_xvmaxdp(__a, __b); } #endif /* vec_vmaxsb */ -static vector signed char __ATTRS_o_ai -vec_vmaxsb(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vmaxsb(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_vmaxsb(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vmaxsb(vector bool char __a, + vector signed char __b) { return __builtin_altivec_vmaxsb((vector signed char)__a, __b); } -static vector signed char __ATTRS_o_ai -vec_vmaxsb(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vmaxsb(__a, (vector signed char)__b); } /* vec_vmaxub */ -static vector unsigned char __ATTRS_o_ai -vec_vmaxub(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vmaxub(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vmaxub(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vmaxub((vector unsigned char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vmaxub(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b); } /* vec_vmaxsh */ -static vector short __ATTRS_o_ai -vec_vmaxsh(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, + vector short __b) { return __builtin_altivec_vmaxsh(__a, __b); } -static vector short __ATTRS_o_ai -vec_vmaxsh(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vmaxsh(vector bool short __a, + vector short __b) { return __builtin_altivec_vmaxsh((vector short)__a, __b); } -static vector short __ATTRS_o_ai -vec_vmaxsh(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, + vector bool short __b) { return __builtin_altivec_vmaxsh(__a, (vector short)__b); } /* vec_vmaxuh */ static vector unsigned short __ATTRS_o_ai -vec_vmaxuh(vector unsigned short __a, vector unsigned short __b) -{ +vec_vmaxuh(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vmaxuh(__a, __b); } static vector unsigned short __ATTRS_o_ai -vec_vmaxuh(vector bool short __a, vector unsigned short __b) -{ +vec_vmaxuh(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_vmaxuh(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a, + vector bool short __b) { return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b); } /* vec_vmaxsw */ -static vector int __ATTRS_o_ai -vec_vmaxsw(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b) { return __builtin_altivec_vmaxsw(__a, __b); } -static vector int __ATTRS_o_ai -vec_vmaxsw(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vmaxsw(vector bool int __a, vector int __b) { return __builtin_altivec_vmaxsw((vector int)__a, __b); } -static vector int __ATTRS_o_ai -vec_vmaxsw(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector bool int __b) { return __builtin_altivec_vmaxsw(__a, (vector int)__b); } /* vec_vmaxuw */ -static vector unsigned int __ATTRS_o_ai -vec_vmaxuw(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vmaxuw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vmaxuw(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vmaxuw(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b); } /* vec_vmaxfp */ static vector float __attribute__((__always_inline__)) -vec_vmaxfp(vector float __a, vector float __b) -{ +vec_vmaxfp(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvmaxsp(__a, __b); #else @@ -2970,519 +2640,508 @@ vec_vmaxfp(vector float __a, vector float __b) /* vec_mergeh */ -static vector signed char __ATTRS_o_ai -vec_mergeh(vector signed char __a, vector signed char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, - 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); +static vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a, + vector signed char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, + 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, + 0x06, 0x16, 0x07, 0x17)); } -static vector unsigned char __ATTRS_o_ai -vec_mergeh(vector unsigned char __a, vector unsigned char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, - 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); +static vector unsigned char __ATTRS_o_ai vec_mergeh(vector unsigned char __a, + vector unsigned char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, + 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, + 0x06, 0x16, 0x07, 0x17)); } -static vector bool char __ATTRS_o_ai -vec_mergeh(vector bool char __a, vector bool char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, - 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); +static vector bool char __ATTRS_o_ai vec_mergeh(vector bool char __a, + vector bool char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, + 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, + 0x06, 0x16, 0x07, 0x17)); } -static vector short __ATTRS_o_ai -vec_mergeh(vector short __a, vector short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, - 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); +static vector short __ATTRS_o_ai vec_mergeh(vector short __a, + vector short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, + 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, + 0x06, 0x07, 0x16, 0x17)); } static vector unsigned short __ATTRS_o_ai -vec_mergeh(vector unsigned short __a, vector unsigned short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, - 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); +vec_mergeh(vector unsigned short __a, vector unsigned short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, + 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, + 0x06, 0x07, 0x16, 0x17)); } -static vector bool short __ATTRS_o_ai -vec_mergeh(vector bool short __a, vector bool short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, - 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); +static vector bool short __ATTRS_o_ai vec_mergeh(vector bool short __a, + vector bool short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, + 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, + 0x06, 0x07, 0x16, 0x17)); } -static vector pixel __ATTRS_o_ai -vec_mergeh(vector pixel __a, vector pixel __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, - 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); +static vector pixel __ATTRS_o_ai vec_mergeh(vector pixel __a, + vector pixel __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, + 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, + 0x06, 0x07, 0x16, 0x17)); } -static vector int __ATTRS_o_ai -vec_mergeh(vector int __a, vector int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, - 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); +static vector int __ATTRS_o_ai vec_mergeh(vector int __a, vector int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, + 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, + 0x14, 0x15, 0x16, 0x17)); } -static vector unsigned int __ATTRS_o_ai -vec_mergeh(vector unsigned int __a, vector unsigned int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, - 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); +static vector unsigned int __ATTRS_o_ai vec_mergeh(vector unsigned int __a, + vector unsigned int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, + 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, + 0x14, 0x15, 0x16, 0x17)); } -static vector bool int __ATTRS_o_ai -vec_mergeh(vector bool int __a, vector bool int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, - 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); +static vector bool int __ATTRS_o_ai vec_mergeh(vector bool int __a, + vector bool int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, + 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, + 0x14, 0x15, 0x16, 0x17)); } -static vector float __ATTRS_o_ai -vec_mergeh(vector float __a, vector float __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, - 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); +static vector float __ATTRS_o_ai vec_mergeh(vector float __a, + vector float __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, + 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, + 0x14, 0x15, 0x16, 0x17)); } /* vec_vmrghb */ #define __builtin_altivec_vmrghb vec_vmrghb -static vector signed char __ATTRS_o_ai -vec_vmrghb(vector signed char __a, vector signed char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, - 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); +static vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a, + vector signed char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, + 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, + 0x06, 0x16, 0x07, 0x17)); } -static vector unsigned char __ATTRS_o_ai -vec_vmrghb(vector unsigned char __a, vector unsigned char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, - 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); +static vector unsigned char __ATTRS_o_ai vec_vmrghb(vector unsigned char __a, + vector unsigned char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, + 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, + 0x06, 0x16, 0x07, 0x17)); } -static vector bool char __ATTRS_o_ai -vec_vmrghb(vector bool char __a, vector bool char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, - 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); +static vector bool char __ATTRS_o_ai vec_vmrghb(vector bool char __a, + vector bool char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, + 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, + 0x06, 0x16, 0x07, 0x17)); } /* vec_vmrghh */ #define __builtin_altivec_vmrghh vec_vmrghh -static vector short __ATTRS_o_ai -vec_vmrghh(vector short __a, vector short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, - 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); +static vector short __ATTRS_o_ai vec_vmrghh(vector short __a, + vector short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, + 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, + 0x06, 0x07, 0x16, 0x17)); } static vector unsigned short __ATTRS_o_ai -vec_vmrghh(vector unsigned short __a, vector unsigned short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, - 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); +vec_vmrghh(vector unsigned short __a, vector unsigned short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, + 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, + 0x06, 0x07, 0x16, 0x17)); } -static vector bool short __ATTRS_o_ai -vec_vmrghh(vector bool short __a, vector bool short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, - 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); +static vector bool short __ATTRS_o_ai vec_vmrghh(vector bool short __a, + vector bool short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, + 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, + 0x06, 0x07, 0x16, 0x17)); } -static vector pixel __ATTRS_o_ai -vec_vmrghh(vector pixel __a, vector pixel __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, - 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); +static vector pixel __ATTRS_o_ai vec_vmrghh(vector pixel __a, + vector pixel __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, + 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, + 0x06, 0x07, 0x16, 0x17)); } /* vec_vmrghw */ #define __builtin_altivec_vmrghw vec_vmrghw -static vector int __ATTRS_o_ai -vec_vmrghw(vector int __a, vector int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, - 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); +static vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, + 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, + 0x14, 0x15, 0x16, 0x17)); } -static vector unsigned int __ATTRS_o_ai -vec_vmrghw(vector unsigned int __a, vector unsigned int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, - 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); +static vector unsigned int __ATTRS_o_ai vec_vmrghw(vector unsigned int __a, + vector unsigned int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, + 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, + 0x14, 0x15, 0x16, 0x17)); } -static vector bool int __ATTRS_o_ai -vec_vmrghw(vector bool int __a, vector bool int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, - 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); +static vector bool int __ATTRS_o_ai vec_vmrghw(vector bool int __a, + vector bool int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, + 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, + 0x14, 0x15, 0x16, 0x17)); } -static vector float __ATTRS_o_ai -vec_vmrghw(vector float __a, vector float __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, - 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); +static vector float __ATTRS_o_ai vec_vmrghw(vector float __a, + vector float __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, + 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, + 0x14, 0x15, 0x16, 0x17)); } /* vec_mergel */ -static vector signed char __ATTRS_o_ai -vec_mergel(vector signed char __a, vector signed char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, - 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); +static vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a, + vector signed char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, + 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, + 0x0E, 0x1E, 0x0F, 0x1F)); } -static vector unsigned char __ATTRS_o_ai -vec_mergel(vector unsigned char __a, vector unsigned char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, - 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); +static vector unsigned char __ATTRS_o_ai vec_mergel(vector unsigned char __a, + vector unsigned char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, + 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, + 0x0E, 0x1E, 0x0F, 0x1F)); } -static vector bool char __ATTRS_o_ai -vec_mergel(vector bool char __a, vector bool char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, - 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); +static vector bool char __ATTRS_o_ai vec_mergel(vector bool char __a, + vector bool char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, + 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, + 0x0E, 0x1E, 0x0F, 0x1F)); } -static vector short __ATTRS_o_ai -vec_mergel(vector short __a, vector short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, - 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); +static vector short __ATTRS_o_ai vec_mergel(vector short __a, + vector short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, + 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F)); } static vector unsigned short __ATTRS_o_ai -vec_mergel(vector unsigned short __a, vector unsigned short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, - 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); +vec_mergel(vector unsigned short __a, vector unsigned short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, + 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F)); } -static vector bool short __ATTRS_o_ai -vec_mergel(vector bool short __a, vector bool short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, - 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); +static vector bool short __ATTRS_o_ai vec_mergel(vector bool short __a, + vector bool short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, + 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F)); } -static vector pixel __ATTRS_o_ai -vec_mergel(vector pixel __a, vector pixel __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, - 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); +static vector pixel __ATTRS_o_ai vec_mergel(vector pixel __a, + vector pixel __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, + 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F)); } -static vector int __ATTRS_o_ai -vec_mergel(vector int __a, vector int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); +static vector int __ATTRS_o_ai vec_mergel(vector int __a, vector int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, + 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x1C, 0x1D, 0x1E, 0x1F)); } -static vector unsigned int __ATTRS_o_ai -vec_mergel(vector unsigned int __a, vector unsigned int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); +static vector unsigned int __ATTRS_o_ai vec_mergel(vector unsigned int __a, + vector unsigned int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, + 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x1C, 0x1D, 0x1E, 0x1F)); } -static vector bool int __ATTRS_o_ai -vec_mergel(vector bool int __a, vector bool int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); +static vector bool int __ATTRS_o_ai vec_mergel(vector bool int __a, + vector bool int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, + 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x1C, 0x1D, 0x1E, 0x1F)); } -static vector float __ATTRS_o_ai -vec_mergel(vector float __a, vector float __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); +static vector float __ATTRS_o_ai vec_mergel(vector float __a, + vector float __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, + 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x1C, 0x1D, 0x1E, 0x1F)); } /* vec_vmrglb */ #define __builtin_altivec_vmrglb vec_vmrglb -static vector signed char __ATTRS_o_ai -vec_vmrglb(vector signed char __a, vector signed char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, - 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); +static vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a, + vector signed char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, + 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, + 0x0E, 0x1E, 0x0F, 0x1F)); } -static vector unsigned char __ATTRS_o_ai -vec_vmrglb(vector unsigned char __a, vector unsigned char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, - 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); +static vector unsigned char __ATTRS_o_ai vec_vmrglb(vector unsigned char __a, + vector unsigned char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, + 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, + 0x0E, 0x1E, 0x0F, 0x1F)); } -static vector bool char __ATTRS_o_ai -vec_vmrglb(vector bool char __a, vector bool char __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, - 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); +static vector bool char __ATTRS_o_ai vec_vmrglb(vector bool char __a, + vector bool char __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, + 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, + 0x0E, 0x1E, 0x0F, 0x1F)); } /* vec_vmrglh */ #define __builtin_altivec_vmrglh vec_vmrglh -static vector short __ATTRS_o_ai -vec_vmrglh(vector short __a, vector short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, - 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); +static vector short __ATTRS_o_ai vec_vmrglh(vector short __a, + vector short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, + 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F)); } static vector unsigned short __ATTRS_o_ai -vec_vmrglh(vector unsigned short __a, vector unsigned short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, - 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); +vec_vmrglh(vector unsigned short __a, vector unsigned short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, + 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F)); } -static vector bool short __ATTRS_o_ai -vec_vmrglh(vector bool short __a, vector bool short __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, - 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); +static vector bool short __ATTRS_o_ai vec_vmrglh(vector bool short __a, + vector bool short __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, + 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F)); } -static vector pixel __ATTRS_o_ai -vec_vmrglh(vector pixel __a, vector pixel __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, - 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); +static vector pixel __ATTRS_o_ai vec_vmrglh(vector pixel __a, + vector pixel __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, + 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F)); } /* vec_vmrglw */ #define __builtin_altivec_vmrglw vec_vmrglw -static vector int __ATTRS_o_ai -vec_vmrglw(vector int __a, vector int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); +static vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, + 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x1C, 0x1D, 0x1E, 0x1F)); } -static vector unsigned int __ATTRS_o_ai -vec_vmrglw(vector unsigned int __a, vector unsigned int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); +static vector unsigned int __ATTRS_o_ai vec_vmrglw(vector unsigned int __a, + vector unsigned int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, + 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x1C, 0x1D, 0x1E, 0x1F)); } -static vector bool int __ATTRS_o_ai -vec_vmrglw(vector bool int __a, vector bool int __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); +static vector bool int __ATTRS_o_ai vec_vmrglw(vector bool int __a, + vector bool int __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, + 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x1C, 0x1D, 0x1E, 0x1F)); } -static vector float __ATTRS_o_ai -vec_vmrglw(vector float __a, vector float __b) -{ - return vec_perm(__a, __b, (vector unsigned char) - (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); +static vector float __ATTRS_o_ai vec_vmrglw(vector float __a, + vector float __b) { + return vec_perm(__a, __b, + (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, + 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x1C, 0x1D, 0x1E, 0x1F)); } /* vec_mfvscr */ static vector unsigned short __attribute__((__always_inline__)) -vec_mfvscr(void) -{ +vec_mfvscr(void) { return __builtin_altivec_mfvscr(); } /* vec_min */ -static vector signed char __ATTRS_o_ai -vec_min(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_min(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vminsb(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_min(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_min(vector bool char __a, + vector signed char __b) { return __builtin_altivec_vminsb((vector signed char)__a, __b); } -static vector signed char __ATTRS_o_ai -vec_min(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_min(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vminsb(__a, (vector signed char)__b); } -static vector unsigned char __ATTRS_o_ai -vec_min(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vminub(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_min(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_min(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vminub((vector unsigned char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_min(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vminub(__a, (vector unsigned char)__b); } -static vector short __ATTRS_o_ai -vec_min(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_min(vector short __a, vector short __b) { return __builtin_altivec_vminsh(__a, __b); } -static vector short __ATTRS_o_ai -vec_min(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_min(vector bool short __a, + vector short __b) { return __builtin_altivec_vminsh((vector short)__a, __b); } -static vector short __ATTRS_o_ai -vec_min(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_min(vector short __a, + vector bool short __b) { return __builtin_altivec_vminsh(__a, (vector short)__b); } -static vector unsigned short __ATTRS_o_ai -vec_min(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vminuh(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_min(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_min(vector bool short __a, + vector unsigned short __b) { return __builtin_altivec_vminuh((vector unsigned short)__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_min(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a, + vector bool short __b) { return __builtin_altivec_vminuh(__a, (vector unsigned short)__b); } -static vector int __ATTRS_o_ai -vec_min(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_min(vector int __a, vector int __b) { return __builtin_altivec_vminsw(__a, __b); } -static vector int __ATTRS_o_ai -vec_min(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_min(vector bool int __a, vector int __b) { return __builtin_altivec_vminsw((vector int)__a, __b); } -static vector int __ATTRS_o_ai -vec_min(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_min(vector int __a, vector bool int __b) { return __builtin_altivec_vminsw(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_min(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vminuw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_min(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_min(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vminuw((vector unsigned int)__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_min(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vminuw(__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ static vector signed long long __ATTRS_o_ai -vec_min(vector signed long long __a, vector signed long long __b) -{ +vec_min(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vminsd(__a, __b); } +static vector signed long long __ATTRS_o_ai +vec_min(vector bool long long __a, vector signed long long __b) { + return __builtin_altivec_vminsd((vector signed long long)__a, __b); +} + +static vector signed long long __ATTRS_o_ai vec_min(vector signed long long __a, + vector bool long long __b) { + return __builtin_altivec_vminsd(__a, (vector signed long long)__b); +} + static vector unsigned long long __ATTRS_o_ai -vec_min(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_min(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vminud(__a, __b); } + +static vector unsigned long long __ATTRS_o_ai +vec_min(vector bool long long __a, vector unsigned long long __b) { + return __builtin_altivec_vminud((vector unsigned long long)__a, __b); +} + +static vector unsigned long long __ATTRS_o_ai +vec_min(vector unsigned long long __a, vector bool long long __b) { + return __builtin_altivec_vminud(__a, (vector unsigned long long)__b); +} #endif -static vector float __ATTRS_o_ai -vec_min(vector float __a, vector float __b) -{ +static vector float __ATTRS_o_ai vec_min(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvminsp(__a, __b); #else @@ -3491,138 +3150,115 @@ vec_min(vector float __a, vector float __b) } #ifdef __VSX__ -static vector double __ATTRS_o_ai -vec_min(vector double __a, vector double __b) -{ +static vector double __ATTRS_o_ai vec_min(vector double __a, + vector double __b) { return __builtin_vsx_xvmindp(__a, __b); } #endif /* vec_vminsb */ -static vector signed char __ATTRS_o_ai -vec_vminsb(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vminsb(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_vminsb(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vminsb(vector bool char __a, + vector signed char __b) { return __builtin_altivec_vminsb((vector signed char)__a, __b); } -static vector signed char __ATTRS_o_ai -vec_vminsb(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vminsb(__a, (vector signed char)__b); } /* vec_vminub */ -static vector unsigned char __ATTRS_o_ai -vec_vminub(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vminub(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vminub(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vminub(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vminub((vector unsigned char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vminub(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vminub(__a, (vector unsigned char)__b); } /* vec_vminsh */ -static vector short __ATTRS_o_ai -vec_vminsh(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vminsh(vector short __a, + vector short __b) { return __builtin_altivec_vminsh(__a, __b); } -static vector short __ATTRS_o_ai -vec_vminsh(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vminsh(vector bool short __a, + vector short __b) { return __builtin_altivec_vminsh((vector short)__a, __b); } -static vector short __ATTRS_o_ai -vec_vminsh(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vminsh(vector short __a, + vector bool short __b) { return __builtin_altivec_vminsh(__a, (vector short)__b); } /* vec_vminuh */ static vector unsigned short __ATTRS_o_ai -vec_vminuh(vector unsigned short __a, vector unsigned short __b) -{ +vec_vminuh(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vminuh(__a, __b); } static vector unsigned short __ATTRS_o_ai -vec_vminuh(vector bool short __a, vector unsigned short __b) -{ +vec_vminuh(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vminuh((vector unsigned short)__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_vminuh(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a, + vector bool short __b) { return __builtin_altivec_vminuh(__a, (vector unsigned short)__b); } /* vec_vminsw */ -static vector int __ATTRS_o_ai -vec_vminsw(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b) { return __builtin_altivec_vminsw(__a, __b); } -static vector int __ATTRS_o_ai -vec_vminsw(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vminsw(vector bool int __a, vector int __b) { return __builtin_altivec_vminsw((vector int)__a, __b); } -static vector int __ATTRS_o_ai -vec_vminsw(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector bool int __b) { return __builtin_altivec_vminsw(__a, (vector int)__b); } /* vec_vminuw */ -static vector unsigned int __ATTRS_o_ai -vec_vminuw(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vminuw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vminuw(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vminuw(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vminuw((vector unsigned int)__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vminuw(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vminuw(__a, (vector unsigned int)__b); } /* vec_vminfp */ static vector float __attribute__((__always_inline__)) -vec_vminfp(vector float __a, vector float __b) -{ +vec_vminfp(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvminsp(__a, __b); #else @@ -3634,239 +3270,194 @@ vec_vminfp(vector float __a, vector float __b) #define __builtin_altivec_vmladduhm vec_mladd -static vector short __ATTRS_o_ai -vec_mladd(vector short __a, vector short __b, vector short __c) -{ +static vector short __ATTRS_o_ai vec_mladd(vector short __a, vector short __b, + vector short __c) { return __a * __b + __c; } -static vector short __ATTRS_o_ai -vec_mladd(vector short __a, vector unsigned short __b, vector unsigned short __c) -{ +static vector short __ATTRS_o_ai vec_mladd(vector short __a, + vector unsigned short __b, + vector unsigned short __c) { return __a * (vector short)__b + (vector short)__c; } -static vector short __ATTRS_o_ai -vec_mladd(vector unsigned short __a, vector short __b, vector short __c) -{ +static vector short __ATTRS_o_ai vec_mladd(vector unsigned short __a, + vector short __b, vector short __c) { return (vector short)__a * __b + __c; } -static vector unsigned short __ATTRS_o_ai -vec_mladd(vector unsigned short __a, - vector unsigned short __b, - vector unsigned short __c) -{ +static vector unsigned short __ATTRS_o_ai vec_mladd(vector unsigned short __a, + vector unsigned short __b, + vector unsigned short __c) { return __a * __b + __c; } /* vec_vmladduhm */ -static vector short __ATTRS_o_ai -vec_vmladduhm(vector short __a, vector short __b, vector short __c) -{ +static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a, + vector short __b, + vector short __c) { return __a * __b + __c; } -static vector short __ATTRS_o_ai -vec_vmladduhm(vector short __a, vector unsigned short __b, vector unsigned short __c) -{ +static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a, + vector unsigned short __b, + vector unsigned short __c) { return __a * (vector short)__b + (vector short)__c; } -static vector short __ATTRS_o_ai -vec_vmladduhm(vector unsigned short __a, vector short __b, vector short __c) -{ +static vector short __ATTRS_o_ai vec_vmladduhm(vector unsigned short __a, + vector short __b, + vector short __c) { return (vector short)__a * __b + __c; } static vector unsigned short __ATTRS_o_ai -vec_vmladduhm(vector unsigned short __a, - vector unsigned short __b, - vector unsigned short __c) -{ +vec_vmladduhm(vector unsigned short __a, vector unsigned short __b, + vector unsigned short __c) { return __a * __b + __c; } /* vec_mradds */ static vector short __attribute__((__always_inline__)) -vec_mradds(vector short __a, vector short __b, vector short __c) -{ +vec_mradds(vector short __a, vector short __b, vector short __c) { return __builtin_altivec_vmhraddshs(__a, __b, __c); } /* vec_vmhraddshs */ static vector short __attribute__((__always_inline__)) -vec_vmhraddshs(vector short __a, vector short __b, vector short __c) -{ +vec_vmhraddshs(vector short __a, vector short __b, vector short __c) { return __builtin_altivec_vmhraddshs(__a, __b, __c); } /* vec_msum */ -static vector int __ATTRS_o_ai -vec_msum(vector signed char __a, vector unsigned char __b, vector int __c) -{ +static vector int __ATTRS_o_ai vec_msum(vector signed char __a, + vector unsigned char __b, + vector int __c) { return __builtin_altivec_vmsummbm(__a, __b, __c); } -static vector unsigned int __ATTRS_o_ai -vec_msum(vector unsigned char __a, vector unsigned char __b, vector unsigned int __c) -{ +static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned char __a, + vector unsigned char __b, + vector unsigned int __c) { return __builtin_altivec_vmsumubm(__a, __b, __c); } -static vector int __ATTRS_o_ai -vec_msum(vector short __a, vector short __b, vector int __c) -{ +static vector int __ATTRS_o_ai vec_msum(vector short __a, vector short __b, + vector int __c) { return __builtin_altivec_vmsumshm(__a, __b, __c); } -static vector unsigned int __ATTRS_o_ai -vec_msum(vector unsigned short __a, - vector unsigned short __b, - vector unsigned int __c) -{ +static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned short __a, + vector unsigned short __b, + vector unsigned int __c) { return __builtin_altivec_vmsumuhm(__a, __b, __c); } /* vec_vmsummbm */ static vector int __attribute__((__always_inline__)) -vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c) -{ +vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c) { return __builtin_altivec_vmsummbm(__a, __b, __c); } /* vec_vmsumubm */ static vector unsigned int __attribute__((__always_inline__)) -vec_vmsumubm(vector unsigned char __a, - vector unsigned char __b, - vector unsigned int __c) -{ +vec_vmsumubm(vector unsigned char __a, vector unsigned char __b, + vector unsigned int __c) { return __builtin_altivec_vmsumubm(__a, __b, __c); } /* vec_vmsumshm */ static vector int __attribute__((__always_inline__)) -vec_vmsumshm(vector short __a, vector short __b, vector int __c) -{ +vec_vmsumshm(vector short __a, vector short __b, vector int __c) { return __builtin_altivec_vmsumshm(__a, __b, __c); } /* vec_vmsumuhm */ static vector unsigned int __attribute__((__always_inline__)) -vec_vmsumuhm(vector unsigned short __a, - vector unsigned short __b, - vector unsigned int __c) -{ +vec_vmsumuhm(vector unsigned short __a, vector unsigned short __b, + vector unsigned int __c) { return __builtin_altivec_vmsumuhm(__a, __b, __c); } /* vec_msums */ -static vector int __ATTRS_o_ai -vec_msums(vector short __a, vector short __b, vector int __c) -{ +static vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b, + vector int __c) { return __builtin_altivec_vmsumshs(__a, __b, __c); } -static vector unsigned int __ATTRS_o_ai -vec_msums(vector unsigned short __a, - vector unsigned short __b, - vector unsigned int __c) -{ +static vector unsigned int __ATTRS_o_ai vec_msums(vector unsigned short __a, + vector unsigned short __b, + vector unsigned int __c) { return __builtin_altivec_vmsumuhs(__a, __b, __c); } /* vec_vmsumshs */ static vector int __attribute__((__always_inline__)) -vec_vmsumshs(vector short __a, vector short __b, vector int __c) -{ +vec_vmsumshs(vector short __a, vector short __b, vector int __c) { return __builtin_altivec_vmsumshs(__a, __b, __c); } /* vec_vmsumuhs */ static vector unsigned int __attribute__((__always_inline__)) -vec_vmsumuhs(vector unsigned short __a, - vector unsigned short __b, - vector unsigned int __c) -{ +vec_vmsumuhs(vector unsigned short __a, vector unsigned short __b, + vector unsigned int __c) { return __builtin_altivec_vmsumuhs(__a, __b, __c); } /* vec_mtvscr */ -static void __ATTRS_o_ai -vec_mtvscr(vector signed char __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector signed char __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector unsigned char __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector unsigned char __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector bool char __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector bool char __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector short __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector short __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector unsigned short __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector unsigned short __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector bool short __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector bool short __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector pixel __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector pixel __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector int __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector int __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector unsigned int __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector unsigned int __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector bool int __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector bool int __a) { __builtin_altivec_mtvscr((vector int)__a); } -static void __ATTRS_o_ai -vec_mtvscr(vector float __a) -{ +static void __ATTRS_o_ai vec_mtvscr(vector float __a) { __builtin_altivec_mtvscr((vector int)__a); } @@ -3875,9 +3466,8 @@ vec_mtvscr(vector float __a) /* vec_mule */ -static vector short __ATTRS_o_ai -vec_mule(vector signed char __a, vector signed char __b) -{ +static vector short __ATTRS_o_ai vec_mule(vector signed char __a, + vector signed char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosb(__a, __b); #else @@ -3885,9 +3475,8 @@ vec_mule(vector signed char __a, vector signed char __b) #endif } -static vector unsigned short __ATTRS_o_ai -vec_mule(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned short __ATTRS_o_ai vec_mule(vector unsigned char __a, + vector unsigned char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuloub(__a, __b); #else @@ -3895,9 +3484,7 @@ vec_mule(vector unsigned char __a, vector unsigned char __b) #endif } -static vector int __ATTRS_o_ai -vec_mule(vector short __a, vector short __b) -{ +static vector int __ATTRS_o_ai vec_mule(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosh(__a, __b); #else @@ -3905,9 +3492,8 @@ vec_mule(vector short __a, vector short __b) #endif } -static vector unsigned int __ATTRS_o_ai -vec_mule(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned int __ATTRS_o_ai vec_mule(vector unsigned short __a, + vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulouh(__a, __b); #else @@ -3916,9 +3502,8 @@ vec_mule(vector unsigned short __a, vector unsigned short __b) } #ifdef __POWER8_VECTOR__ -static vector signed long long __ATTRS_o_ai -vec_mule(vector signed int __a, vector signed int __b) -{ +static vector signed long long __ATTRS_o_ai vec_mule(vector signed int __a, + vector signed int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosw(__a, __b); #else @@ -3927,8 +3512,7 @@ vec_mule(vector signed int __a, vector signed int __b) } static vector unsigned long long __ATTRS_o_ai -vec_mule(vector unsigned int __a, vector unsigned int __b) -{ +vec_mule(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulouw(__a, __b); #else @@ -3940,8 +3524,7 @@ vec_mule(vector unsigned int __a, vector unsigned int __b) /* vec_vmulesb */ static vector short __attribute__((__always_inline__)) -vec_vmulesb(vector signed char __a, vector signed char __b) -{ +vec_vmulesb(vector signed char __a, vector signed char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosb(__a, __b); #else @@ -3952,8 +3535,7 @@ vec_vmulesb(vector signed char __a, vector signed char __b) /* vec_vmuleub */ static vector unsigned short __attribute__((__always_inline__)) -vec_vmuleub(vector unsigned char __a, vector unsigned char __b) -{ +vec_vmuleub(vector unsigned char __a, vector unsigned char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuloub(__a, __b); #else @@ -3964,8 +3546,7 @@ vec_vmuleub(vector unsigned char __a, vector unsigned char __b) /* vec_vmulesh */ static vector int __attribute__((__always_inline__)) -vec_vmulesh(vector short __a, vector short __b) -{ +vec_vmulesh(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosh(__a, __b); #else @@ -3976,8 +3557,7 @@ vec_vmulesh(vector short __a, vector short __b) /* vec_vmuleuh */ static vector unsigned int __attribute__((__always_inline__)) -vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) -{ +vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulouh(__a, __b); #else @@ -3987,9 +3567,8 @@ vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) /* vec_mulo */ -static vector short __ATTRS_o_ai -vec_mulo(vector signed char __a, vector signed char __b) -{ +static vector short __ATTRS_o_ai vec_mulo(vector signed char __a, + vector signed char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesb(__a, __b); #else @@ -3997,9 +3576,8 @@ vec_mulo(vector signed char __a, vector signed char __b) #endif } -static vector unsigned short __ATTRS_o_ai -vec_mulo(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned short __ATTRS_o_ai vec_mulo(vector unsigned char __a, + vector unsigned char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleub(__a, __b); #else @@ -4007,9 +3585,7 @@ vec_mulo(vector unsigned char __a, vector unsigned char __b) #endif } -static vector int __ATTRS_o_ai -vec_mulo(vector short __a, vector short __b) -{ +static vector int __ATTRS_o_ai vec_mulo(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesh(__a, __b); #else @@ -4017,9 +3593,8 @@ vec_mulo(vector short __a, vector short __b) #endif } -static vector unsigned int __ATTRS_o_ai -vec_mulo(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned int __ATTRS_o_ai vec_mulo(vector unsigned short __a, + vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleuh(__a, __b); #else @@ -4028,9 +3603,8 @@ vec_mulo(vector unsigned short __a, vector unsigned short __b) } #ifdef __POWER8_VECTOR__ -static vector signed long long __ATTRS_o_ai -vec_mulo(vector signed int __a, vector signed int __b) -{ +static vector signed long long __ATTRS_o_ai vec_mulo(vector signed int __a, + vector signed int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesw(__a, __b); #else @@ -4039,8 +3613,7 @@ vec_mulo(vector signed int __a, vector signed int __b) } static vector unsigned long long __ATTRS_o_ai -vec_mulo(vector unsigned int __a, vector unsigned int __b) -{ +vec_mulo(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleuw(__a, __b); #else @@ -4052,8 +3625,7 @@ vec_mulo(vector unsigned int __a, vector unsigned int __b) /* vec_vmulosb */ static vector short __attribute__((__always_inline__)) -vec_vmulosb(vector signed char __a, vector signed char __b) -{ +vec_vmulosb(vector signed char __a, vector signed char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesb(__a, __b); #else @@ -4064,8 +3636,7 @@ vec_vmulosb(vector signed char __a, vector signed char __b) /* vec_vmuloub */ static vector unsigned short __attribute__((__always_inline__)) -vec_vmuloub(vector unsigned char __a, vector unsigned char __b) -{ +vec_vmuloub(vector unsigned char __a, vector unsigned char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleub(__a, __b); #else @@ -4076,8 +3647,7 @@ vec_vmuloub(vector unsigned char __a, vector unsigned char __b) /* vec_vmulosh */ static vector int __attribute__((__always_inline__)) -vec_vmulosh(vector short __a, vector short __b) -{ +vec_vmulosh(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesh(__a, __b); #else @@ -4088,8 +3658,7 @@ vec_vmulosh(vector short __a, vector short __b) /* vec_vmulouh */ static vector unsigned int __attribute__((__always_inline__)) -vec_vmulouh(vector unsigned short __a, vector unsigned short __b) -{ +vec_vmulouh(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleuh(__a, __b); #else @@ -4100,16 +3669,14 @@ vec_vmulouh(vector unsigned short __a, vector unsigned short __b) /* vec_nmsub */ static vector float __attribute__((__always_inline__)) -vec_nmsub(vector float __a, vector float __b, vector float __c) -{ +vec_nmsub(vector float __a, vector float __b, vector float __c) { return __builtin_altivec_vnmsubfp(__a, __b, __c); } /* vec_vnmsubfp */ static vector float __attribute__((__always_inline__)) -vec_vnmsubfp(vector float __a, vector float __b, vector float __c) -{ +vec_vnmsubfp(vector float __a, vector float __b, vector float __c) { return __builtin_altivec_vnmsubfp(__a, __b, __c); } @@ -4117,516 +3684,534 @@ vec_vnmsubfp(vector float __a, vector float __b, vector float __c) #define __builtin_altivec_vnor vec_nor -static vector signed char __ATTRS_o_ai -vec_nor(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_nor(vector signed char __a, + vector signed char __b) { return ~(__a | __b); } -static vector unsigned char __ATTRS_o_ai -vec_nor(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_nor(vector unsigned char __a, + vector unsigned char __b) { return ~(__a | __b); } -static vector bool char __ATTRS_o_ai -vec_nor(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_nor(vector bool char __a, + vector bool char __b) { return ~(__a | __b); } -static vector short __ATTRS_o_ai -vec_nor(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_nor(vector short __a, vector short __b) { return ~(__a | __b); } -static vector unsigned short __ATTRS_o_ai -vec_nor(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_nor(vector unsigned short __a, + vector unsigned short __b) { return ~(__a | __b); } -static vector bool short __ATTRS_o_ai -vec_nor(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_nor(vector bool short __a, + vector bool short __b) { return ~(__a | __b); } -static vector int __ATTRS_o_ai -vec_nor(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_nor(vector int __a, vector int __b) { return ~(__a | __b); } -static vector unsigned int __ATTRS_o_ai -vec_nor(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_nor(vector unsigned int __a, + vector unsigned int __b) { return ~(__a | __b); } -static vector bool int __ATTRS_o_ai -vec_nor(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_nor(vector bool int __a, + vector bool int __b) { return ~(__a | __b); } -static vector float __ATTRS_o_ai -vec_nor(vector float __a, vector float __b) -{ - vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b); +static vector float __ATTRS_o_ai vec_nor(vector float __a, vector float __b) { + vector unsigned int __res = + ~((vector unsigned int)__a | (vector unsigned int)__b); return (vector float)__res; } /* vec_vnor */ -static vector signed char __ATTRS_o_ai -vec_vnor(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a, + vector signed char __b) { return ~(__a | __b); } -static vector unsigned char __ATTRS_o_ai -vec_vnor(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vnor(vector unsigned char __a, + vector unsigned char __b) { return ~(__a | __b); } -static vector bool char __ATTRS_o_ai -vec_vnor(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_vnor(vector bool char __a, + vector bool char __b) { return ~(__a | __b); } -static vector short __ATTRS_o_ai -vec_vnor(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vnor(vector short __a, vector short __b) { return ~(__a | __b); } -static vector unsigned short __ATTRS_o_ai -vec_vnor(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vnor(vector unsigned short __a, + vector unsigned short __b) { return ~(__a | __b); } -static vector bool short __ATTRS_o_ai -vec_vnor(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_vnor(vector bool short __a, + vector bool short __b) { return ~(__a | __b); } -static vector int __ATTRS_o_ai -vec_vnor(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vnor(vector int __a, vector int __b) { return ~(__a | __b); } -static vector unsigned int __ATTRS_o_ai -vec_vnor(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vnor(vector unsigned int __a, + vector unsigned int __b) { return ~(__a | __b); } -static vector bool int __ATTRS_o_ai -vec_vnor(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_vnor(vector bool int __a, + vector bool int __b) { return ~(__a | __b); } -static vector float __ATTRS_o_ai -vec_vnor(vector float __a, vector float __b) -{ - vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b); +static vector float __ATTRS_o_ai vec_vnor(vector float __a, vector float __b) { + vector unsigned int __res = + ~((vector unsigned int)__a | (vector unsigned int)__b); return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_nor(vector signed long long __a, vector signed long long __b) { + return ~(__a | __b); +} + +static vector unsigned long long __ATTRS_o_ai +vec_nor(vector unsigned long long __a, vector unsigned long long __b) { + return ~(__a | __b); +} + +static vector bool long long __ATTRS_o_ai vec_nor(vector bool long long __a, + vector bool long long __b) { + return ~(__a | __b); +} +#endif + /* vec_or */ #define __builtin_altivec_vor vec_or -static vector signed char __ATTRS_o_ai -vec_or(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_or(vector signed char __a, + vector signed char __b) { return __a | __b; } -static vector signed char __ATTRS_o_ai -vec_or(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_or(vector bool char __a, + vector signed char __b) { return (vector signed char)__a | __b; } -static vector signed char __ATTRS_o_ai -vec_or(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_or(vector signed char __a, + vector bool char __b) { return __a | (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_or(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a, + vector unsigned char __b) { return __a | __b; } -static vector unsigned char __ATTRS_o_ai -vec_or(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_or(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a | __b; } -static vector unsigned char __ATTRS_o_ai -vec_or(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a, + vector bool char __b) { return __a | (vector unsigned char)__b; } -static vector bool char __ATTRS_o_ai -vec_or(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_or(vector bool char __a, + vector bool char __b) { return __a | __b; } -static vector short __ATTRS_o_ai -vec_or(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_or(vector short __a, vector short __b) { return __a | __b; } -static vector short __ATTRS_o_ai -vec_or(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_or(vector bool short __a, + vector short __b) { return (vector short)__a | __b; } -static vector short __ATTRS_o_ai -vec_or(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_or(vector short __a, + vector bool short __b) { return __a | (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_or(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a, + vector unsigned short __b) { return __a | __b; } -static vector unsigned short __ATTRS_o_ai -vec_or(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_or(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a | __b; } -static vector unsigned short __ATTRS_o_ai -vec_or(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a, + vector bool short __b) { return __a | (vector unsigned short)__b; } -static vector bool short __ATTRS_o_ai -vec_or(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_or(vector bool short __a, + vector bool short __b) { return __a | __b; } -static vector int __ATTRS_o_ai -vec_or(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_or(vector int __a, vector int __b) { return __a | __b; } -static vector int __ATTRS_o_ai -vec_or(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_or(vector bool int __a, vector int __b) { return (vector int)__a | __b; } -static vector int __ATTRS_o_ai -vec_or(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_or(vector int __a, vector bool int __b) { return __a | (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_or(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a, + vector unsigned int __b) { return __a | __b; } -static vector unsigned int __ATTRS_o_ai -vec_or(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_or(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a | __b; } -static vector unsigned int __ATTRS_o_ai -vec_or(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a, + vector bool int __b) { return __a | (vector unsigned int)__b; } -static vector bool int __ATTRS_o_ai -vec_or(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_or(vector bool int __a, + vector bool int __b) { return __a | __b; } -static vector float __ATTRS_o_ai -vec_or(vector float __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_or(vector float __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_or(vector bool int __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_or(vector bool int __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_or(vector float __a, vector bool int __b) -{ - vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_or(vector float __a, vector bool int __b) { + vector unsigned int __res = + (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_or(vector signed long long __a, vector signed long long __b) { + return __a | __b; +} + +static vector signed long long __ATTRS_o_ai +vec_or(vector bool long long __a, vector signed long long __b) { + return (vector signed long long)__a | __b; +} + +static vector signed long long __ATTRS_o_ai vec_or(vector signed long long __a, + vector bool long long __b) { + return __a | (vector signed long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_or(vector unsigned long long __a, vector unsigned long long __b) { + return __a | __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_or(vector bool long long __a, vector unsigned long long __b) { + return (vector unsigned long long)__a | __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_or(vector unsigned long long __a, vector bool long long __b) { + return __a | (vector unsigned long long)__b; +} + +static vector bool long long __ATTRS_o_ai vec_or(vector bool long long __a, + vector bool long long __b) { + return __a | __b; +} +#endif + /* vec_vor */ -static vector signed char __ATTRS_o_ai -vec_vor(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a, + vector signed char __b) { return __a | __b; } -static vector signed char __ATTRS_o_ai -vec_vor(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vor(vector bool char __a, + vector signed char __b) { return (vector signed char)__a | __b; } -static vector signed char __ATTRS_o_ai -vec_vor(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a, + vector bool char __b) { return __a | (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_vor(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a, + vector unsigned char __b) { return __a | __b; } -static vector unsigned char __ATTRS_o_ai -vec_vor(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vor(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a | __b; } -static vector unsigned char __ATTRS_o_ai -vec_vor(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a, + vector bool char __b) { return __a | (vector unsigned char)__b; } -static vector bool char __ATTRS_o_ai -vec_vor(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_vor(vector bool char __a, + vector bool char __b) { return __a | __b; } -static vector short __ATTRS_o_ai -vec_vor(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vor(vector short __a, vector short __b) { return __a | __b; } -static vector short __ATTRS_o_ai -vec_vor(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vor(vector bool short __a, + vector short __b) { return (vector short)__a | __b; } -static vector short __ATTRS_o_ai -vec_vor(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vor(vector short __a, + vector bool short __b) { return __a | (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_vor(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a, + vector unsigned short __b) { return __a | __b; } -static vector unsigned short __ATTRS_o_ai -vec_vor(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vor(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a | __b; } -static vector unsigned short __ATTRS_o_ai -vec_vor(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a, + vector bool short __b) { return __a | (vector unsigned short)__b; } -static vector bool short __ATTRS_o_ai -vec_vor(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_vor(vector bool short __a, + vector bool short __b) { return __a | __b; } -static vector int __ATTRS_o_ai -vec_vor(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vor(vector int __a, vector int __b) { return __a | __b; } -static vector int __ATTRS_o_ai -vec_vor(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vor(vector bool int __a, vector int __b) { return (vector int)__a | __b; } -static vector int __ATTRS_o_ai -vec_vor(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vor(vector int __a, vector bool int __b) { return __a | (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_vor(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a, + vector unsigned int __b) { return __a | __b; } -static vector unsigned int __ATTRS_o_ai -vec_vor(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vor(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a | __b; } -static vector unsigned int __ATTRS_o_ai -vec_vor(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a, + vector bool int __b) { return __a | (vector unsigned int)__b; } -static vector bool int __ATTRS_o_ai -vec_vor(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_vor(vector bool int __a, + vector bool int __b) { return __a | __b; } -static vector float __ATTRS_o_ai -vec_vor(vector float __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vor(vector float __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vor(vector bool int __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vor(vector bool int __a, + vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vor(vector float __a, vector bool int __b) -{ - vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vor(vector float __a, + vector bool int __b) { + vector unsigned int __res = + (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_vor(vector signed long long __a, vector signed long long __b) { + return __a | __b; +} + +static vector signed long long __ATTRS_o_ai +vec_vor(vector bool long long __a, vector signed long long __b) { + return (vector signed long long)__a | __b; +} + +static vector signed long long __ATTRS_o_ai vec_vor(vector signed long long __a, + vector bool long long __b) { + return __a | (vector signed long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vor(vector unsigned long long __a, vector unsigned long long __b) { + return __a | __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vor(vector bool long long __a, vector unsigned long long __b) { + return (vector unsigned long long)__a | __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vor(vector unsigned long long __a, vector bool long long __b) { + return __a | (vector unsigned long long)__b; +} + +static vector bool long long __ATTRS_o_ai vec_vor(vector bool long long __a, + vector bool long long __b) { + return __a | __b; +} +#endif + /* vec_pack */ /* The various vector pack instructions have a big-endian bias, so for little endian we must handle reversed element numbering. */ -static vector signed char __ATTRS_o_ai -vec_pack(vector signed short __a, vector signed short __b) -{ +static vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, + vector signed short __b) { #ifdef __LITTLE_ENDIAN__ - return (vector signed char)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, - 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); + return (vector signed char)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, + 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else - return (vector signed char)vec_perm(__a, __b, (vector unsigned char) - (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, - 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); + return (vector signed char)vec_perm( + __a, __b, + (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, + 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif } -static vector unsigned char __ATTRS_o_ai -vec_pack(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned char __ATTRS_o_ai vec_pack(vector unsigned short __a, + vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ - return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, - 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); + return (vector unsigned char)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, + 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else - return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char) - (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, - 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); + return (vector unsigned char)vec_perm( + __a, __b, + (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, + 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif } -static vector bool char __ATTRS_o_ai -vec_pack(vector bool short __a, vector bool short __b) -{ +static vector bool char __ATTRS_o_ai vec_pack(vector bool short __a, + vector bool short __b) { #ifdef __LITTLE_ENDIAN__ - return (vector bool char)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, - 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); + return (vector bool char)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, + 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else - return (vector bool char)vec_perm(__a, __b, (vector unsigned char) - (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, - 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); + return (vector bool char)vec_perm( + __a, __b, + (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, + 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif } -static vector short __ATTRS_o_ai -vec_pack(vector int __a, vector int __b) -{ +static vector short __ATTRS_o_ai vec_pack(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ - return (vector short)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, - 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); + return (vector short)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, + 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else - return (vector short)vec_perm(__a, __b, (vector unsigned char) - (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, - 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); + return (vector short)vec_perm( + __a, __b, + (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, + 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif } -static vector unsigned short __ATTRS_o_ai -vec_pack(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned short __ATTRS_o_ai vec_pack(vector unsigned int __a, + vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ - return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, - 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); + return (vector unsigned short)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, + 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else - return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char) - (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, - 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); + return (vector unsigned short)vec_perm( + __a, __b, + (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, + 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif } -static vector bool short __ATTRS_o_ai -vec_pack(vector bool int __a, vector bool int __b) -{ +static vector bool short __ATTRS_o_ai vec_pack(vector bool int __a, + vector bool int __b) { #ifdef __LITTLE_ENDIAN__ - return (vector bool short)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, - 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); + return (vector bool short)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, + 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else - return (vector bool short)vec_perm(__a, __b, (vector unsigned char) - (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, - 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); + return (vector bool short)vec_perm( + __a, __b, + (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, + 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif } @@ -4634,45 +4219,48 @@ vec_pack(vector bool int __a, vector bool int __b) #define __builtin_altivec_vpkuhum vec_vpkuhum -static vector signed char __ATTRS_o_ai -vec_vpkuhum(vector signed short __a, vector signed short __b) -{ +static vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a, + vector signed short __b) { #ifdef __LITTLE_ENDIAN__ - return (vector signed char)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, - 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); + return (vector signed char)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, + 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else - return (vector signed char)vec_perm(__a, __b, (vector unsigned char) - (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, - 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); + return (vector signed char)vec_perm( + __a, __b, + (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, + 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif } static vector unsigned char __ATTRS_o_ai -vec_vpkuhum(vector unsigned short __a, vector unsigned short __b) -{ +vec_vpkuhum(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ - return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, - 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); + return (vector unsigned char)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, + 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else - return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char) - (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, - 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); + return (vector unsigned char)vec_perm( + __a, __b, + (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, + 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif } -static vector bool char __ATTRS_o_ai -vec_vpkuhum(vector bool short __a, vector bool short __b) -{ +static vector bool char __ATTRS_o_ai vec_vpkuhum(vector bool short __a, + vector bool short __b) { #ifdef __LITTLE_ENDIAN__ - return (vector bool char)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, - 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); + return (vector bool char)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, + 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else - return (vector bool char)vec_perm(__a, __b, (vector unsigned char) - (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, - 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); + return (vector bool char)vec_perm( + __a, __b, + (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, + 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif } @@ -4680,45 +4268,47 @@ vec_vpkuhum(vector bool short __a, vector bool short __b) #define __builtin_altivec_vpkuwum vec_vpkuwum -static vector short __ATTRS_o_ai -vec_vpkuwum(vector int __a, vector int __b) -{ +static vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ - return (vector short)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, - 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); + return (vector short)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, + 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else - return (vector short)vec_perm(__a, __b, (vector unsigned char) - (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, - 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); + return (vector short)vec_perm( + __a, __b, + (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, + 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif } -static vector unsigned short __ATTRS_o_ai -vec_vpkuwum(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vpkuwum(vector unsigned int __a, + vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ - return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, - 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); + return (vector unsigned short)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, + 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else - return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char) - (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, - 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); + return (vector unsigned short)vec_perm( + __a, __b, + (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, + 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif } -static vector bool short __ATTRS_o_ai -vec_vpkuwum(vector bool int __a, vector bool int __b) -{ +static vector bool short __ATTRS_o_ai vec_vpkuwum(vector bool int __a, + vector bool int __b) { #ifdef __LITTLE_ENDIAN__ - return (vector bool short)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, - 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); + return (vector bool short)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, + 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else - return (vector bool short)vec_perm(__a, __b, (vector unsigned char) - (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, - 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); + return (vector bool short)vec_perm( + __a, __b, + (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, + 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif } @@ -4727,49 +4317,48 @@ vec_vpkuwum(vector bool int __a, vector bool int __b) #ifdef __POWER8_VECTOR__ #define __builtin_altivec_vpkudum vec_vpkudum -static vector int __ATTRS_o_ai -vec_vpkudum(vector long long __a, vector long long __b) -{ +static vector int __ATTRS_o_ai vec_vpkudum(vector long long __a, + vector long long __b) { #ifdef __LITTLE_ENDIAN__ - return (vector int)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, - 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); + return (vector int)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, + 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else - return (vector int)vec_perm(__a, __b, (vector unsigned char) - (0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, - 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); + return (vector int)vec_perm( + __a, __b, + (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, + 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif } static vector unsigned int __ATTRS_o_ai -vec_vpkudum(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_vpkudum(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ - return (vector unsigned int)vec_perm(__a, __b, (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, - 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); + return (vector unsigned int)vec_perm( + __a, __b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, + 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else - return (vector unsigned int)vec_perm(__a, __b, (vector unsigned char) - (0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, - 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); + return (vector unsigned int)vec_perm( + __a, __b, + (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, + 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif } -static vector bool int __ATTRS_o_ai -vec_vpkudum(vector bool long long __a, vector bool long long __b) -{ +static vector bool int __ATTRS_o_ai vec_vpkudum(vector bool long long __a, + vector bool long long __b) { #ifdef __LITTLE_ENDIAN__ - return (vector bool int)vec_perm((vector long long)__a, - (vector long long)__b, - (vector unsigned char) - (0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, - 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); + return (vector bool int)vec_perm( + (vector long long)__a, (vector long long)__b, + (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, + 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else - return (vector bool int)vec_perm((vector long long)__a, - (vector long long)__b, - (vector unsigned char) - (0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, - 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); + return (vector bool int)vec_perm( + (vector long long)__a, (vector long long)__b, + (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, + 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif } #endif @@ -4777,8 +4366,7 @@ vec_vpkudum(vector bool long long __a, vector bool long long __b) /* vec_packpx */ static vector pixel __attribute__((__always_inline__)) -vec_packpx(vector unsigned int __a, vector unsigned int __b) -{ +vec_packpx(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return (vector pixel)__builtin_altivec_vpkpx(__b, __a); #else @@ -4789,8 +4377,7 @@ vec_packpx(vector unsigned int __a, vector unsigned int __b) /* vec_vpkpx */ static vector pixel __attribute__((__always_inline__)) -vec_vpkpx(vector unsigned int __a, vector unsigned int __b) -{ +vec_vpkpx(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return (vector pixel)__builtin_altivec_vpkpx(__b, __a); #else @@ -4800,9 +4387,8 @@ vec_vpkpx(vector unsigned int __a, vector unsigned int __b) /* vec_packs */ -static vector signed char __ATTRS_o_ai -vec_packs(vector short __a, vector short __b) -{ +static vector signed char __ATTRS_o_ai vec_packs(vector short __a, + vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkshss(__b, __a); #else @@ -4810,9 +4396,8 @@ vec_packs(vector short __a, vector short __b) #endif } -static vector unsigned char __ATTRS_o_ai -vec_packs(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned char __ATTRS_o_ai vec_packs(vector unsigned short __a, + vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuhus(__b, __a); #else @@ -4820,9 +4405,8 @@ vec_packs(vector unsigned short __a, vector unsigned short __b) #endif } -static vector signed short __ATTRS_o_ai -vec_packs(vector int __a, vector int __b) -{ +static vector signed short __ATTRS_o_ai vec_packs(vector int __a, + vector int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkswss(__b, __a); #else @@ -4830,9 +4414,8 @@ vec_packs(vector int __a, vector int __b) #endif } -static vector unsigned short __ATTRS_o_ai -vec_packs(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned short __ATTRS_o_ai vec_packs(vector unsigned int __a, + vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuwus(__b, __a); #else @@ -4841,9 +4424,8 @@ vec_packs(vector unsigned int __a, vector unsigned int __b) } #ifdef __POWER8_VECTOR__ -static vector int __ATTRS_o_ai -vec_packs(vector long long __a, vector long long __b) -{ +static vector int __ATTRS_o_ai vec_packs(vector long long __a, + vector long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpksdss(__b, __a); #else @@ -4852,8 +4434,7 @@ vec_packs(vector long long __a, vector long long __b) } static vector unsigned int __ATTRS_o_ai -vec_packs(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_packs(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkudus(__b, __a); #else @@ -4865,8 +4446,7 @@ vec_packs(vector unsigned long long __a, vector unsigned long long __b) /* vec_vpkshss */ static vector signed char __attribute__((__always_inline__)) -vec_vpkshss(vector short __a, vector short __b) -{ +vec_vpkshss(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkshss(__b, __a); #else @@ -4877,9 +4457,8 @@ vec_vpkshss(vector short __a, vector short __b) /* vec_vpksdss */ #ifdef __POWER8_VECTOR__ -static vector int __ATTRS_o_ai -vec_vpksdss(vector long long __a, vector long long __b) -{ +static vector int __ATTRS_o_ai vec_vpksdss(vector long long __a, + vector long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpksdss(__b, __a); #else @@ -4891,8 +4470,7 @@ vec_vpksdss(vector long long __a, vector long long __b) /* vec_vpkuhus */ static vector unsigned char __attribute__((__always_inline__)) -vec_vpkuhus(vector unsigned short __a, vector unsigned short __b) -{ +vec_vpkuhus(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuhus(__b, __a); #else @@ -4904,8 +4482,7 @@ vec_vpkuhus(vector unsigned short __a, vector unsigned short __b) #ifdef __POWER8_VECTOR__ static vector unsigned int __attribute__((__always_inline__)) -vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkudus(__b, __a); #else @@ -4917,8 +4494,7 @@ vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b) /* vec_vpkswss */ static vector signed short __attribute__((__always_inline__)) -vec_vpkswss(vector int __a, vector int __b) -{ +vec_vpkswss(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkswss(__b, __a); #else @@ -4929,8 +4505,7 @@ vec_vpkswss(vector int __a, vector int __b) /* vec_vpkuwus */ static vector unsigned short __attribute__((__always_inline__)) -vec_vpkuwus(vector unsigned int __a, vector unsigned int __b) -{ +vec_vpkuwus(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuwus(__b, __a); #else @@ -4940,9 +4515,8 @@ vec_vpkuwus(vector unsigned int __a, vector unsigned int __b) /* vec_packsu */ -static vector unsigned char __ATTRS_o_ai -vec_packsu(vector short __a, vector short __b) -{ +static vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a, + vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkshus(__b, __a); #else @@ -4950,9 +4524,8 @@ vec_packsu(vector short __a, vector short __b) #endif } -static vector unsigned char __ATTRS_o_ai -vec_packsu(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned char __ATTRS_o_ai vec_packsu(vector unsigned short __a, + vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuhus(__b, __a); #else @@ -4960,9 +4533,8 @@ vec_packsu(vector unsigned short __a, vector unsigned short __b) #endif } -static vector unsigned short __ATTRS_o_ai -vec_packsu(vector int __a, vector int __b) -{ +static vector unsigned short __ATTRS_o_ai vec_packsu(vector int __a, + vector int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkswus(__b, __a); #else @@ -4970,9 +4542,8 @@ vec_packsu(vector int __a, vector int __b) #endif } -static vector unsigned short __ATTRS_o_ai -vec_packsu(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned short __ATTRS_o_ai vec_packsu(vector unsigned int __a, + vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuwus(__b, __a); #else @@ -4981,9 +4552,8 @@ vec_packsu(vector unsigned int __a, vector unsigned int __b) } #ifdef __POWER8_VECTOR__ -static vector unsigned int __ATTRS_o_ai -vec_packsu(vector long long __a, vector long long __b) -{ +static vector unsigned int __ATTRS_o_ai vec_packsu(vector long long __a, + vector long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpksdus(__b, __a); #else @@ -4992,8 +4562,7 @@ vec_packsu(vector long long __a, vector long long __b) } static vector unsigned int __ATTRS_o_ai -vec_packsu(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_packsu(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkudus(__b, __a); #else @@ -5004,9 +4573,8 @@ vec_packsu(vector unsigned long long __a, vector unsigned long long __b) /* vec_vpkshus */ -static vector unsigned char __ATTRS_o_ai -vec_vpkshus(vector short __a, vector short __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a, + vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkshus(__b, __a); #else @@ -5015,8 +4583,7 @@ vec_vpkshus(vector short __a, vector short __b) } static vector unsigned char __ATTRS_o_ai -vec_vpkshus(vector unsigned short __a, vector unsigned short __b) -{ +vec_vpkshus(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuhus(__b, __a); #else @@ -5026,9 +4593,8 @@ vec_vpkshus(vector unsigned short __a, vector unsigned short __b) /* vec_vpkswus */ -static vector unsigned short __ATTRS_o_ai -vec_vpkswus(vector int __a, vector int __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a, + vector int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkswus(__b, __a); #else @@ -5036,9 +4602,8 @@ vec_vpkswus(vector int __a, vector int __b) #endif } -static vector unsigned short __ATTRS_o_ai -vec_vpkswus(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector unsigned int __a, + vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuwus(__b, __a); #else @@ -5049,9 +4614,8 @@ vec_vpkswus(vector unsigned int __a, vector unsigned int __b) /* vec_vpksdus */ #ifdef __POWER8_VECTOR__ -static vector unsigned int __ATTRS_o_ai -vec_vpksdus(vector long long __a, vector long long __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vpksdus(vector long long __a, + vector long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpksdus(__b, __a); #else @@ -5070,121 +4634,114 @@ vec_vpksdus(vector long long __a, vector long long __b) // in that the vec_xor can be recognized as a vec_nor (and for P8 and // later, possibly a vec_nand). -static vector signed char __ATTRS_o_ai -vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c) -{ +static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a, + vector signed char __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector signed char) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector signed char)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector signed char) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector signed char)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } -static vector unsigned char __ATTRS_o_ai -vec_perm(vector unsigned char __a, - vector unsigned char __b, - vector unsigned char __c) -{ +static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a, + vector unsigned char __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector unsigned char) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector unsigned char)__builtin_altivec_vperm_4si( + (vector int)__b, (vector int)__a, __d); #else - return (vector unsigned char) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector unsigned char)__builtin_altivec_vperm_4si( + (vector int)__a, (vector int)__b, __c); #endif } -static vector bool char __ATTRS_o_ai -vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c) -{ +static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a, + vector bool char __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector bool char) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector bool char)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector bool char) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector bool char)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } -static vector short __ATTRS_o_ai -vec_perm(vector short __a, vector short __b, vector unsigned char __c) -{ +static vector short __ATTRS_o_ai vec_perm(vector short __a, vector short __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector short) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector short)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector short) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector short)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } -static vector unsigned short __ATTRS_o_ai -vec_perm(vector unsigned short __a, - vector unsigned short __b, - vector unsigned char __c) -{ +static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a, + vector unsigned short __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector unsigned short) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector unsigned short)__builtin_altivec_vperm_4si( + (vector int)__b, (vector int)__a, __d); #else - return (vector unsigned short) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector unsigned short)__builtin_altivec_vperm_4si( + (vector int)__a, (vector int)__b, __c); #endif } -static vector bool short __ATTRS_o_ai -vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c) -{ +static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a, + vector bool short __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector bool short) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector bool short)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector bool short) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector bool short)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } -static vector pixel __ATTRS_o_ai -vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c) -{ +static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector pixel) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector pixel)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector pixel) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector pixel)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } -static vector int __ATTRS_o_ai -vec_perm(vector int __a, vector int __b, vector unsigned char __c) -{ +static vector int __ATTRS_o_ai vec_perm(vector int __a, vector int __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector int)__builtin_altivec_vperm_4si(__b, __a, __d); #else @@ -5192,58 +4749,57 @@ vec_perm(vector int __a, vector int __b, vector unsigned char __c) #endif } -static vector unsigned int __ATTRS_o_ai -vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c) -{ +static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a, + vector unsigned int __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector unsigned int) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector unsigned int) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } -static vector bool int __ATTRS_o_ai -vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c) -{ +static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a, + vector bool int __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector bool int) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector bool int)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector bool int) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector bool int)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } -static vector float __ATTRS_o_ai -vec_perm(vector float __a, vector float __b, vector unsigned char __c) -{ +static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector float) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector float)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector float) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector float)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } #ifdef __VSX__ -static vector long long __ATTRS_o_ai -vec_perm(vector long long __a, vector long long __b, vector unsigned char __c) -{ +static vector long long __ATTRS_o_ai vec_perm(vector long long __a, + vector long long __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector long long)__builtin_altivec_vperm_4si(__b, __a, __d); #else @@ -5253,125 +4809,114 @@ vec_perm(vector long long __a, vector long long __b, vector unsigned char __c) static vector unsigned long long __ATTRS_o_ai vec_perm(vector unsigned long long __a, vector unsigned long long __b, - vector unsigned char __c) -{ + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector unsigned long long) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector unsigned long long)__builtin_altivec_vperm_4si( + (vector int)__b, (vector int)__a, __d); #else - return (vector unsigned long long) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector unsigned long long)__builtin_altivec_vperm_4si( + (vector int)__a, (vector int)__b, __c); #endif } -static vector double __ATTRS_o_ai -vec_perm(vector double __a, vector double __b, vector unsigned char __c) -{ +static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b, + vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ - vector unsigned char __d = {255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; + vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); - return (vector double) - __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); + return (vector double)__builtin_altivec_vperm_4si((vector int)__b, + (vector int)__a, __d); #else - return (vector double) - __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); + return (vector double)__builtin_altivec_vperm_4si((vector int)__a, + (vector int)__b, __c); #endif } #endif /* vec_vperm */ -static vector signed char __ATTRS_o_ai -vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c) -{ +static vector signed char __ATTRS_o_ai vec_vperm(vector signed char __a, + vector signed char __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector unsigned char __ATTRS_o_ai -vec_vperm(vector unsigned char __a, - vector unsigned char __b, - vector unsigned char __c) -{ +static vector unsigned char __ATTRS_o_ai vec_vperm(vector unsigned char __a, + vector unsigned char __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector bool char __ATTRS_o_ai -vec_vperm(vector bool char __a, vector bool char __b, vector unsigned char __c) -{ +static vector bool char __ATTRS_o_ai vec_vperm(vector bool char __a, + vector bool char __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector short __ATTRS_o_ai -vec_vperm(vector short __a, vector short __b, vector unsigned char __c) -{ +static vector short __ATTRS_o_ai vec_vperm(vector short __a, vector short __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector unsigned short __ATTRS_o_ai -vec_vperm(vector unsigned short __a, - vector unsigned short __b, - vector unsigned char __c) -{ +static vector unsigned short __ATTRS_o_ai vec_vperm(vector unsigned short __a, + vector unsigned short __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector bool short __ATTRS_o_ai -vec_vperm(vector bool short __a, vector bool short __b, vector unsigned char __c) -{ +static vector bool short __ATTRS_o_ai vec_vperm(vector bool short __a, + vector bool short __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector pixel __ATTRS_o_ai -vec_vperm(vector pixel __a, vector pixel __b, vector unsigned char __c) -{ +static vector pixel __ATTRS_o_ai vec_vperm(vector pixel __a, vector pixel __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector int __ATTRS_o_ai -vec_vperm(vector int __a, vector int __b, vector unsigned char __c) -{ +static vector int __ATTRS_o_ai vec_vperm(vector int __a, vector int __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector unsigned int __ATTRS_o_ai -vec_vperm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c) -{ +static vector unsigned int __ATTRS_o_ai vec_vperm(vector unsigned int __a, + vector unsigned int __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector bool int __ATTRS_o_ai -vec_vperm(vector bool int __a, vector bool int __b, vector unsigned char __c) -{ +static vector bool int __ATTRS_o_ai vec_vperm(vector bool int __a, + vector bool int __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector float __ATTRS_o_ai -vec_vperm(vector float __a, vector float __b, vector unsigned char __c) -{ +static vector float __ATTRS_o_ai vec_vperm(vector float __a, vector float __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } #ifdef __VSX__ -static vector long long __ATTRS_o_ai -vec_vperm(vector long long __a, vector long long __b, vector unsigned char __c) -{ +static vector long long __ATTRS_o_ai vec_vperm(vector long long __a, + vector long long __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } static vector unsigned long long __ATTRS_o_ai vec_vperm(vector unsigned long long __a, vector unsigned long long __b, - vector unsigned char __c) -{ + vector unsigned char __c) { return vec_perm(__a, __b, __c); } -static vector double __ATTRS_o_ai -vec_vperm(vector double __a, vector double __b, vector unsigned char __c) -{ +static vector double __ATTRS_o_ai vec_vperm(vector double __a, + vector double __b, + vector unsigned char __c) { return vec_perm(__a, __b, __c); } #endif @@ -5379,142 +4924,121 @@ vec_vperm(vector double __a, vector double __b, vector unsigned char __c) /* vec_re */ static vector float __attribute__((__always_inline__)) -vec_re(vector float __a) -{ +vec_re(vector float __a) { return __builtin_altivec_vrefp(__a); } /* vec_vrefp */ static vector float __attribute__((__always_inline__)) -vec_vrefp(vector float __a) -{ +vec_vrefp(vector float __a) { return __builtin_altivec_vrefp(__a); } /* vec_rl */ -static vector signed char __ATTRS_o_ai -vec_rl(vector signed char __a, vector unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_rl(vector signed char __a, + vector unsigned char __b) { return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_rl(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_rl(vector unsigned char __a, + vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b); } -static vector short __ATTRS_o_ai -vec_rl(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_rl(vector short __a, + vector unsigned short __b) { return __builtin_altivec_vrlh(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_rl(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_rl(vector unsigned short __a, + vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b); } -static vector int __ATTRS_o_ai -vec_rl(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_rl(vector int __a, vector unsigned int __b) { return __builtin_altivec_vrlw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_rl(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_rl(vector unsigned int __a, + vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b); } #ifdef __POWER8_VECTOR__ static vector signed long long __ATTRS_o_ai -vec_rl(vector signed long long __a, vector unsigned long long __b) -{ +vec_rl(vector signed long long __a, vector unsigned long long __b) { return __builtin_altivec_vrld(__a, __b); } static vector unsigned long long __ATTRS_o_ai -vec_rl(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_rl(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vrld(__a, __b); } #endif /* vec_vrlb */ -static vector signed char __ATTRS_o_ai -vec_vrlb(vector signed char __a, vector unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a, + vector unsigned char __b) { return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vrlb(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vrlb(vector unsigned char __a, + vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b); } /* vec_vrlh */ -static vector short __ATTRS_o_ai -vec_vrlh(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_vrlh(vector short __a, + vector unsigned short __b) { return __builtin_altivec_vrlh(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_vrlh(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vrlh(vector unsigned short __a, + vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b); } /* vec_vrlw */ -static vector int __ATTRS_o_ai -vec_vrlw(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_vrlw(vector int __a, + vector unsigned int __b) { return __builtin_altivec_vrlw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vrlw(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vrlw(vector unsigned int __a, + vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b); } /* vec_round */ static vector float __attribute__((__always_inline__)) -vec_round(vector float __a) -{ +vec_round(vector float __a) { return __builtin_altivec_vrfin(__a); } /* vec_vrfin */ static vector float __attribute__((__always_inline__)) -vec_vrfin(vector float __a) -{ +vec_vrfin(vector float __a) { return __builtin_altivec_vrfin(__a); } /* vec_rsqrte */ static __vector float __attribute__((__always_inline__)) -vec_rsqrte(vector float __a) -{ +vec_rsqrte(vector float __a) { return __builtin_altivec_vrsqrtefp(__a); } /* vec_vrsqrtefp */ static __vector float __attribute__((__always_inline__)) -vec_vrsqrtefp(vector float __a) -{ +vec_vrsqrtefp(vector float __a) { return __builtin_altivec_vrsqrtefp(__a); } @@ -5522,308 +5046,285 @@ vec_vrsqrtefp(vector float __a) #define __builtin_altivec_vsel_4si vec_sel -static vector signed char __ATTRS_o_ai -vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c) -{ +static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a, + vector signed char __b, + vector unsigned char __c) { return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c); } -static vector signed char __ATTRS_o_ai -vec_sel(vector signed char __a, vector signed char __b, vector bool char __c) -{ +static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a, + vector signed char __b, + vector bool char __c) { return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c); } -static vector unsigned char __ATTRS_o_ai -vec_sel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c) -{ +static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a, + vector unsigned char __b, + vector unsigned char __c) { return (__a & ~__c) | (__b & __c); } -static vector unsigned char __ATTRS_o_ai -vec_sel(vector unsigned char __a, vector unsigned char __b, vector bool char __c) -{ +static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a, + vector unsigned char __b, + vector bool char __c) { return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c); } -static vector bool char __ATTRS_o_ai -vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c) -{ +static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a, + vector bool char __b, + vector unsigned char __c) { return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c); } -static vector bool char __ATTRS_o_ai -vec_sel(vector bool char __a, vector bool char __b, vector bool char __c) -{ +static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a, + vector bool char __b, + vector bool char __c) { return (__a & ~__c) | (__b & __c); } -static vector short __ATTRS_o_ai -vec_sel(vector short __a, vector short __b, vector unsigned short __c) -{ +static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b, + vector unsigned short __c) { return (__a & ~(vector short)__c) | (__b & (vector short)__c); } -static vector short __ATTRS_o_ai -vec_sel(vector short __a, vector short __b, vector bool short __c) -{ +static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b, + vector bool short __c) { return (__a & ~(vector short)__c) | (__b & (vector short)__c); } -static vector unsigned short __ATTRS_o_ai -vec_sel(vector unsigned short __a, - vector unsigned short __b, - vector unsigned short __c) -{ +static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a, + vector unsigned short __b, + vector unsigned short __c) { return (__a & ~__c) | (__b & __c); } -static vector unsigned short __ATTRS_o_ai -vec_sel(vector unsigned short __a, vector unsigned short __b, vector bool short __c) -{ - return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c); +static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a, + vector unsigned short __b, + vector bool short __c) { + return (__a & ~(vector unsigned short)__c) | + (__b & (vector unsigned short)__c); } -static vector bool short __ATTRS_o_ai -vec_sel(vector bool short __a, vector bool short __b, vector unsigned short __c) -{ +static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a, + vector bool short __b, + vector unsigned short __c) { return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c); } -static vector bool short __ATTRS_o_ai -vec_sel(vector bool short __a, vector bool short __b, vector bool short __c) -{ +static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a, + vector bool short __b, + vector bool short __c) { return (__a & ~__c) | (__b & __c); } -static vector int __ATTRS_o_ai -vec_sel(vector int __a, vector int __b, vector unsigned int __c) -{ +static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b, + vector unsigned int __c) { return (__a & ~(vector int)__c) | (__b & (vector int)__c); } -static vector int __ATTRS_o_ai -vec_sel(vector int __a, vector int __b, vector bool int __c) -{ +static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b, + vector bool int __c) { return (__a & ~(vector int)__c) | (__b & (vector int)__c); } -static vector unsigned int __ATTRS_o_ai -vec_sel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) -{ +static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a, + vector unsigned int __b, + vector unsigned int __c) { return (__a & ~__c) | (__b & __c); } -static vector unsigned int __ATTRS_o_ai -vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c) -{ +static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a, + vector unsigned int __b, + vector bool int __c) { return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c); } -static vector bool int __ATTRS_o_ai -vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c) -{ +static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a, + vector bool int __b, + vector unsigned int __c) { return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c); } -static vector bool int __ATTRS_o_ai -vec_sel(vector bool int __a, vector bool int __b, vector bool int __c) -{ +static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a, + vector bool int __b, + vector bool int __c) { return (__a & ~__c) | (__b & __c); } -static vector float __ATTRS_o_ai -vec_sel(vector float __a, vector float __b, vector unsigned int __c) -{ - vector int __res = ((vector int)__a & ~(vector int)__c) - | ((vector int)__b & (vector int)__c); +static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b, + vector unsigned int __c) { + vector int __res = ((vector int)__a & ~(vector int)__c) | + ((vector int)__b & (vector int)__c); return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_sel(vector float __a, vector float __b, vector bool int __c) -{ - vector int __res = ((vector int)__a & ~(vector int)__c) - | ((vector int)__b & (vector int)__c); +static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b, + vector bool int __c) { + vector int __res = ((vector int)__a & ~(vector int)__c) | + ((vector int)__b & (vector int)__c); return (vector float)__res; } /* vec_vsel */ -static vector signed char __ATTRS_o_ai -vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c) -{ +static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a, + vector signed char __b, + vector unsigned char __c) { return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c); } -static vector signed char __ATTRS_o_ai -vec_vsel(vector signed char __a, vector signed char __b, vector bool char __c) -{ +static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a, + vector signed char __b, + vector bool char __c) { return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c); } -static vector unsigned char __ATTRS_o_ai -vec_vsel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c) -{ +static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a, + vector unsigned char __b, + vector unsigned char __c) { return (__a & ~__c) | (__b & __c); } -static vector unsigned char __ATTRS_o_ai -vec_vsel(vector unsigned char __a, vector unsigned char __b, vector bool char __c) -{ +static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a, + vector unsigned char __b, + vector bool char __c) { return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c); } -static vector bool char __ATTRS_o_ai -vec_vsel(vector bool char __a, vector bool char __b, vector unsigned char __c) -{ +static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a, + vector bool char __b, + vector unsigned char __c) { return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c); } -static vector bool char __ATTRS_o_ai -vec_vsel(vector bool char __a, vector bool char __b, vector bool char __c) -{ +static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a, + vector bool char __b, + vector bool char __c) { return (__a & ~__c) | (__b & __c); } -static vector short __ATTRS_o_ai -vec_vsel(vector short __a, vector short __b, vector unsigned short __c) -{ +static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b, + vector unsigned short __c) { return (__a & ~(vector short)__c) | (__b & (vector short)__c); } -static vector short __ATTRS_o_ai -vec_vsel(vector short __a, vector short __b, vector bool short __c) -{ +static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b, + vector bool short __c) { return (__a & ~(vector short)__c) | (__b & (vector short)__c); } -static vector unsigned short __ATTRS_o_ai -vec_vsel(vector unsigned short __a, - vector unsigned short __b, - vector unsigned short __c) -{ +static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a, + vector unsigned short __b, + vector unsigned short __c) { return (__a & ~__c) | (__b & __c); } -static vector unsigned short __ATTRS_o_ai -vec_vsel(vector unsigned short __a, vector unsigned short __b, vector bool short __c) -{ - return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c); +static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a, + vector unsigned short __b, + vector bool short __c) { + return (__a & ~(vector unsigned short)__c) | + (__b & (vector unsigned short)__c); } -static vector bool short __ATTRS_o_ai -vec_vsel(vector bool short __a, vector bool short __b, vector unsigned short __c) -{ +static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a, + vector bool short __b, + vector unsigned short __c) { return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c); } -static vector bool short __ATTRS_o_ai -vec_vsel(vector bool short __a, vector bool short __b, vector bool short __c) -{ +static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a, + vector bool short __b, + vector bool short __c) { return (__a & ~__c) | (__b & __c); } -static vector int __ATTRS_o_ai -vec_vsel(vector int __a, vector int __b, vector unsigned int __c) -{ +static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b, + vector unsigned int __c) { return (__a & ~(vector int)__c) | (__b & (vector int)__c); } -static vector int __ATTRS_o_ai -vec_vsel(vector int __a, vector int __b, vector bool int __c) -{ +static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b, + vector bool int __c) { return (__a & ~(vector int)__c) | (__b & (vector int)__c); } -static vector unsigned int __ATTRS_o_ai -vec_vsel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) -{ +static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a, + vector unsigned int __b, + vector unsigned int __c) { return (__a & ~__c) | (__b & __c); } -static vector unsigned int __ATTRS_o_ai -vec_vsel(vector unsigned int __a, vector unsigned int __b, vector bool int __c) -{ +static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a, + vector unsigned int __b, + vector bool int __c) { return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c); } -static vector bool int __ATTRS_o_ai -vec_vsel(vector bool int __a, vector bool int __b, vector unsigned int __c) -{ +static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a, + vector bool int __b, + vector unsigned int __c) { return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c); } -static vector bool int __ATTRS_o_ai -vec_vsel(vector bool int __a, vector bool int __b, vector bool int __c) -{ +static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a, + vector bool int __b, + vector bool int __c) { return (__a & ~__c) | (__b & __c); } -static vector float __ATTRS_o_ai -vec_vsel(vector float __a, vector float __b, vector unsigned int __c) -{ - vector int __res = ((vector int)__a & ~(vector int)__c) - | ((vector int)__b & (vector int)__c); +static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b, + vector unsigned int __c) { + vector int __res = ((vector int)__a & ~(vector int)__c) | + ((vector int)__b & (vector int)__c); return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vsel(vector float __a, vector float __b, vector bool int __c) -{ - vector int __res = ((vector int)__a & ~(vector int)__c) - | ((vector int)__b & (vector int)__c); +static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b, + vector bool int __c) { + vector int __res = ((vector int)__a & ~(vector int)__c) | + ((vector int)__b & (vector int)__c); return (vector float)__res; } /* vec_sl */ -static vector signed char __ATTRS_o_ai -vec_sl(vector signed char __a, vector unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_sl(vector signed char __a, + vector unsigned char __b) { return __a << (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_sl(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a, + vector unsigned char __b) { return __a << __b; } -static vector short __ATTRS_o_ai -vec_sl(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_sl(vector short __a, + vector unsigned short __b) { return __a << (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_sl(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_sl(vector unsigned short __a, + vector unsigned short __b) { return __a << __b; } -static vector int __ATTRS_o_ai -vec_sl(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_sl(vector int __a, vector unsigned int __b) { return __a << (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_sl(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_sl(vector unsigned int __a, + vector unsigned int __b) { return __a << __b; } #ifdef __POWER8_VECTOR__ static vector signed long long __ATTRS_o_ai -vec_sl(vector signed long long __a, vector unsigned long long __b) -{ +vec_sl(vector signed long long __a, vector unsigned long long __b) { return __a << (vector long long)__b; } static vector unsigned long long __ATTRS_o_ai -vec_sl(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_sl(vector unsigned long long __a, vector unsigned long long __b) { return __a << __b; } #endif @@ -5832,15 +5333,13 @@ vec_sl(vector unsigned long long __a, vector unsigned long long __b) #define __builtin_altivec_vslb vec_vslb -static vector signed char __ATTRS_o_ai -vec_vslb(vector signed char __a, vector unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a, + vector unsigned char __b) { return vec_sl(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vslb(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vslb(vector unsigned char __a, + vector unsigned char __b) { return vec_sl(__a, __b); } @@ -5848,15 +5347,13 @@ vec_vslb(vector unsigned char __a, vector unsigned char __b) #define __builtin_altivec_vslh vec_vslh -static vector short __ATTRS_o_ai -vec_vslh(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_vslh(vector short __a, + vector unsigned short __b) { return vec_sl(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_vslh(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vslh(vector unsigned short __a, + vector unsigned short __b) { return vec_sl(__a, __b); } @@ -5864,15 +5361,13 @@ vec_vslh(vector unsigned short __a, vector unsigned short __b) #define __builtin_altivec_vslw vec_vslw -static vector int __ATTRS_o_ai -vec_vslw(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_vslw(vector int __a, + vector unsigned int __b) { return vec_sl(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vslw(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vslw(vector unsigned int __a, + vector unsigned int __b) { return vec_sl(__a, __b); } @@ -5880,847 +5375,789 @@ vec_vslw(vector unsigned int __a, vector unsigned int __b) #define __builtin_altivec_vsldoi_4si vec_sld -static vector signed char __ATTRS_o_ai -vec_sld(vector signed char __a, vector signed char __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector unsigned char __ATTRS_o_ai -vec_sld(vector unsigned char __a, vector unsigned char __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector short __ATTRS_o_ai -vec_sld(vector short __a, vector short __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector unsigned short __ATTRS_o_ai -vec_sld(vector unsigned short __a, vector unsigned short __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector pixel __ATTRS_o_ai -vec_sld(vector pixel __a, vector pixel __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector int __ATTRS_o_ai -vec_sld(vector int __a, vector int __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector unsigned int __ATTRS_o_ai -vec_sld(vector unsigned int __a, vector unsigned int __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector float __ATTRS_o_ai -vec_sld(vector float __a, vector float __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); +static vector signed char __ATTRS_o_ai vec_sld(vector signed char __a, + vector signed char __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector unsigned char __ATTRS_o_ai vec_sld(vector unsigned char __a, + vector unsigned char __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector short __ATTRS_o_ai vec_sld(vector short __a, vector short __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector unsigned short __ATTRS_o_ai vec_sld(vector unsigned short __a, + vector unsigned short __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector pixel __ATTRS_o_ai vec_sld(vector pixel __a, vector pixel __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector int __ATTRS_o_ai vec_sld(vector int __a, vector int __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector unsigned int __ATTRS_o_ai vec_sld(vector unsigned int __a, + vector unsigned int __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector float __ATTRS_o_ai vec_sld(vector float __a, vector float __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); } /* vec_vsldoi */ -static vector signed char __ATTRS_o_ai -vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector unsigned char __ATTRS_o_ai -vec_vsldoi(vector unsigned char __a, vector unsigned char __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector short __ATTRS_o_ai -vec_vsldoi(vector short __a, vector short __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector unsigned short __ATTRS_o_ai -vec_vsldoi(vector unsigned short __a, vector unsigned short __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector pixel __ATTRS_o_ai -vec_vsldoi(vector pixel __a, vector pixel __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector int __ATTRS_o_ai -vec_vsldoi(vector int __a, vector int __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector unsigned int __ATTRS_o_ai -vec_vsldoi(vector unsigned int __a, vector unsigned int __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); -} - -static vector float __ATTRS_o_ai -vec_vsldoi(vector float __a, vector float __b, unsigned char __c) -{ - return vec_perm(__a, __b, (vector unsigned char) - (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7, - __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15)); +static vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a, + vector signed char __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector unsigned char __ATTRS_o_ai vec_vsldoi(vector unsigned char __a, + vector unsigned char __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector short __ATTRS_o_ai vec_vsldoi(vector short __a, vector short __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector unsigned short __ATTRS_o_ai vec_vsldoi(vector unsigned short __a, + vector unsigned short __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector pixel __ATTRS_o_ai vec_vsldoi(vector pixel __a, vector pixel __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector int __ATTRS_o_ai vec_vsldoi(vector int __a, vector int __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector unsigned int __ATTRS_o_ai vec_vsldoi(vector unsigned int __a, + vector unsigned int __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); +} + +static vector float __ATTRS_o_ai vec_vsldoi(vector float __a, vector float __b, + unsigned char __c) { + return vec_perm( + __a, __b, + (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5, + __c + 6, __c + 7, __c + 8, __c + 9, __c + 10, + __c + 11, __c + 12, __c + 13, __c + 14, __c + 15)); } /* vec_sll */ -static vector signed char __ATTRS_o_ai -vec_sll(vector signed char __a, vector unsigned char __b) -{ - return (vector signed char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, + vector unsigned char __b) { + return (vector signed char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_sll(vector signed char __a, vector unsigned short __b) -{ - return (vector signed char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, + vector unsigned short __b) { + return (vector signed char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_sll(vector signed char __a, vector unsigned int __b) -{ - return (vector signed char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, + vector unsigned int __b) { + return (vector signed char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_sll(vector unsigned char __a, vector unsigned char __b) -{ - return (vector unsigned char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a, + vector unsigned char __b) { + return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_sll(vector unsigned char __a, vector unsigned short __b) -{ - return (vector unsigned char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a, + vector unsigned short __b) { + return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_sll(vector unsigned char __a, vector unsigned int __b) -{ - return (vector unsigned char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a, + vector unsigned int __b) { + return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_sll(vector bool char __a, vector unsigned char __b) -{ - return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a, + vector unsigned char __b) { + return (vector bool char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_sll(vector bool char __a, vector unsigned short __b) -{ - return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a, + vector unsigned short __b) { + return (vector bool char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_sll(vector bool char __a, vector unsigned int __b) -{ - return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a, + vector unsigned int __b) { + return (vector bool char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector short __ATTRS_o_ai -vec_sll(vector short __a, vector unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_sll(vector short __a, + vector unsigned char __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_sll(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_sll(vector short __a, + vector unsigned short __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_sll(vector short __a, vector unsigned int __b) -{ +static vector short __ATTRS_o_ai vec_sll(vector short __a, + vector unsigned int __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_sll(vector unsigned short __a, vector unsigned char __b) -{ - return (vector unsigned short) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a, + vector unsigned char __b) { + return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_sll(vector unsigned short __a, vector unsigned short __b) -{ - return (vector unsigned short) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a, + vector unsigned short __b) { + return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_sll(vector unsigned short __a, vector unsigned int __b) -{ - return (vector unsigned short) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a, + vector unsigned int __b) { + return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_sll(vector bool short __a, vector unsigned char __b) -{ - return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a, + vector unsigned char __b) { + return (vector bool short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_sll(vector bool short __a, vector unsigned short __b) -{ - return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a, + vector unsigned short __b) { + return (vector bool short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_sll(vector bool short __a, vector unsigned int __b) -{ - return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a, + vector unsigned int __b) { + return (vector bool short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_sll(vector pixel __a, vector unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a, + vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_sll(vector pixel __a, vector unsigned short __b) -{ +static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a, + vector unsigned short __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_sll(vector pixel __a, vector unsigned int __b) -{ +static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a, + vector unsigned int __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_sll(vector int __a, vector unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_sll(vector int __a, + vector unsigned char __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_sll(vector int __a, vector unsigned short __b) -{ +static vector int __ATTRS_o_ai vec_sll(vector int __a, + vector unsigned short __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_sll(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_sll(vector int __a, + vector unsigned int __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_sll(vector unsigned int __a, vector unsigned char __b) -{ - return (vector unsigned int) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a, + vector unsigned char __b) { + return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_sll(vector unsigned int __a, vector unsigned short __b) -{ - return (vector unsigned int) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a, + vector unsigned short __b) { + return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_sll(vector unsigned int __a, vector unsigned int __b) -{ - return (vector unsigned int) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a, + vector unsigned int __b) { + return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_sll(vector bool int __a, vector unsigned char __b) -{ - return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a, + vector unsigned char __b) { + return (vector bool int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_sll(vector bool int __a, vector unsigned short __b) -{ - return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a, + vector unsigned short __b) { + return (vector bool int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_sll(vector bool int __a, vector unsigned int __b) -{ - return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a, + vector unsigned int __b) { + return (vector bool int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } /* vec_vsl */ -static vector signed char __ATTRS_o_ai -vec_vsl(vector signed char __a, vector unsigned char __b) -{ - return (vector signed char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, + vector unsigned char __b) { + return (vector signed char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_vsl(vector signed char __a, vector unsigned short __b) -{ - return (vector signed char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, + vector unsigned short __b) { + return (vector signed char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_vsl(vector signed char __a, vector unsigned int __b) -{ - return (vector signed char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, + vector unsigned int __b) { + return (vector signed char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vsl(vector unsigned char __a, vector unsigned char __b) -{ - return (vector unsigned char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a, + vector unsigned char __b) { + return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vsl(vector unsigned char __a, vector unsigned short __b) -{ - return (vector unsigned char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a, + vector unsigned short __b) { + return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vsl(vector unsigned char __a, vector unsigned int __b) -{ - return (vector unsigned char) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a, + vector unsigned int __b) { + return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_vsl(vector bool char __a, vector unsigned char __b) -{ - return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a, + vector unsigned char __b) { + return (vector bool char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_vsl(vector bool char __a, vector unsigned short __b) -{ - return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a, + vector unsigned short __b) { + return (vector bool char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_vsl(vector bool char __a, vector unsigned int __b) -{ - return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a, + vector unsigned int __b) { + return (vector bool char)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vsl(vector short __a, vector unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_vsl(vector short __a, + vector unsigned char __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vsl(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_vsl(vector short __a, + vector unsigned short __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vsl(vector short __a, vector unsigned int __b) -{ +static vector short __ATTRS_o_ai vec_vsl(vector short __a, + vector unsigned int __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsl(vector unsigned short __a, vector unsigned char __b) -{ - return (vector unsigned short) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a, + vector unsigned char __b) { + return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsl(vector unsigned short __a, vector unsigned short __b) -{ - return (vector unsigned short) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a, + vector unsigned short __b) { + return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsl(vector unsigned short __a, vector unsigned int __b) -{ - return (vector unsigned short) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a, + vector unsigned int __b) { + return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_vsl(vector bool short __a, vector unsigned char __b) -{ - return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a, + vector unsigned char __b) { + return (vector bool short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_vsl(vector bool short __a, vector unsigned short __b) -{ - return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a, + vector unsigned short __b) { + return (vector bool short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_vsl(vector bool short __a, vector unsigned int __b) -{ - return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a, + vector unsigned int __b) { + return (vector bool short)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vsl(vector pixel __a, vector unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a, + vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vsl(vector pixel __a, vector unsigned short __b) -{ +static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a, + vector unsigned short __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vsl(vector pixel __a, vector unsigned int __b) -{ +static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a, + vector unsigned int __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vsl(vector int __a, vector unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_vsl(vector int __a, + vector unsigned char __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vsl(vector int __a, vector unsigned short __b) -{ +static vector int __ATTRS_o_ai vec_vsl(vector int __a, + vector unsigned short __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vsl(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_vsl(vector int __a, + vector unsigned int __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vsl(vector unsigned int __a, vector unsigned char __b) -{ - return (vector unsigned int) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a, + vector unsigned char __b) { + return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vsl(vector unsigned int __a, vector unsigned short __b) -{ - return (vector unsigned int) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a, + vector unsigned short __b) { + return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vsl(vector unsigned int __a, vector unsigned int __b) -{ - return (vector unsigned int) - __builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a, + vector unsigned int __b) { + return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_vsl(vector bool int __a, vector unsigned char __b) -{ - return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a, + vector unsigned char __b) { + return (vector bool int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_vsl(vector bool int __a, vector unsigned short __b) -{ - return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a, + vector unsigned short __b) { + return (vector bool int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_vsl(vector bool int __a, vector unsigned int __b) -{ - return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a, + vector unsigned int __b) { + return (vector bool int)__builtin_altivec_vsl((vector int)__a, + (vector int)__b); } /* vec_slo */ -static vector signed char __ATTRS_o_ai -vec_slo(vector signed char __a, vector signed char __b) -{ - return (vector signed char) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, + vector signed char __b) { + return (vector signed char)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_slo(vector signed char __a, vector unsigned char __b) -{ - return (vector signed char) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, + vector unsigned char __b) { + return (vector signed char)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_slo(vector unsigned char __a, vector signed char __b) -{ - return (vector unsigned char) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a, + vector signed char __b) { + return (vector unsigned char)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_slo(vector unsigned char __a, vector unsigned char __b) -{ - return (vector unsigned char) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a, + vector unsigned char __b) { + return (vector unsigned char)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector short __ATTRS_o_ai -vec_slo(vector short __a, vector signed char __b) -{ +static vector short __ATTRS_o_ai vec_slo(vector short __a, + vector signed char __b) { return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_slo(vector short __a, vector unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_slo(vector short __a, + vector unsigned char __b) { return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_slo(vector unsigned short __a, vector signed char __b) -{ - return (vector unsigned short) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a, + vector signed char __b) { + return (vector unsigned short)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_slo(vector unsigned short __a, vector unsigned char __b) -{ - return (vector unsigned short) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a, + vector unsigned char __b) { + return (vector unsigned short)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_slo(vector pixel __a, vector signed char __b) -{ +static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a, + vector signed char __b) { return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_slo(vector pixel __a, vector unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a, + vector unsigned char __b) { return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_slo(vector int __a, vector signed char __b) -{ +static vector int __ATTRS_o_ai vec_slo(vector int __a, vector signed char __b) { return (vector int)__builtin_altivec_vslo(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_slo(vector int __a, vector unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_slo(vector int __a, + vector unsigned char __b) { return (vector int)__builtin_altivec_vslo(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_slo(vector unsigned int __a, vector signed char __b) -{ - return (vector unsigned int) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a, + vector signed char __b) { + return (vector unsigned int)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_slo(vector unsigned int __a, vector unsigned char __b) -{ - return (vector unsigned int) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a, + vector unsigned char __b) { + return (vector unsigned int)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector float __ATTRS_o_ai -vec_slo(vector float __a, vector signed char __b) -{ +static vector float __ATTRS_o_ai vec_slo(vector float __a, + vector signed char __b) { return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector float __ATTRS_o_ai -vec_slo(vector float __a, vector unsigned char __b) -{ +static vector float __ATTRS_o_ai vec_slo(vector float __a, + vector unsigned char __b) { return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } /* vec_vslo */ -static vector signed char __ATTRS_o_ai -vec_vslo(vector signed char __a, vector signed char __b) -{ - return (vector signed char) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, + vector signed char __b) { + return (vector signed char)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_vslo(vector signed char __a, vector unsigned char __b) -{ - return (vector signed char) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, + vector unsigned char __b) { + return (vector signed char)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vslo(vector unsigned char __a, vector signed char __b) -{ - return (vector unsigned char) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a, + vector signed char __b) { + return (vector unsigned char)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vslo(vector unsigned char __a, vector unsigned char __b) -{ - return (vector unsigned char) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a, + vector unsigned char __b) { + return (vector unsigned char)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vslo(vector short __a, vector signed char __b) -{ +static vector short __ATTRS_o_ai vec_vslo(vector short __a, + vector signed char __b) { return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vslo(vector short __a, vector unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_vslo(vector short __a, + vector unsigned char __b) { return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vslo(vector unsigned short __a, vector signed char __b) -{ - return (vector unsigned short) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a, + vector signed char __b) { + return (vector unsigned short)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vslo(vector unsigned short __a, vector unsigned char __b) -{ - return (vector unsigned short) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a, + vector unsigned char __b) { + return (vector unsigned short)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vslo(vector pixel __a, vector signed char __b) -{ +static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a, + vector signed char __b) { return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vslo(vector pixel __a, vector unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a, + vector unsigned char __b) { return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vslo(vector int __a, vector signed char __b) -{ +static vector int __ATTRS_o_ai vec_vslo(vector int __a, + vector signed char __b) { return (vector int)__builtin_altivec_vslo(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vslo(vector int __a, vector unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_vslo(vector int __a, + vector unsigned char __b) { return (vector int)__builtin_altivec_vslo(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vslo(vector unsigned int __a, vector signed char __b) -{ - return (vector unsigned int) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a, + vector signed char __b) { + return (vector unsigned int)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vslo(vector unsigned int __a, vector unsigned char __b) -{ - return (vector unsigned int) - __builtin_altivec_vslo((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a, + vector unsigned char __b) { + return (vector unsigned int)__builtin_altivec_vslo((vector int)__a, + (vector int)__b); } -static vector float __ATTRS_o_ai -vec_vslo(vector float __a, vector signed char __b) -{ +static vector float __ATTRS_o_ai vec_vslo(vector float __a, + vector signed char __b) { return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } -static vector float __ATTRS_o_ai -vec_vslo(vector float __a, vector unsigned char __b) -{ +static vector float __ATTRS_o_ai vec_vslo(vector float __a, + vector unsigned char __b) { return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } /* vec_splat */ -static vector signed char __ATTRS_o_ai -vec_splat(vector signed char __a, unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_splat(vector signed char __a, + unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } -static vector unsigned char __ATTRS_o_ai -vec_splat(vector unsigned char __a, unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_splat(vector unsigned char __a, + unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } -static vector bool char __ATTRS_o_ai -vec_splat(vector bool char __a, unsigned char __b) -{ +static vector bool char __ATTRS_o_ai vec_splat(vector bool char __a, + unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } -static vector short __ATTRS_o_ai -vec_splat(vector short __a, unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_splat(vector short __a, + unsigned char __b) { __b *= 2; - unsigned char b1=__b+1; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); + unsigned char b1 = __b + 1; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, + __b, b1, __b, b1, __b, b1, __b, b1)); } -static vector unsigned short __ATTRS_o_ai -vec_splat(vector unsigned short __a, unsigned char __b) -{ +static vector unsigned short __ATTRS_o_ai vec_splat(vector unsigned short __a, + unsigned char __b) { __b *= 2; - unsigned char b1=__b+1; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); + unsigned char b1 = __b + 1; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, + __b, b1, __b, b1, __b, b1, __b, b1)); } -static vector bool short __ATTRS_o_ai -vec_splat(vector bool short __a, unsigned char __b) -{ +static vector bool short __ATTRS_o_ai vec_splat(vector bool short __a, + unsigned char __b) { __b *= 2; - unsigned char b1=__b+1; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); + unsigned char b1 = __b + 1; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, + __b, b1, __b, b1, __b, b1, __b, b1)); } -static vector pixel __ATTRS_o_ai -vec_splat(vector pixel __a, unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_splat(vector pixel __a, + unsigned char __b) { __b *= 2; - unsigned char b1=__b+1; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); + unsigned char b1 = __b + 1; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, + __b, b1, __b, b1, __b, b1, __b, b1)); } -static vector int __ATTRS_o_ai -vec_splat(vector int __a, unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_splat(vector int __a, unsigned char __b) { __b *= 4; - unsigned char b1=__b+1, b2=__b+2, b3=__b+3; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); + unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, + b1, b2, b3, __b, b1, b2, b3)); } -static vector unsigned int __ATTRS_o_ai -vec_splat(vector unsigned int __a, unsigned char __b) -{ +static vector unsigned int __ATTRS_o_ai vec_splat(vector unsigned int __a, + unsigned char __b) { __b *= 4; - unsigned char b1=__b+1, b2=__b+2, b3=__b+3; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); + unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, + b1, b2, b3, __b, b1, b2, b3)); } -static vector bool int __ATTRS_o_ai -vec_splat(vector bool int __a, unsigned char __b) -{ +static vector bool int __ATTRS_o_ai vec_splat(vector bool int __a, + unsigned char __b) { __b *= 4; - unsigned char b1=__b+1, b2=__b+2, b3=__b+3; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); + unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, + b1, b2, b3, __b, b1, b2, b3)); } -static vector float __ATTRS_o_ai -vec_splat(vector float __a, unsigned char __b) -{ +static vector float __ATTRS_o_ai vec_splat(vector float __a, + unsigned char __b) { __b *= 4; - unsigned char b1=__b+1, b2=__b+2, b3=__b+3; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); + unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, + b1, b2, b3, __b, b1, b2, b3)); } /* vec_vspltb */ #define __builtin_altivec_vspltb vec_vspltb -static vector signed char __ATTRS_o_ai -vec_vspltb(vector signed char __a, unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a, + unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } -static vector unsigned char __ATTRS_o_ai -vec_vspltb(vector unsigned char __a, unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vspltb(vector unsigned char __a, + unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } -static vector bool char __ATTRS_o_ai -vec_vspltb(vector bool char __a, unsigned char __b) -{ +static vector bool char __ATTRS_o_ai vec_vspltb(vector bool char __a, + unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } @@ -6728,80 +6165,79 @@ vec_vspltb(vector bool char __a, unsigned char __b) #define __builtin_altivec_vsplth vec_vsplth -static vector short __ATTRS_o_ai -vec_vsplth(vector short __a, unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_vsplth(vector short __a, + unsigned char __b) { __b *= 2; - unsigned char b1=__b+1; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); + unsigned char b1 = __b + 1; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, + __b, b1, __b, b1, __b, b1, __b, b1)); } -static vector unsigned short __ATTRS_o_ai -vec_vsplth(vector unsigned short __a, unsigned char __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vsplth(vector unsigned short __a, + unsigned char __b) { __b *= 2; - unsigned char b1=__b+1; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); + unsigned char b1 = __b + 1; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, + __b, b1, __b, b1, __b, b1, __b, b1)); } -static vector bool short __ATTRS_o_ai -vec_vsplth(vector bool short __a, unsigned char __b) -{ +static vector bool short __ATTRS_o_ai vec_vsplth(vector bool short __a, + unsigned char __b) { __b *= 2; - unsigned char b1=__b+1; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); + unsigned char b1 = __b + 1; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, + __b, b1, __b, b1, __b, b1, __b, b1)); } -static vector pixel __ATTRS_o_ai -vec_vsplth(vector pixel __a, unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_vsplth(vector pixel __a, + unsigned char __b) { __b *= 2; - unsigned char b1=__b+1; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); + unsigned char b1 = __b + 1; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, + __b, b1, __b, b1, __b, b1, __b, b1)); } /* vec_vspltw */ #define __builtin_altivec_vspltw vec_vspltw -static vector int __ATTRS_o_ai -vec_vspltw(vector int __a, unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b) { __b *= 4; - unsigned char b1=__b+1, b2=__b+2, b3=__b+3; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); + unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, + b1, b2, b3, __b, b1, b2, b3)); } -static vector unsigned int __ATTRS_o_ai -vec_vspltw(vector unsigned int __a, unsigned char __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vspltw(vector unsigned int __a, + unsigned char __b) { __b *= 4; - unsigned char b1=__b+1, b2=__b+2, b3=__b+3; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); + unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, + b1, b2, b3, __b, b1, b2, b3)); } -static vector bool int __ATTRS_o_ai -vec_vspltw(vector bool int __a, unsigned char __b) -{ +static vector bool int __ATTRS_o_ai vec_vspltw(vector bool int __a, + unsigned char __b) { __b *= 4; - unsigned char b1=__b+1, b2=__b+2, b3=__b+3; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); + unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, + b1, b2, b3, __b, b1, b2, b3)); } -static vector float __ATTRS_o_ai -vec_vspltw(vector float __a, unsigned char __b) -{ +static vector float __ATTRS_o_ai vec_vspltw(vector float __a, + unsigned char __b) { __b *= 4; - unsigned char b1=__b+1, b2=__b+2, b3=__b+3; - return vec_perm(__a, __a, (vector unsigned char) - (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); + unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; + return vec_perm(__a, __a, + (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, + b1, b2, b3, __b, b1, b2, b3)); } /* vec_splat_s8 */ @@ -6809,18 +6245,14 @@ vec_vspltw(vector float __a, unsigned char __b) #define __builtin_altivec_vspltisb vec_splat_s8 // FIXME: parameter should be treated as 5-bit signed literal -static vector signed char __ATTRS_o_ai -vec_splat_s8(signed char __a) -{ +static vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a) { return (vector signed char)(__a); } /* vec_vspltisb */ // FIXME: parameter should be treated as 5-bit signed literal -static vector signed char __ATTRS_o_ai -vec_vspltisb(signed char __a) -{ +static vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a) { return (vector signed char)(__a); } @@ -6829,18 +6261,14 @@ vec_vspltisb(signed char __a) #define __builtin_altivec_vspltish vec_splat_s16 // FIXME: parameter should be treated as 5-bit signed literal -static vector short __ATTRS_o_ai -vec_splat_s16(signed char __a) -{ +static vector short __ATTRS_o_ai vec_splat_s16(signed char __a) { return (vector short)(__a); } /* vec_vspltish */ // FIXME: parameter should be treated as 5-bit signed literal -static vector short __ATTRS_o_ai -vec_vspltish(signed char __a) -{ +static vector short __ATTRS_o_ai vec_vspltish(signed char __a) { return (vector short)(__a); } @@ -6849,96 +6277,77 @@ vec_vspltish(signed char __a) #define __builtin_altivec_vspltisw vec_splat_s32 // FIXME: parameter should be treated as 5-bit signed literal -static vector int __ATTRS_o_ai -vec_splat_s32(signed char __a) -{ +static vector int __ATTRS_o_ai vec_splat_s32(signed char __a) { return (vector int)(__a); } /* vec_vspltisw */ // FIXME: parameter should be treated as 5-bit signed literal -static vector int __ATTRS_o_ai -vec_vspltisw(signed char __a) -{ +static vector int __ATTRS_o_ai vec_vspltisw(signed char __a) { return (vector int)(__a); } /* vec_splat_u8 */ // FIXME: parameter should be treated as 5-bit signed literal -static vector unsigned char __ATTRS_o_ai -vec_splat_u8(unsigned char __a) -{ +static vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a) { return (vector unsigned char)(__a); } /* vec_splat_u16 */ // FIXME: parameter should be treated as 5-bit signed literal -static vector unsigned short __ATTRS_o_ai -vec_splat_u16(signed char __a) -{ +static vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a) { return (vector unsigned short)(__a); } /* vec_splat_u32 */ // FIXME: parameter should be treated as 5-bit signed literal -static vector unsigned int __ATTRS_o_ai -vec_splat_u32(signed char __a) -{ +static vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a) { return (vector unsigned int)(__a); } /* vec_sr */ -static vector signed char __ATTRS_o_ai -vec_sr(vector signed char __a, vector unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_sr(vector signed char __a, + vector unsigned char __b) { return __a >> (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_sr(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a, + vector unsigned char __b) { return __a >> __b; } -static vector short __ATTRS_o_ai -vec_sr(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_sr(vector short __a, + vector unsigned short __b) { return __a >> (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_sr(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_sr(vector unsigned short __a, + vector unsigned short __b) { return __a >> __b; } -static vector int __ATTRS_o_ai -vec_sr(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_sr(vector int __a, vector unsigned int __b) { return __a >> (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_sr(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_sr(vector unsigned int __a, + vector unsigned int __b) { return __a >> __b; } #ifdef __POWER8_VECTOR__ static vector signed long long __ATTRS_o_ai -vec_sr(vector signed long long __a, vector unsigned long long __b) -{ +vec_sr(vector signed long long __a, vector unsigned long long __b) { return __a >> (vector long long)__b; } static vector unsigned long long __ATTRS_o_ai -vec_sr(vector unsigned long long __a, vector unsigned long long __b) -{ +vec_sr(vector unsigned long long __a, vector unsigned long long __b) { return __a >> __b; } #endif @@ -6947,15 +6356,13 @@ vec_sr(vector unsigned long long __a, vector unsigned long long __b) #define __builtin_altivec_vsrb vec_vsrb -static vector signed char __ATTRS_o_ai -vec_vsrb(vector signed char __a, vector unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a, + vector unsigned char __b) { return __a >> (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_vsrb(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vsrb(vector unsigned char __a, + vector unsigned char __b) { return __a >> __b; } @@ -6963,15 +6370,13 @@ vec_vsrb(vector unsigned char __a, vector unsigned char __b) #define __builtin_altivec_vsrh vec_vsrh -static vector short __ATTRS_o_ai -vec_vsrh(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_vsrh(vector short __a, + vector unsigned short __b) { return __a >> (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_vsrh(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vsrh(vector unsigned short __a, + vector unsigned short __b) { return __a >> __b; } @@ -6979,1659 +6384,1363 @@ vec_vsrh(vector unsigned short __a, vector unsigned short __b) #define __builtin_altivec_vsrw vec_vsrw -static vector int __ATTRS_o_ai -vec_vsrw(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_vsrw(vector int __a, + vector unsigned int __b) { return __a >> (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_vsrw(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vsrw(vector unsigned int __a, + vector unsigned int __b) { return __a >> __b; } /* vec_sra */ -static vector signed char __ATTRS_o_ai -vec_sra(vector signed char __a, vector unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, + vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_sra(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_sra(vector unsigned char __a, + vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b); } -static vector short __ATTRS_o_ai -vec_sra(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_sra(vector short __a, + vector unsigned short __b) { return __builtin_altivec_vsrah(__a, (vector unsigned short)__b); } -static vector unsigned short __ATTRS_o_ai -vec_sra(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_sra(vector unsigned short __a, + vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b); } -static vector int __ATTRS_o_ai -vec_sra(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_sra(vector int __a, + vector unsigned int __b) { return __builtin_altivec_vsraw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_sra(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_sra(vector unsigned int __a, + vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b); } #ifdef __POWER8_VECTOR__ static vector signed long long __ATTRS_o_ai -vec_sra(vector signed long long __a, vector unsigned long long __b) -{ +vec_sra(vector signed long long __a, vector unsigned long long __b) { return __a >> __b; } static vector unsigned long long __ATTRS_o_ai -vec_sra(vector unsigned long long __a, vector unsigned long long __b) -{ - return (vector unsigned long long) ( (vector signed long long) __a >> __b); +vec_sra(vector unsigned long long __a, vector unsigned long long __b) { + return (vector unsigned long long)((vector signed long long)__a >> __b); } #endif /* vec_vsrab */ -static vector signed char __ATTRS_o_ai -vec_vsrab(vector signed char __a, vector unsigned char __b) -{ +static vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a, + vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vsrab(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vsrab(vector unsigned char __a, + vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b); } /* vec_vsrah */ -static vector short __ATTRS_o_ai -vec_vsrah(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_vsrah(vector short __a, + vector unsigned short __b) { return __builtin_altivec_vsrah(__a, (vector unsigned short)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsrah(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vsrah(vector unsigned short __a, + vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b); } /* vec_vsraw */ -static vector int __ATTRS_o_ai -vec_vsraw(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_vsraw(vector int __a, + vector unsigned int __b) { return __builtin_altivec_vsraw(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vsraw(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vsraw(vector unsigned int __a, + vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b); } /* vec_srl */ -static vector signed char __ATTRS_o_ai -vec_srl(vector signed char __a, vector unsigned char __b) -{ - return (vector signed char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, + vector unsigned char __b) { + return (vector signed char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_srl(vector signed char __a, vector unsigned short __b) -{ - return (vector signed char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, + vector unsigned short __b) { + return (vector signed char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_srl(vector signed char __a, vector unsigned int __b) -{ - return (vector signed char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, + vector unsigned int __b) { + return (vector signed char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_srl(vector unsigned char __a, vector unsigned char __b) -{ - return (vector unsigned char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a, + vector unsigned char __b) { + return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_srl(vector unsigned char __a, vector unsigned short __b) -{ - return (vector unsigned char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a, + vector unsigned short __b) { + return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_srl(vector unsigned char __a, vector unsigned int __b) -{ - return (vector unsigned char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a, + vector unsigned int __b) { + return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_srl(vector bool char __a, vector unsigned char __b) -{ - return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a, + vector unsigned char __b) { + return (vector bool char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_srl(vector bool char __a, vector unsigned short __b) -{ - return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a, + vector unsigned short __b) { + return (vector bool char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_srl(vector bool char __a, vector unsigned int __b) -{ - return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a, + vector unsigned int __b) { + return (vector bool char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector short __ATTRS_o_ai -vec_srl(vector short __a, vector unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_srl(vector short __a, + vector unsigned char __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_srl(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_srl(vector short __a, + vector unsigned short __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_srl(vector short __a, vector unsigned int __b) -{ +static vector short __ATTRS_o_ai vec_srl(vector short __a, + vector unsigned int __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_srl(vector unsigned short __a, vector unsigned char __b) -{ - return (vector unsigned short) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a, + vector unsigned char __b) { + return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_srl(vector unsigned short __a, vector unsigned short __b) -{ - return (vector unsigned short) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a, + vector unsigned short __b) { + return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_srl(vector unsigned short __a, vector unsigned int __b) -{ - return (vector unsigned short) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a, + vector unsigned int __b) { + return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_srl(vector bool short __a, vector unsigned char __b) -{ - return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a, + vector unsigned char __b) { + return (vector bool short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_srl(vector bool short __a, vector unsigned short __b) -{ - return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a, + vector unsigned short __b) { + return (vector bool short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_srl(vector bool short __a, vector unsigned int __b) -{ - return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a, + vector unsigned int __b) { + return (vector bool short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_srl(vector pixel __a, vector unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a, + vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_srl(vector pixel __a, vector unsigned short __b) -{ +static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a, + vector unsigned short __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_srl(vector pixel __a, vector unsigned int __b) -{ +static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a, + vector unsigned int __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_srl(vector int __a, vector unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_srl(vector int __a, + vector unsigned char __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_srl(vector int __a, vector unsigned short __b) -{ +static vector int __ATTRS_o_ai vec_srl(vector int __a, + vector unsigned short __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_srl(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_srl(vector int __a, + vector unsigned int __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_srl(vector unsigned int __a, vector unsigned char __b) -{ - return (vector unsigned int) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a, + vector unsigned char __b) { + return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_srl(vector unsigned int __a, vector unsigned short __b) -{ - return (vector unsigned int) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a, + vector unsigned short __b) { + return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_srl(vector unsigned int __a, vector unsigned int __b) -{ - return (vector unsigned int) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a, + vector unsigned int __b) { + return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_srl(vector bool int __a, vector unsigned char __b) -{ - return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a, + vector unsigned char __b) { + return (vector bool int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_srl(vector bool int __a, vector unsigned short __b) -{ - return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a, + vector unsigned short __b) { + return (vector bool int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_srl(vector bool int __a, vector unsigned int __b) -{ - return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a, + vector unsigned int __b) { + return (vector bool int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } /* vec_vsr */ -static vector signed char __ATTRS_o_ai -vec_vsr(vector signed char __a, vector unsigned char __b) -{ - return (vector signed char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, + vector unsigned char __b) { + return (vector signed char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_vsr(vector signed char __a, vector unsigned short __b) -{ - return (vector signed char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, + vector unsigned short __b) { + return (vector signed char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_vsr(vector signed char __a, vector unsigned int __b) -{ - return (vector signed char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, + vector unsigned int __b) { + return (vector signed char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vsr(vector unsigned char __a, vector unsigned char __b) -{ - return (vector unsigned char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a, + vector unsigned char __b) { + return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vsr(vector unsigned char __a, vector unsigned short __b) -{ - return (vector unsigned char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a, + vector unsigned short __b) { + return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vsr(vector unsigned char __a, vector unsigned int __b) -{ - return (vector unsigned char) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a, + vector unsigned int __b) { + return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_vsr(vector bool char __a, vector unsigned char __b) -{ - return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a, + vector unsigned char __b) { + return (vector bool char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_vsr(vector bool char __a, vector unsigned short __b) -{ - return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a, + vector unsigned short __b) { + return (vector bool char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool char __ATTRS_o_ai -vec_vsr(vector bool char __a, vector unsigned int __b) -{ - return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a, + vector unsigned int __b) { + return (vector bool char)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vsr(vector short __a, vector unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_vsr(vector short __a, + vector unsigned char __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vsr(vector short __a, vector unsigned short __b) -{ +static vector short __ATTRS_o_ai vec_vsr(vector short __a, + vector unsigned short __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vsr(vector short __a, vector unsigned int __b) -{ +static vector short __ATTRS_o_ai vec_vsr(vector short __a, + vector unsigned int __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsr(vector unsigned short __a, vector unsigned char __b) -{ - return (vector unsigned short) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a, + vector unsigned char __b) { + return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsr(vector unsigned short __a, vector unsigned short __b) -{ - return (vector unsigned short) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a, + vector unsigned short __b) { + return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsr(vector unsigned short __a, vector unsigned int __b) -{ - return (vector unsigned short) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a, + vector unsigned int __b) { + return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_vsr(vector bool short __a, vector unsigned char __b) -{ - return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a, + vector unsigned char __b) { + return (vector bool short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_vsr(vector bool short __a, vector unsigned short __b) -{ - return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a, + vector unsigned short __b) { + return (vector bool short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool short __ATTRS_o_ai -vec_vsr(vector bool short __a, vector unsigned int __b) -{ - return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a, + vector unsigned int __b) { + return (vector bool short)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vsr(vector pixel __a, vector unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a, + vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vsr(vector pixel __a, vector unsigned short __b) -{ +static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a, + vector unsigned short __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vsr(vector pixel __a, vector unsigned int __b) -{ +static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a, + vector unsigned int __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vsr(vector int __a, vector unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_vsr(vector int __a, + vector unsigned char __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vsr(vector int __a, vector unsigned short __b) -{ +static vector int __ATTRS_o_ai vec_vsr(vector int __a, + vector unsigned short __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vsr(vector int __a, vector unsigned int __b) -{ +static vector int __ATTRS_o_ai vec_vsr(vector int __a, + vector unsigned int __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vsr(vector unsigned int __a, vector unsigned char __b) -{ - return (vector unsigned int) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a, + vector unsigned char __b) { + return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vsr(vector unsigned int __a, vector unsigned short __b) -{ - return (vector unsigned int) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a, + vector unsigned short __b) { + return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vsr(vector unsigned int __a, vector unsigned int __b) -{ - return (vector unsigned int) - __builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a, + vector unsigned int __b) { + return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_vsr(vector bool int __a, vector unsigned char __b) -{ - return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a, + vector unsigned char __b) { + return (vector bool int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_vsr(vector bool int __a, vector unsigned short __b) -{ - return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a, + vector unsigned short __b) { + return (vector bool int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } -static vector bool int __ATTRS_o_ai -vec_vsr(vector bool int __a, vector unsigned int __b) -{ - return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); +static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a, + vector unsigned int __b) { + return (vector bool int)__builtin_altivec_vsr((vector int)__a, + (vector int)__b); } /* vec_sro */ -static vector signed char __ATTRS_o_ai -vec_sro(vector signed char __a, vector signed char __b) -{ - return (vector signed char) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, + vector signed char __b) { + return (vector signed char)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_sro(vector signed char __a, vector unsigned char __b) -{ - return (vector signed char) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, + vector unsigned char __b) { + return (vector signed char)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_sro(vector unsigned char __a, vector signed char __b) -{ - return (vector unsigned char) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a, + vector signed char __b) { + return (vector unsigned char)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_sro(vector unsigned char __a, vector unsigned char __b) -{ - return (vector unsigned char) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a, + vector unsigned char __b) { + return (vector unsigned char)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector short __ATTRS_o_ai -vec_sro(vector short __a, vector signed char __b) -{ +static vector short __ATTRS_o_ai vec_sro(vector short __a, + vector signed char __b) { return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_sro(vector short __a, vector unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_sro(vector short __a, + vector unsigned char __b) { return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_sro(vector unsigned short __a, vector signed char __b) -{ - return (vector unsigned short) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a, + vector signed char __b) { + return (vector unsigned short)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_sro(vector unsigned short __a, vector unsigned char __b) -{ - return (vector unsigned short) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a, + vector unsigned char __b) { + return (vector unsigned short)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_sro(vector pixel __a, vector signed char __b) -{ +static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a, + vector signed char __b) { return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_sro(vector pixel __a, vector unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a, + vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_sro(vector int __a, vector signed char __b) -{ +static vector int __ATTRS_o_ai vec_sro(vector int __a, vector signed char __b) { return (vector int)__builtin_altivec_vsro(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_sro(vector int __a, vector unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_sro(vector int __a, + vector unsigned char __b) { return (vector int)__builtin_altivec_vsro(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_sro(vector unsigned int __a, vector signed char __b) -{ - return (vector unsigned int) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a, + vector signed char __b) { + return (vector unsigned int)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_sro(vector unsigned int __a, vector unsigned char __b) -{ - return (vector unsigned int) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a, + vector unsigned char __b) { + return (vector unsigned int)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector float __ATTRS_o_ai -vec_sro(vector float __a, vector signed char __b) -{ +static vector float __ATTRS_o_ai vec_sro(vector float __a, + vector signed char __b) { return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector float __ATTRS_o_ai -vec_sro(vector float __a, vector unsigned char __b) -{ +static vector float __ATTRS_o_ai vec_sro(vector float __a, + vector unsigned char __b) { return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } /* vec_vsro */ -static vector signed char __ATTRS_o_ai -vec_vsro(vector signed char __a, vector signed char __b) -{ - return (vector signed char) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a, + vector signed char __b) { + return (vector signed char)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector signed char __ATTRS_o_ai -vec_vsro(vector signed char __a, vector unsigned char __b) -{ - return (vector signed char) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a, + vector unsigned char __b) { + return (vector signed char)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vsro(vector unsigned char __a, vector signed char __b) -{ - return (vector unsigned char) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a, + vector signed char __b) { + return (vector unsigned char)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector unsigned char __ATTRS_o_ai -vec_vsro(vector unsigned char __a, vector unsigned char __b) -{ - return (vector unsigned char) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a, + vector unsigned char __b) { + return (vector unsigned char)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vsro(vector short __a, vector signed char __b) -{ +static vector short __ATTRS_o_ai vec_vsro(vector short __a, + vector signed char __b) { return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector short __ATTRS_o_ai -vec_vsro(vector short __a, vector unsigned char __b) -{ +static vector short __ATTRS_o_ai vec_vsro(vector short __a, + vector unsigned char __b) { return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsro(vector unsigned short __a, vector signed char __b) -{ - return (vector unsigned short) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a, + vector signed char __b) { + return (vector unsigned short)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector unsigned short __ATTRS_o_ai -vec_vsro(vector unsigned short __a, vector unsigned char __b) -{ - return (vector unsigned short) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a, + vector unsigned char __b) { + return (vector unsigned short)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vsro(vector pixel __a, vector signed char __b) -{ +static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a, + vector signed char __b) { return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector pixel __ATTRS_o_ai -vec_vsro(vector pixel __a, vector unsigned char __b) -{ +static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a, + vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vsro(vector int __a, vector signed char __b) -{ +static vector int __ATTRS_o_ai vec_vsro(vector int __a, + vector signed char __b) { return (vector int)__builtin_altivec_vsro(__a, (vector int)__b); } -static vector int __ATTRS_o_ai -vec_vsro(vector int __a, vector unsigned char __b) -{ +static vector int __ATTRS_o_ai vec_vsro(vector int __a, + vector unsigned char __b) { return (vector int)__builtin_altivec_vsro(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vsro(vector unsigned int __a, vector signed char __b) -{ - return (vector unsigned int) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a, + vector signed char __b) { + return (vector unsigned int)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_vsro(vector unsigned int __a, vector unsigned char __b) -{ - return (vector unsigned int) - __builtin_altivec_vsro((vector int)__a, (vector int)__b); +static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a, + vector unsigned char __b) { + return (vector unsigned int)__builtin_altivec_vsro((vector int)__a, + (vector int)__b); } -static vector float __ATTRS_o_ai -vec_vsro(vector float __a, vector signed char __b) -{ +static vector float __ATTRS_o_ai vec_vsro(vector float __a, + vector signed char __b) { return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } -static vector float __ATTRS_o_ai -vec_vsro(vector float __a, vector unsigned char __b) -{ +static vector float __ATTRS_o_ai vec_vsro(vector float __a, + vector unsigned char __b) { return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } /* vec_st */ -static void __ATTRS_o_ai -vec_st(vector signed char __a, int __b, vector signed char *__c) -{ +static void __ATTRS_o_ai vec_st(vector signed char __a, int __b, + vector signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector signed char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_st(vector signed char __a, int __b, + signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector unsigned char __a, int __b, vector unsigned char *__c) -{ +static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b, + vector unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector unsigned char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool char __a, int __b, + signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool char __a, int __b, vector bool char *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool char __a, int __b, + vector bool char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector short __a, int __b, vector short *__c) -{ +static void __ATTRS_o_ai vec_st(vector short __a, int __b, vector short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_st(vector short __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector unsigned short __a, int __b, vector unsigned short *__c) -{ +static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b, + vector unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector unsigned short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool short __a, int __b, vector bool short *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool short __a, int __b, + vector bool short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector pixel __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector pixel __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, + unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector pixel __a, int __b, vector pixel *__c) -{ +static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, vector pixel *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector int __a, int __b, vector int *__c) -{ +static void __ATTRS_o_ai vec_st(vector int __a, int __b, vector int *__c) { __builtin_altivec_stvx(__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_st(vector int __a, int __b, int *__c) { __builtin_altivec_stvx(__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector unsigned int __a, int __b, vector unsigned int *__c) -{ +static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b, + vector unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector unsigned int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector bool int __a, int __b, vector bool int *__c) -{ +static void __ATTRS_o_ai vec_st(vector bool int __a, int __b, + vector bool int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector float __a, int __b, vector float *__c) -{ +static void __ATTRS_o_ai vec_st(vector float __a, int __b, vector float *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_st(vector float __a, int __b, float *__c) -{ +static void __ATTRS_o_ai vec_st(vector float __a, int __b, float *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } /* vec_stvx */ -static void __ATTRS_o_ai -vec_stvx(vector signed char __a, int __b, vector signed char *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b, + vector signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector signed char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b, + signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector unsigned char __a, int __b, vector unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b, + vector unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector unsigned char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b, + signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool char __a, int __b, vector bool char *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b, + vector bool char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector short __a, int __b, vector short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector short __a, int __b, + vector short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector short __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector unsigned short __a, int __b, vector unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b, + vector unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector unsigned short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool short __a, int __b, vector bool short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, + vector bool short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector pixel __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector pixel __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, + unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector pixel __a, int __b, vector pixel *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, + vector pixel *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector int __a, int __b, vector int *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, vector int *__c) { __builtin_altivec_stvx(__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, int *__c) { __builtin_altivec_stvx(__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector unsigned int __a, int __b, vector unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b, + vector unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector unsigned int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector bool int __a, int __b, vector bool int *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, + vector bool int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector float __a, int __b, vector float *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector float __a, int __b, + vector float *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvx(vector float __a, int __b, float *__c) -{ +static void __ATTRS_o_ai vec_stvx(vector float __a, int __b, float *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } /* vec_ste */ -static void __ATTRS_o_ai -vec_ste(vector signed char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_ste(vector signed char __a, int __b, + signed char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector unsigned char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_ste(vector unsigned char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector bool char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b, + signed char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector bool char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_ste(vector short __a, int __b, short *__c) { __builtin_altivec_stvehx(__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector unsigned short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_ste(vector unsigned short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector bool short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector bool short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector pixel __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector pixel __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, + unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_ste(vector int __a, int __b, int *__c) { __builtin_altivec_stvewx(__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector unsigned int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_ste(vector unsigned int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector bool int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector bool int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_ste(vector float __a, int __b, float *__c) -{ +static void __ATTRS_o_ai vec_ste(vector float __a, int __b, float *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } /* vec_stvebx */ -static void __ATTRS_o_ai -vec_stvebx(vector signed char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_stvebx(vector signed char __a, int __b, + signed char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvebx(vector unsigned char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stvebx(vector unsigned char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvebx(vector bool char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b, + signed char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvebx(vector bool char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } /* vec_stvehx */ -static void __ATTRS_o_ai -vec_stvehx(vector short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvehx(vector short __a, int __b, short *__c) { __builtin_altivec_stvehx(__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvehx(vector unsigned short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvehx(vector unsigned short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvehx(vector bool short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b, + short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvehx(vector bool short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvehx(vector pixel __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvehx(vector pixel __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, + unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } /* vec_stvewx */ -static void __ATTRS_o_ai -vec_stvewx(vector int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c) { __builtin_altivec_stvewx(__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvewx(vector unsigned int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stvewx(vector unsigned int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvewx(vector bool int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvewx(vector bool int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvewx(vector float __a, int __b, float *__c) -{ +static void __ATTRS_o_ai vec_stvewx(vector float __a, int __b, float *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } /* vec_stl */ -static void __ATTRS_o_ai -vec_stl(vector signed char __a, int __b, vector signed char *__c) -{ +static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, + vector signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector signed char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, + signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector unsigned char __a, int __b, vector unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b, + vector unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector unsigned char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b, + signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool char __a, int __b, vector bool char *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b, + vector bool char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector short __a, int __b, vector short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector short __a, int __b, vector short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector short __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector unsigned short __a, int __b, vector unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b, + vector unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector unsigned short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool short __a, int __b, vector bool short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, + vector bool short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector pixel __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector pixel __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, + unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector pixel __a, int __b, vector pixel *__c) -{ +static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, vector pixel *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector int __a, int __b, vector int *__c) -{ +static void __ATTRS_o_ai vec_stl(vector int __a, int __b, vector int *__c) { __builtin_altivec_stvxl(__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_stl(vector int __a, int __b, int *__c) { __builtin_altivec_stvxl(__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector unsigned int __a, int __b, vector unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b, + vector unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector unsigned int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector bool int __a, int __b, vector bool int *__c) -{ +static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, + vector bool int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector float __a, int __b, vector float *__c) -{ +static void __ATTRS_o_ai vec_stl(vector float __a, int __b, vector float *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stl(vector float __a, int __b, float *__c) -{ +static void __ATTRS_o_ai vec_stl(vector float __a, int __b, float *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } /* vec_stvxl */ -static void __ATTRS_o_ai -vec_stvxl(vector signed char __a, int __b, vector signed char *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b, + vector signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector signed char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b, + signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector unsigned char __a, int __b, vector unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b, + vector unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector unsigned char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool char __a, int __b, signed char *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b, + signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool char __a, int __b, unsigned char *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b, + unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool char __a, int __b, vector bool char *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b, + vector bool char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector short __a, int __b, vector short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, + vector short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector unsigned short __a, int __b, vector unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b, + vector unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector unsigned short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool short __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool short __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, + unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool short __a, int __b, vector bool short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, + vector bool short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector pixel __a, int __b, short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector pixel __a, int __b, unsigned short *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, + unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector pixel __a, int __b, vector pixel *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, + vector pixel *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector int __a, int __b, vector int *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, vector int *__c) { __builtin_altivec_stvxl(__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, int *__c) { __builtin_altivec_stvxl(__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector unsigned int __a, int __b, vector unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b, + vector unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector unsigned int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool int __a, int __b, int *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool int __a, int __b, unsigned int *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, + unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector bool int __a, int __b, vector bool int *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, + vector bool int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector float __a, int __b, vector float *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, + vector float *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_stvxl(vector float __a, int __b, float *__c) -{ +static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, float *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } /* vec_sub */ -static vector signed char __ATTRS_o_ai -vec_sub(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, + vector signed char __b) { return __a - __b; } -static vector signed char __ATTRS_o_ai -vec_sub(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_sub(vector bool char __a, + vector signed char __b) { return (vector signed char)__a - __b; } -static vector signed char __ATTRS_o_ai -vec_sub(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, + vector bool char __b) { return __a - (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_sub(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a, + vector unsigned char __b) { return __a - __b; } -static vector unsigned char __ATTRS_o_ai -vec_sub(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_sub(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a - __b; } -static vector unsigned char __ATTRS_o_ai -vec_sub(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a, + vector bool char __b) { return __a - (vector unsigned char)__b; } -static vector short __ATTRS_o_ai -vec_sub(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_sub(vector short __a, vector short __b) { return __a - __b; } -static vector short __ATTRS_o_ai -vec_sub(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_sub(vector bool short __a, + vector short __b) { return (vector short)__a - __b; } -static vector short __ATTRS_o_ai -vec_sub(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_sub(vector short __a, + vector bool short __b) { return __a - (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_sub(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a, + vector unsigned short __b) { return __a - __b; } -static vector unsigned short __ATTRS_o_ai -vec_sub(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_sub(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a - __b; } -static vector unsigned short __ATTRS_o_ai -vec_sub(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a, + vector bool short __b) { return __a - (vector unsigned short)__b; } -static vector int __ATTRS_o_ai -vec_sub(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_sub(vector int __a, vector int __b) { return __a - __b; } -static vector int __ATTRS_o_ai -vec_sub(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_sub(vector bool int __a, vector int __b) { return (vector int)__a - __b; } -static vector int __ATTRS_o_ai -vec_sub(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_sub(vector int __a, vector bool int __b) { return __a - (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_sub(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a, + vector unsigned int __b) { return __a - __b; } -static vector unsigned int __ATTRS_o_ai -vec_sub(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_sub(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a - __b; } -static vector unsigned int __ATTRS_o_ai -vec_sub(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a, + vector bool int __b) { return __a - (vector unsigned int)__b; } #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) -static vector signed __int128 __ATTRS_o_ai -vec_sub(vector signed __int128 __a, vector signed __int128 __b) -{ +static vector signed __int128 __ATTRS_o_ai vec_sub(vector signed __int128 __a, + vector signed __int128 __b) { return __a - __b; } static vector unsigned __int128 __ATTRS_o_ai -vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b) -{ +vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __a - __b; } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) -static vector float __ATTRS_o_ai -vec_sub(vector float __a, vector float __b) -{ +static vector float __ATTRS_o_ai vec_sub(vector float __a, vector float __b) { return __a - __b; } @@ -8639,39 +7748,33 @@ vec_sub(vector float __a, vector float __b) #define __builtin_altivec_vsububm vec_vsububm -static vector signed char __ATTRS_o_ai -vec_vsububm(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a, + vector signed char __b) { return __a - __b; } -static vector signed char __ATTRS_o_ai -vec_vsububm(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vsububm(vector bool char __a, + vector signed char __b) { return (vector signed char)__a - __b; } -static vector signed char __ATTRS_o_ai -vec_vsububm(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a, + vector bool char __b) { return __a - (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_vsububm(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a, + vector unsigned char __b) { return __a - __b; } -static vector unsigned char __ATTRS_o_ai -vec_vsububm(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vsububm(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a - __b; } -static vector unsigned char __ATTRS_o_ai -vec_vsububm(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a, + vector bool char __b) { return __a - (vector unsigned char)__b; } @@ -8679,39 +7782,33 @@ vec_vsububm(vector unsigned char __a, vector bool char __b) #define __builtin_altivec_vsubuhm vec_vsubuhm -static vector short __ATTRS_o_ai -vec_vsubuhm(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a, + vector short __b) { return __a - __b; } -static vector short __ATTRS_o_ai -vec_vsubuhm(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vsubuhm(vector bool short __a, + vector short __b) { return (vector short)__a - __b; } -static vector short __ATTRS_o_ai -vec_vsubuhm(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a, + vector bool short __b) { return __a - (vector short)__b; } static vector unsigned short __ATTRS_o_ai -vec_vsubuhm(vector unsigned short __a, vector unsigned short __b) -{ +vec_vsubuhm(vector unsigned short __a, vector unsigned short __b) { return __a - __b; } static vector unsigned short __ATTRS_o_ai -vec_vsubuhm(vector bool short __a, vector unsigned short __b) -{ +vec_vsubuhm(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a - __b; } -static vector unsigned short __ATTRS_o_ai -vec_vsubuhm(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector unsigned short __a, + vector bool short __b) { return __a - (vector unsigned short)__b; } @@ -8719,39 +7816,32 @@ vec_vsubuhm(vector unsigned short __a, vector bool short __b) #define __builtin_altivec_vsubuwm vec_vsubuwm -static vector int __ATTRS_o_ai -vec_vsubuwm(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b) { return __a - __b; } -static vector int __ATTRS_o_ai -vec_vsubuwm(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vsubuwm(vector bool int __a, + vector int __b) { return (vector int)__a - __b; } -static vector int __ATTRS_o_ai -vec_vsubuwm(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, + vector bool int __b) { return __a - (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_vsubuwm(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a, + vector unsigned int __b) { return __a - __b; } -static vector unsigned int __ATTRS_o_ai -vec_vsubuwm(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a - __b; } -static vector unsigned int __ATTRS_o_ai -vec_vsubuwm(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a, + vector bool int __b) { return __a - (vector unsigned int)__b; } @@ -8760,29 +7850,25 @@ vec_vsubuwm(vector unsigned int __a, vector bool int __b) #define __builtin_altivec_vsubfp vec_vsubfp static vector float __attribute__((__always_inline__)) -vec_vsubfp(vector float __a, vector float __b) -{ +vec_vsubfp(vector float __a, vector float __b) { return __a - __b; } /* vec_subc */ -static vector unsigned int __ATTRS_o_ai -vec_subc(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_subc(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vsubcuw(__a, __b); } #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) static vector unsigned __int128 __ATTRS_o_ai -vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) -{ +vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __builtin_altivec_vsubcuq(__a, __b); } static vector signed __int128 __ATTRS_o_ai -vec_subc(vector signed __int128 __a, vector signed __int128 __b) -{ +vec_subc(vector signed __int128 __a, vector signed __int128 __b) { return __builtin_altivec_vsubcuq(__a, __b); } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) @@ -8790,238 +7876,196 @@ vec_subc(vector signed __int128 __a, vector signed __int128 __b) /* vec_vsubcuw */ static vector unsigned int __attribute__((__always_inline__)) -vec_vsubcuw(vector unsigned int __a, vector unsigned int __b) -{ +vec_vsubcuw(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vsubcuw(__a, __b); } /* vec_subs */ -static vector signed char __ATTRS_o_ai -vec_subs(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vsubsbs(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_subs(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_subs(vector bool char __a, + vector signed char __b) { return __builtin_altivec_vsubsbs((vector signed char)__a, __b); } -static vector signed char __ATTRS_o_ai -vec_subs(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vsubsbs(__a, (vector signed char)__b); } -static vector unsigned char __ATTRS_o_ai -vec_subs(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vsububs(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_subs(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_subs(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vsububs((vector unsigned char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_subs(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vsububs(__a, (vector unsigned char)__b); } -static vector short __ATTRS_o_ai -vec_subs(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_subs(vector short __a, vector short __b) { return __builtin_altivec_vsubshs(__a, __b); } -static vector short __ATTRS_o_ai -vec_subs(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_subs(vector bool short __a, + vector short __b) { return __builtin_altivec_vsubshs((vector short)__a, __b); } -static vector short __ATTRS_o_ai -vec_subs(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_subs(vector short __a, + vector bool short __b) { return __builtin_altivec_vsubshs(__a, (vector short)__b); } -static vector unsigned short __ATTRS_o_ai -vec_subs(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vsubuhs(__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_subs(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_subs(vector bool short __a, + vector unsigned short __b) { return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_subs(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a, + vector bool short __b) { return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b); } -static vector int __ATTRS_o_ai -vec_subs(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_subs(vector int __a, vector int __b) { return __builtin_altivec_vsubsws(__a, __b); } -static vector int __ATTRS_o_ai -vec_subs(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_subs(vector bool int __a, vector int __b) { return __builtin_altivec_vsubsws((vector int)__a, __b); } -static vector int __ATTRS_o_ai -vec_subs(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_subs(vector int __a, vector bool int __b) { return __builtin_altivec_vsubsws(__a, (vector int)__b); } -static vector unsigned int __ATTRS_o_ai -vec_subs(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vsubuws(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_subs(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_subs(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vsubuws((vector unsigned int)__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_subs(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b); } /* vec_vsubsbs */ -static vector signed char __ATTRS_o_ai -vec_vsubsbs(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vsubsbs(__a, __b); } -static vector signed char __ATTRS_o_ai -vec_vsubsbs(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vsubsbs(vector bool char __a, + vector signed char __b) { return __builtin_altivec_vsubsbs((vector signed char)__a, __b); } -static vector signed char __ATTRS_o_ai -vec_vsubsbs(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vsubsbs(__a, (vector signed char)__b); } /* vec_vsububs */ -static vector unsigned char __ATTRS_o_ai -vec_vsububs(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vsububs(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vsububs(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vsububs(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vsububs((vector unsigned char)__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vsububs(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vsububs(__a, (vector unsigned char)__b); } /* vec_vsubshs */ -static vector short __ATTRS_o_ai -vec_vsubshs(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vsubshs(vector short __a, + vector short __b) { return __builtin_altivec_vsubshs(__a, __b); } -static vector short __ATTRS_o_ai -vec_vsubshs(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vsubshs(vector bool short __a, + vector short __b) { return __builtin_altivec_vsubshs((vector short)__a, __b); } -static vector short __ATTRS_o_ai -vec_vsubshs(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vsubshs(vector short __a, + vector bool short __b) { return __builtin_altivec_vsubshs(__a, (vector short)__b); } /* vec_vsubuhs */ static vector unsigned short __ATTRS_o_ai -vec_vsubuhs(vector unsigned short __a, vector unsigned short __b) -{ +vec_vsubuhs(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vsubuhs(__a, __b); } static vector unsigned short __ATTRS_o_ai -vec_vsubuhs(vector bool short __a, vector unsigned short __b) -{ +vec_vsubuhs(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b); } -static vector unsigned short __ATTRS_o_ai -vec_vsubuhs(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a, + vector bool short __b) { return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b); } /* vec_vsubsws */ -static vector int __ATTRS_o_ai -vec_vsubsws(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b) { return __builtin_altivec_vsubsws(__a, __b); } -static vector int __ATTRS_o_ai -vec_vsubsws(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vsubsws(vector bool int __a, + vector int __b) { return __builtin_altivec_vsubsws((vector int)__a, __b); } -static vector int __ATTRS_o_ai -vec_vsubsws(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vsubsws(vector int __a, + vector bool int __b) { return __builtin_altivec_vsubsws(__a, (vector int)__b); } /* vec_vsubuws */ -static vector unsigned int __ATTRS_o_ai -vec_vsubuws(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vsubuws(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vsubuws(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vsubuws((vector unsigned int)__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_vsubuws(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b); } @@ -9029,14 +8073,12 @@ vec_vsubuws(vector unsigned int __a, vector bool int __b) /* vec_vsubuqm */ static vector signed __int128 __ATTRS_o_ai -vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b) -{ +vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b) { return __a - __b; } static vector unsigned __int128 __ATTRS_o_ai -vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) -{ +vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __a - __b; } @@ -9044,29 +8086,25 @@ vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) static vector signed __int128 __ATTRS_o_ai vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b, - vector signed __int128 __c) -{ + vector signed __int128 __c) { return __builtin_altivec_vsubeuqm(__a, __b, __c); } static vector unsigned __int128 __ATTRS_o_ai vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b, - vector unsigned __int128 __c) -{ + vector unsigned __int128 __c) { return __builtin_altivec_vsubeuqm(__a, __b, __c); } /* vec_vsubcuq */ static vector signed __int128 __ATTRS_o_ai -vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) -{ +vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) { return __builtin_altivec_vsubcuq(__a, __b); } static vector unsigned __int128 __ATTRS_o_ai -vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) -{ +vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __builtin_altivec_vsubcuq(__a, __b); } @@ -9074,60 +8112,52 @@ vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) static vector signed __int128 __ATTRS_o_ai vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b, - vector signed __int128 __c) -{ + vector signed __int128 __c) { return __builtin_altivec_vsubecuq(__a, __b, __c); } static vector unsigned __int128 __ATTRS_o_ai vec_vsubecuq(vector unsigned __int128 __a, vector unsigned __int128 __b, - vector unsigned __int128 __c) -{ + vector unsigned __int128 __c) { return __builtin_altivec_vsubecuq(__a, __b, __c); } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) /* vec_sum4s */ -static vector int __ATTRS_o_ai -vec_sum4s(vector signed char __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_sum4s(vector signed char __a, + vector int __b) { return __builtin_altivec_vsum4sbs(__a, __b); } -static vector unsigned int __ATTRS_o_ai -vec_sum4s(vector unsigned char __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_sum4s(vector unsigned char __a, + vector unsigned int __b) { return __builtin_altivec_vsum4ubs(__a, __b); } -static vector int __ATTRS_o_ai -vec_sum4s(vector signed short __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_sum4s(vector signed short __a, + vector int __b) { return __builtin_altivec_vsum4shs(__a, __b); } /* vec_vsum4sbs */ static vector int __attribute__((__always_inline__)) -vec_vsum4sbs(vector signed char __a, vector int __b) -{ +vec_vsum4sbs(vector signed char __a, vector int __b) { return __builtin_altivec_vsum4sbs(__a, __b); } /* vec_vsum4ubs */ static vector unsigned int __attribute__((__always_inline__)) -vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b) -{ +vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b) { return __builtin_altivec_vsum4ubs(__a, __b); } /* vec_vsum4shs */ static vector int __attribute__((__always_inline__)) -vec_vsum4shs(vector signed short __a, vector int __b) -{ +vec_vsum4shs(vector signed short __a, vector int __b) { return __builtin_altivec_vsum4shs(__a, __b); } @@ -9140,16 +8170,15 @@ vec_vsum4shs(vector signed short __a, vector int __b) endian we must perform some permutes. */ static vector signed int __attribute__((__always_inline__)) -vec_sum2s(vector int __a, vector int __b) -{ +vec_sum2s(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ - vector int __c = (vector signed int) - vec_perm(__b, __b, (vector unsigned char) - (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11)); + vector int __c = (vector signed int)vec_perm( + __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, + 8, 9, 10, 11)); __c = __builtin_altivec_vsum2sws(__a, __c); - return (vector signed int) - vec_perm(__c, __c, (vector unsigned char) - (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11)); + return (vector signed int)vec_perm( + __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, + 8, 9, 10, 11)); #else return __builtin_altivec_vsum2sws(__a, __b); #endif @@ -9158,16 +8187,15 @@ vec_sum2s(vector int __a, vector int __b) /* vec_vsum2sws */ static vector signed int __attribute__((__always_inline__)) -vec_vsum2sws(vector int __a, vector int __b) -{ +vec_vsum2sws(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ - vector int __c = (vector signed int) - vec_perm(__b, __b, (vector unsigned char) - (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11)); + vector int __c = (vector signed int)vec_perm( + __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, + 8, 9, 10, 11)); __c = __builtin_altivec_vsum2sws(__a, __c); - return (vector signed int) - vec_perm(__c, __c, (vector unsigned char) - (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11)); + return (vector signed int)vec_perm( + __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, + 8, 9, 10, 11)); #else return __builtin_altivec_vsum2sws(__a, __b); #endif @@ -9182,8 +8210,7 @@ vec_vsum2sws(vector int __a, vector int __b) some permutes. */ static vector signed int __attribute__((__always_inline__)) -vec_sums(vector signed int __a, vector signed int __b) -{ +vec_sums(vector signed int __a, vector signed int __b) { #ifdef __LITTLE_ENDIAN__ __b = (vector signed int)vec_splat(__b, 3); __b = __builtin_altivec_vsumsws(__a, __b); @@ -9196,8 +8223,7 @@ vec_sums(vector signed int __a, vector signed int __b) /* vec_vsumsws */ static vector signed int __attribute__((__always_inline__)) -vec_vsumsws(vector signed int __a, vector signed int __b) -{ +vec_vsumsws(vector signed int __a, vector signed int __b) { #ifdef __LITTLE_ENDIAN__ __b = (vector signed int)vec_splat(__b, 3); __b = __builtin_altivec_vsumsws(__a, __b); @@ -9210,16 +8236,14 @@ vec_vsumsws(vector signed int __a, vector signed int __b) /* vec_trunc */ static vector float __attribute__((__always_inline__)) -vec_trunc(vector float __a) -{ +vec_trunc(vector float __a) { return __builtin_altivec_vrfiz(__a); } /* vec_vrfiz */ static vector float __attribute__((__always_inline__)) -vec_vrfiz(vector float __a) -{ +vec_vrfiz(vector float __a) { return __builtin_altivec_vrfiz(__a); } @@ -9228,9 +8252,7 @@ vec_vrfiz(vector float __a) /* The vector unpack instructions all have a big-endian bias, so for little endian we must reverse the meanings of "high" and "low." */ -static vector short __ATTRS_o_ai -vec_unpackh(vector signed char __a) -{ +static vector short __ATTRS_o_ai vec_unpackh(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsb((vector char)__a); #else @@ -9238,9 +8260,7 @@ vec_unpackh(vector signed char __a) #endif } -static vector bool short __ATTRS_o_ai -vec_unpackh(vector bool char __a) -{ +static vector bool short __ATTRS_o_ai vec_unpackh(vector bool char __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)__builtin_altivec_vupklsb((vector char)__a); #else @@ -9248,9 +8268,7 @@ vec_unpackh(vector bool char __a) #endif } -static vector int __ATTRS_o_ai -vec_unpackh(vector short __a) -{ +static vector int __ATTRS_o_ai vec_unpackh(vector short __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsh(__a); #else @@ -9258,9 +8276,7 @@ vec_unpackh(vector short __a) #endif } -static vector bool int __ATTRS_o_ai -vec_unpackh(vector bool short __a) -{ +static vector bool int __ATTRS_o_ai vec_unpackh(vector bool short __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)__builtin_altivec_vupklsh((vector short)__a); #else @@ -9268,9 +8284,7 @@ vec_unpackh(vector bool short __a) #endif } -static vector unsigned int __ATTRS_o_ai -vec_unpackh(vector pixel __a) -{ +static vector unsigned int __ATTRS_o_ai vec_unpackh(vector pixel __a) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a); #else @@ -9279,9 +8293,7 @@ vec_unpackh(vector pixel __a) } #ifdef __POWER8_VECTOR__ -static vector long long __ATTRS_o_ai -vec_unpackh(vector int __a) -{ +static vector long long __ATTRS_o_ai vec_unpackh(vector int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsw(__a); #else @@ -9289,9 +8301,7 @@ vec_unpackh(vector int __a) #endif } -static vector bool long long __ATTRS_o_ai -vec_unpackh(vector bool int __a) -{ +static vector bool long long __ATTRS_o_ai vec_unpackh(vector bool int __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a); #else @@ -9302,9 +8312,7 @@ vec_unpackh(vector bool int __a) /* vec_vupkhsb */ -static vector short __ATTRS_o_ai -vec_vupkhsb(vector signed char __a) -{ +static vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsb((vector char)__a); #else @@ -9312,9 +8320,7 @@ vec_vupkhsb(vector signed char __a) #endif } -static vector bool short __ATTRS_o_ai -vec_vupkhsb(vector bool char __a) -{ +static vector bool short __ATTRS_o_ai vec_vupkhsb(vector bool char __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)__builtin_altivec_vupklsb((vector char)__a); #else @@ -9324,9 +8330,7 @@ vec_vupkhsb(vector bool char __a) /* vec_vupkhsh */ -static vector int __ATTRS_o_ai -vec_vupkhsh(vector short __a) -{ +static vector int __ATTRS_o_ai vec_vupkhsh(vector short __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsh(__a); #else @@ -9334,9 +8338,7 @@ vec_vupkhsh(vector short __a) #endif } -static vector bool int __ATTRS_o_ai -vec_vupkhsh(vector bool short __a) -{ +static vector bool int __ATTRS_o_ai vec_vupkhsh(vector bool short __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)__builtin_altivec_vupklsh((vector short)__a); #else @@ -9344,9 +8346,7 @@ vec_vupkhsh(vector bool short __a) #endif } -static vector unsigned int __ATTRS_o_ai -vec_vupkhsh(vector pixel __a) -{ +static vector unsigned int __ATTRS_o_ai vec_vupkhsh(vector pixel __a) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a); #else @@ -9357,9 +8357,7 @@ vec_vupkhsh(vector pixel __a) /* vec_vupkhsw */ #ifdef __POWER8_VECTOR__ -static vector long long __ATTRS_o_ai -vec_vupkhsw(vector int __a) -{ +static vector long long __ATTRS_o_ai vec_vupkhsw(vector int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsw(__a); #else @@ -9367,9 +8365,7 @@ vec_vupkhsw(vector int __a) #endif } -static vector bool long long __ATTRS_o_ai -vec_vupkhsw(vector bool int __a) -{ +static vector bool long long __ATTRS_o_ai vec_vupkhsw(vector bool int __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a); #else @@ -9380,9 +8376,7 @@ vec_vupkhsw(vector bool int __a) /* vec_unpackl */ -static vector short __ATTRS_o_ai -vec_unpackl(vector signed char __a) -{ +static vector short __ATTRS_o_ai vec_unpackl(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsb((vector char)__a); #else @@ -9390,9 +8384,7 @@ vec_unpackl(vector signed char __a) #endif } -static vector bool short __ATTRS_o_ai -vec_unpackl(vector bool char __a) -{ +static vector bool short __ATTRS_o_ai vec_unpackl(vector bool char __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a); #else @@ -9400,9 +8392,7 @@ vec_unpackl(vector bool char __a) #endif } -static vector int __ATTRS_o_ai -vec_unpackl(vector short __a) -{ +static vector int __ATTRS_o_ai vec_unpackl(vector short __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsh(__a); #else @@ -9410,9 +8400,7 @@ vec_unpackl(vector short __a) #endif } -static vector bool int __ATTRS_o_ai -vec_unpackl(vector bool short __a) -{ +static vector bool int __ATTRS_o_ai vec_unpackl(vector bool short __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a); #else @@ -9420,9 +8408,7 @@ vec_unpackl(vector bool short __a) #endif } -static vector unsigned int __ATTRS_o_ai -vec_unpackl(vector pixel __a) -{ +static vector unsigned int __ATTRS_o_ai vec_unpackl(vector pixel __a) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a); #else @@ -9431,9 +8417,7 @@ vec_unpackl(vector pixel __a) } #ifdef __POWER8_VECTOR__ -static vector long long __ATTRS_o_ai -vec_unpackl(vector int __a) -{ +static vector long long __ATTRS_o_ai vec_unpackl(vector int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsw(__a); #else @@ -9441,9 +8425,7 @@ vec_unpackl(vector int __a) #endif } -static vector bool long long __ATTRS_o_ai -vec_unpackl(vector bool int __a) -{ +static vector bool long long __ATTRS_o_ai vec_unpackl(vector bool int __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a); #else @@ -9454,9 +8436,7 @@ vec_unpackl(vector bool int __a) /* vec_vupklsb */ -static vector short __ATTRS_o_ai -vec_vupklsb(vector signed char __a) -{ +static vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsb((vector char)__a); #else @@ -9464,9 +8444,7 @@ vec_vupklsb(vector signed char __a) #endif } -static vector bool short __ATTRS_o_ai -vec_vupklsb(vector bool char __a) -{ +static vector bool short __ATTRS_o_ai vec_vupklsb(vector bool char __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a); #else @@ -9476,9 +8454,7 @@ vec_vupklsb(vector bool char __a) /* vec_vupklsh */ -static vector int __ATTRS_o_ai -vec_vupklsh(vector short __a) -{ +static vector int __ATTRS_o_ai vec_vupklsh(vector short __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsh(__a); #else @@ -9486,9 +8462,7 @@ vec_vupklsh(vector short __a) #endif } -static vector bool int __ATTRS_o_ai -vec_vupklsh(vector bool short __a) -{ +static vector bool int __ATTRS_o_ai vec_vupklsh(vector bool short __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a); #else @@ -9496,9 +8470,7 @@ vec_vupklsh(vector bool short __a) #endif } -static vector unsigned int __ATTRS_o_ai -vec_vupklsh(vector pixel __a) -{ +static vector unsigned int __ATTRS_o_ai vec_vupklsh(vector pixel __a) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a); #else @@ -9509,9 +8481,7 @@ vec_vupklsh(vector pixel __a) /* vec_vupklsw */ #ifdef __POWER8_VECTOR__ -static vector long long __ATTRS_o_ai -vec_vupklsw(vector int __a) -{ +static vector long long __ATTRS_o_ai vec_vupklsw(vector int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsw(__a); #else @@ -9519,9 +8489,7 @@ vec_vupklsw(vector int __a) #endif } -static vector bool long long __ATTRS_o_ai -vec_vupklsw(vector bool int __a) -{ +static vector bool long long __ATTRS_o_ai vec_vupklsw(vector bool int __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a); #else @@ -9534,39 +8502,32 @@ vec_vupklsw(vector bool int __a) #ifdef __VSX__ -static vector signed int __ATTRS_o_ai -vec_vsx_ld(int __a, const vector signed int *__b) -{ +static vector signed int __ATTRS_o_ai vec_vsx_ld(int __a, + const vector signed int *__b) { return (vector signed int)__builtin_vsx_lxvw4x(__a, __b); } static vector unsigned int __ATTRS_o_ai -vec_vsx_ld(int __a, const vector unsigned int *__b) -{ +vec_vsx_ld(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b); } -static vector float __ATTRS_o_ai -vec_vsx_ld(int __a, const vector float *__b) -{ +static vector float __ATTRS_o_ai vec_vsx_ld(int __a, const vector float *__b) { return (vector float)__builtin_vsx_lxvw4x(__a, __b); } static vector signed long long __ATTRS_o_ai -vec_vsx_ld(int __a, const vector signed long long *__b) -{ +vec_vsx_ld(int __a, const vector signed long long *__b) { return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b); } static vector unsigned long long __ATTRS_o_ai -vec_vsx_ld(int __a, const vector unsigned long long *__b) -{ +vec_vsx_ld(int __a, const vector unsigned long long *__b) { return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b); } -static vector double __ATTRS_o_ai -vec_vsx_ld(int __a, const vector double *__b) -{ +static vector double __ATTRS_o_ai vec_vsx_ld(int __a, + const vector double *__b) { return (vector double)__builtin_vsx_lxvd2x(__a, __b); } @@ -9576,40 +8537,33 @@ vec_vsx_ld(int __a, const vector double *__b) #ifdef __VSX__ -static void __ATTRS_o_ai -vec_vsx_st(vector signed int __a, int __b, vector signed int *__c) -{ +static void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b, + vector signed int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_vsx_st(vector unsigned int __a, int __b, vector unsigned int *__c) -{ +static void __ATTRS_o_ai vec_vsx_st(vector unsigned int __a, int __b, + vector unsigned int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_vsx_st(vector float __a, int __b, vector float *__c) -{ +static void __ATTRS_o_ai vec_vsx_st(vector float __a, int __b, + vector float *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } -static void __ATTRS_o_ai -vec_vsx_st(vector signed long long __a, int __b, vector signed long long *__c) -{ +static void __ATTRS_o_ai vec_vsx_st(vector signed long long __a, int __b, + vector signed long long *__c) { __builtin_vsx_stxvd2x((vector double)__a, __b, __c); } -static void __ATTRS_o_ai -vec_vsx_st(vector unsigned long long __a, int __b, - vector unsigned long long *__c) -{ +static void __ATTRS_o_ai vec_vsx_st(vector unsigned long long __a, int __b, + vector unsigned long long *__c) { __builtin_vsx_stxvd2x((vector double)__a, __b, __c); } -static void __ATTRS_o_ai -vec_vsx_st(vector double __a, int __b, vector double *__c) -{ +static void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b, + vector double *__c) { __builtin_vsx_stxvd2x((vector double)__a, __b, __c); } @@ -9619,1656 +8573,1294 @@ vec_vsx_st(vector double __a, int __b, vector double *__c) #define __builtin_altivec_vxor vec_xor -static vector signed char __ATTRS_o_ai -vec_xor(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a, + vector signed char __b) { return __a ^ __b; } -static vector signed char __ATTRS_o_ai -vec_xor(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_xor(vector bool char __a, + vector signed char __b) { return (vector signed char)__a ^ __b; } -static vector signed char __ATTRS_o_ai -vec_xor(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a, + vector bool char __b) { return __a ^ (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_xor(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, + vector unsigned char __b) { return __a ^ __b; } -static vector unsigned char __ATTRS_o_ai -vec_xor(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_xor(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a ^ __b; } -static vector unsigned char __ATTRS_o_ai -vec_xor(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, + vector bool char __b) { return __a ^ (vector unsigned char)__b; } -static vector bool char __ATTRS_o_ai -vec_xor(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_xor(vector bool char __a, + vector bool char __b) { return __a ^ __b; } -static vector short __ATTRS_o_ai -vec_xor(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_xor(vector short __a, vector short __b) { return __a ^ __b; } -static vector short __ATTRS_o_ai -vec_xor(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_xor(vector bool short __a, + vector short __b) { return (vector short)__a ^ __b; } -static vector short __ATTRS_o_ai -vec_xor(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_xor(vector short __a, + vector bool short __b) { return __a ^ (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_xor(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a, + vector unsigned short __b) { return __a ^ __b; } -static vector unsigned short __ATTRS_o_ai -vec_xor(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_xor(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a ^ __b; } -static vector unsigned short __ATTRS_o_ai -vec_xor(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a, + vector bool short __b) { return __a ^ (vector unsigned short)__b; } -static vector bool short __ATTRS_o_ai -vec_xor(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_xor(vector bool short __a, + vector bool short __b) { return __a ^ __b; } -static vector int __ATTRS_o_ai -vec_xor(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_xor(vector int __a, vector int __b) { return __a ^ __b; } -static vector int __ATTRS_o_ai -vec_xor(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_xor(vector bool int __a, vector int __b) { return (vector int)__a ^ __b; } -static vector int __ATTRS_o_ai -vec_xor(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_xor(vector int __a, vector bool int __b) { return __a ^ (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_xor(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a, + vector unsigned int __b) { return __a ^ __b; } -static vector unsigned int __ATTRS_o_ai -vec_xor(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_xor(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a ^ __b; } -static vector unsigned int __ATTRS_o_ai -vec_xor(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a, + vector bool int __b) { return __a ^ (vector unsigned int)__b; } -static vector bool int __ATTRS_o_ai -vec_xor(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_xor(vector bool int __a, + vector bool int __b) { return __a ^ __b; } -static vector float __ATTRS_o_ai -vec_xor(vector float __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_xor(vector float __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_xor(vector bool int __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_xor(vector bool int __a, + vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_xor(vector float __a, vector bool int __b) -{ - vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_xor(vector float __a, + vector bool int __b) { + vector unsigned int __res = + (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_xor(vector signed long long __a, vector signed long long __b) { + return __a ^ __b; +} + +static vector signed long long __ATTRS_o_ai +vec_xor(vector bool long long __a, vector signed long long __b) { + return (vector signed long long)__a ^ __b; +} + +static vector signed long long __ATTRS_o_ai vec_xor(vector signed long long __a, + vector bool long long __b) { + return __a ^ (vector signed long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_xor(vector unsigned long long __a, vector unsigned long long __b) { + return __a ^ __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_xor(vector bool long long __a, vector unsigned long long __b) { + return (vector unsigned long long)__a ^ __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_xor(vector unsigned long long __a, vector bool long long __b) { + return __a ^ (vector unsigned long long)__b; +} + +static vector bool long long __ATTRS_o_ai vec_xor(vector bool long long __a, + vector bool long long __b) { + return __a ^ __b; +} +#endif + /* vec_vxor */ -static vector signed char __ATTRS_o_ai -vec_vxor(vector signed char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a, + vector signed char __b) { return __a ^ __b; } -static vector signed char __ATTRS_o_ai -vec_vxor(vector bool char __a, vector signed char __b) -{ +static vector signed char __ATTRS_o_ai vec_vxor(vector bool char __a, + vector signed char __b) { return (vector signed char)__a ^ __b; } -static vector signed char __ATTRS_o_ai -vec_vxor(vector signed char __a, vector bool char __b) -{ +static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a, + vector bool char __b) { return __a ^ (vector signed char)__b; } -static vector unsigned char __ATTRS_o_ai -vec_vxor(vector unsigned char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a, + vector unsigned char __b) { return __a ^ __b; } -static vector unsigned char __ATTRS_o_ai -vec_vxor(vector bool char __a, vector unsigned char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vxor(vector bool char __a, + vector unsigned char __b) { return (vector unsigned char)__a ^ __b; } -static vector unsigned char __ATTRS_o_ai -vec_vxor(vector unsigned char __a, vector bool char __b) -{ +static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a, + vector bool char __b) { return __a ^ (vector unsigned char)__b; } -static vector bool char __ATTRS_o_ai -vec_vxor(vector bool char __a, vector bool char __b) -{ +static vector bool char __ATTRS_o_ai vec_vxor(vector bool char __a, + vector bool char __b) { return __a ^ __b; } -static vector short __ATTRS_o_ai -vec_vxor(vector short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vxor(vector short __a, vector short __b) { return __a ^ __b; } -static vector short __ATTRS_o_ai -vec_vxor(vector bool short __a, vector short __b) -{ +static vector short __ATTRS_o_ai vec_vxor(vector bool short __a, + vector short __b) { return (vector short)__a ^ __b; } -static vector short __ATTRS_o_ai -vec_vxor(vector short __a, vector bool short __b) -{ +static vector short __ATTRS_o_ai vec_vxor(vector short __a, + vector bool short __b) { return __a ^ (vector short)__b; } -static vector unsigned short __ATTRS_o_ai -vec_vxor(vector unsigned short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a, + vector unsigned short __b) { return __a ^ __b; } -static vector unsigned short __ATTRS_o_ai -vec_vxor(vector bool short __a, vector unsigned short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vxor(vector bool short __a, + vector unsigned short __b) { return (vector unsigned short)__a ^ __b; } -static vector unsigned short __ATTRS_o_ai -vec_vxor(vector unsigned short __a, vector bool short __b) -{ +static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a, + vector bool short __b) { return __a ^ (vector unsigned short)__b; } -static vector bool short __ATTRS_o_ai -vec_vxor(vector bool short __a, vector bool short __b) -{ +static vector bool short __ATTRS_o_ai vec_vxor(vector bool short __a, + vector bool short __b) { return __a ^ __b; } -static vector int __ATTRS_o_ai -vec_vxor(vector int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector int __b) { return __a ^ __b; } -static vector int __ATTRS_o_ai -vec_vxor(vector bool int __a, vector int __b) -{ +static vector int __ATTRS_o_ai vec_vxor(vector bool int __a, vector int __b) { return (vector int)__a ^ __b; } -static vector int __ATTRS_o_ai -vec_vxor(vector int __a, vector bool int __b) -{ +static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector bool int __b) { return __a ^ (vector int)__b; } -static vector unsigned int __ATTRS_o_ai -vec_vxor(vector unsigned int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a, + vector unsigned int __b) { return __a ^ __b; } -static vector unsigned int __ATTRS_o_ai -vec_vxor(vector bool int __a, vector unsigned int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vxor(vector bool int __a, + vector unsigned int __b) { return (vector unsigned int)__a ^ __b; } -static vector unsigned int __ATTRS_o_ai -vec_vxor(vector unsigned int __a, vector bool int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a, + vector bool int __b) { return __a ^ (vector unsigned int)__b; } -static vector bool int __ATTRS_o_ai -vec_vxor(vector bool int __a, vector bool int __b) -{ +static vector bool int __ATTRS_o_ai vec_vxor(vector bool int __a, + vector bool int __b) { return __a ^ __b; } -static vector float __ATTRS_o_ai -vec_vxor(vector float __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vxor(vector float __a, vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vxor(vector bool int __a, vector float __b) -{ - vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vxor(vector bool int __a, + vector float __b) { + vector unsigned int __res = + (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } -static vector float __ATTRS_o_ai -vec_vxor(vector float __a, vector bool int __b) -{ - vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; +static vector float __ATTRS_o_ai vec_vxor(vector float __a, + vector bool int __b) { + vector unsigned int __res = + (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } +#ifdef __VSX__ +static vector signed long long __ATTRS_o_ai +vec_vxor(vector signed long long __a, vector signed long long __b) { + return __a ^ __b; +} + +static vector signed long long __ATTRS_o_ai +vec_vxor(vector bool long long __a, vector signed long long __b) { + return (vector signed long long)__a ^ __b; +} + +static vector signed long long __ATTRS_o_ai +vec_vxor(vector signed long long __a, vector bool long long __b) { + return __a ^ (vector signed long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vxor(vector unsigned long long __a, vector unsigned long long __b) { + return __a ^ __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vxor(vector bool long long __a, vector unsigned long long __b) { + return (vector unsigned long long)__a ^ __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vxor(vector unsigned long long __a, vector bool long long __b) { + return __a ^ (vector unsigned long long)__b; +} + +static vector bool long long __ATTRS_o_ai vec_vxor(vector bool long long __a, + vector bool long long __b) { + return __a ^ __b; +} +#endif + /* ------------------------ extensions for CBEA ----------------------------- */ /* vec_extract */ -static signed char __ATTRS_o_ai -vec_extract(vector signed char __a, int __b) -{ +static signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b) { return __a[__b]; } -static unsigned char __ATTRS_o_ai -vec_extract(vector unsigned char __a, int __b) -{ +static unsigned char __ATTRS_o_ai vec_extract(vector unsigned char __a, + int __b) { return __a[__b]; } -static short __ATTRS_o_ai -vec_extract(vector short __a, int __b) -{ +static short __ATTRS_o_ai vec_extract(vector short __a, int __b) { return __a[__b]; } -static unsigned short __ATTRS_o_ai -vec_extract(vector unsigned short __a, int __b) -{ +static unsigned short __ATTRS_o_ai vec_extract(vector unsigned short __a, + int __b) { return __a[__b]; } -static int __ATTRS_o_ai -vec_extract(vector int __a, int __b) -{ +static int __ATTRS_o_ai vec_extract(vector int __a, int __b) { return __a[__b]; } -static unsigned int __ATTRS_o_ai -vec_extract(vector unsigned int __a, int __b) -{ +static unsigned int __ATTRS_o_ai vec_extract(vector unsigned int __a, int __b) { return __a[__b]; } -static float __ATTRS_o_ai -vec_extract(vector float __a, int __b) -{ +static float __ATTRS_o_ai vec_extract(vector float __a, int __b) { return __a[__b]; } /* vec_insert */ -static vector signed char __ATTRS_o_ai -vec_insert(signed char __a, vector signed char __b, int __c) -{ +static vector signed char __ATTRS_o_ai vec_insert(signed char __a, + vector signed char __b, + int __c) { __b[__c] = __a; return __b; } -static vector unsigned char __ATTRS_o_ai -vec_insert(unsigned char __a, vector unsigned char __b, int __c) -{ +static vector unsigned char __ATTRS_o_ai vec_insert(unsigned char __a, + vector unsigned char __b, + int __c) { __b[__c] = __a; return __b; } -static vector short __ATTRS_o_ai -vec_insert(short __a, vector short __b, int __c) -{ +static vector short __ATTRS_o_ai vec_insert(short __a, vector short __b, + int __c) { __b[__c] = __a; return __b; } -static vector unsigned short __ATTRS_o_ai -vec_insert(unsigned short __a, vector unsigned short __b, int __c) -{ +static vector unsigned short __ATTRS_o_ai vec_insert(unsigned short __a, + vector unsigned short __b, + int __c) { __b[__c] = __a; return __b; } -static vector int __ATTRS_o_ai -vec_insert(int __a, vector int __b, int __c) -{ +static vector int __ATTRS_o_ai vec_insert(int __a, vector int __b, int __c) { __b[__c] = __a; return __b; } -static vector unsigned int __ATTRS_o_ai -vec_insert(unsigned int __a, vector unsigned int __b, int __c) -{ +static vector unsigned int __ATTRS_o_ai vec_insert(unsigned int __a, + vector unsigned int __b, + int __c) { __b[__c] = __a; return __b; } -static vector float __ATTRS_o_ai -vec_insert(float __a, vector float __b, int __c) -{ +static vector float __ATTRS_o_ai vec_insert(float __a, vector float __b, + int __c) { __b[__c] = __a; return __b; } /* vec_lvlx */ -static vector signed char __ATTRS_o_ai -vec_lvlx(int __a, const signed char *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector signed char)(0), +static vector signed char __ATTRS_o_ai vec_lvlx(int __a, + const signed char *__b) { + return vec_perm(vec_ld(__a, __b), (vector signed char)(0), vec_lvsl(__a, __b)); } -static vector signed char __ATTRS_o_ai -vec_lvlx(int __a, const vector signed char *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector signed char)(0), +static vector signed char __ATTRS_o_ai vec_lvlx(int __a, + const vector signed char *__b) { + return vec_perm(vec_ld(__a, __b), (vector signed char)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned char __ATTRS_o_ai -vec_lvlx(int __a, const unsigned char *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector unsigned char)(0), +static vector unsigned char __ATTRS_o_ai vec_lvlx(int __a, + const unsigned char *__b) { + return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0), vec_lvsl(__a, __b)); } static vector unsigned char __ATTRS_o_ai -vec_lvlx(int __a, const vector unsigned char *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector unsigned char)(0), +vec_lvlx(int __a, const vector unsigned char *__b) { + return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool char __ATTRS_o_ai -vec_lvlx(int __a, const vector bool char *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector bool char)(0), +static vector bool char __ATTRS_o_ai vec_lvlx(int __a, + const vector bool char *__b) { + return vec_perm(vec_ld(__a, __b), (vector bool char)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector short __ATTRS_o_ai -vec_lvlx(int __a, const short *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector short)(0), - vec_lvsl(__a, __b)); +static vector short __ATTRS_o_ai vec_lvlx(int __a, const short *__b) { + return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, __b)); } -static vector short __ATTRS_o_ai -vec_lvlx(int __a, const vector short *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector short)(0), +static vector short __ATTRS_o_ai vec_lvlx(int __a, const vector short *__b) { + return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned short __ATTRS_o_ai -vec_lvlx(int __a, const unsigned short *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector unsigned short)(0), +static vector unsigned short __ATTRS_o_ai vec_lvlx(int __a, + const unsigned short *__b) { + return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0), vec_lvsl(__a, __b)); } static vector unsigned short __ATTRS_o_ai -vec_lvlx(int __a, const vector unsigned short *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector unsigned short)(0), +vec_lvlx(int __a, const vector unsigned short *__b) { + return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool short __ATTRS_o_ai -vec_lvlx(int __a, const vector bool short *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector bool short)(0), +static vector bool short __ATTRS_o_ai vec_lvlx(int __a, + const vector bool short *__b) { + return vec_perm(vec_ld(__a, __b), (vector bool short)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector pixel __ATTRS_o_ai -vec_lvlx(int __a, const vector pixel *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector pixel)(0), +static vector pixel __ATTRS_o_ai vec_lvlx(int __a, const vector pixel *__b) { + return vec_perm(vec_ld(__a, __b), (vector pixel)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector int __ATTRS_o_ai -vec_lvlx(int __a, const int *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector int)(0), - vec_lvsl(__a, __b)); +static vector int __ATTRS_o_ai vec_lvlx(int __a, const int *__b) { + return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, __b)); } -static vector int __ATTRS_o_ai -vec_lvlx(int __a, const vector int *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector int)(0), +static vector int __ATTRS_o_ai vec_lvlx(int __a, const vector int *__b) { + return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned int __ATTRS_o_ai -vec_lvlx(int __a, const unsigned int *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector unsigned int)(0), +static vector unsigned int __ATTRS_o_ai vec_lvlx(int __a, + const unsigned int *__b) { + return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0), vec_lvsl(__a, __b)); } static vector unsigned int __ATTRS_o_ai -vec_lvlx(int __a, const vector unsigned int *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector unsigned int)(0), +vec_lvlx(int __a, const vector unsigned int *__b) { + return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool int __ATTRS_o_ai -vec_lvlx(int __a, const vector bool int *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector bool int)(0), +static vector bool int __ATTRS_o_ai vec_lvlx(int __a, + const vector bool int *__b) { + return vec_perm(vec_ld(__a, __b), (vector bool int)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector float __ATTRS_o_ai -vec_lvlx(int __a, const float *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector float)(0), - vec_lvsl(__a, __b)); +static vector float __ATTRS_o_ai vec_lvlx(int __a, const float *__b) { + return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, __b)); } -static vector float __ATTRS_o_ai -vec_lvlx(int __a, const vector float *__b) -{ - return vec_perm(vec_ld(__a, __b), - (vector float)(0), +static vector float __ATTRS_o_ai vec_lvlx(int __a, const vector float *__b) { + return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, (unsigned char *)__b)); } /* vec_lvlxl */ -static vector signed char __ATTRS_o_ai -vec_lvlxl(int __a, const signed char *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector signed char)(0), +static vector signed char __ATTRS_o_ai vec_lvlxl(int __a, + const signed char *__b) { + return vec_perm(vec_ldl(__a, __b), (vector signed char)(0), vec_lvsl(__a, __b)); } static vector signed char __ATTRS_o_ai -vec_lvlxl(int __a, const vector signed char *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector signed char)(0), +vec_lvlxl(int __a, const vector signed char *__b) { + return vec_perm(vec_ldl(__a, __b), (vector signed char)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned char __ATTRS_o_ai -vec_lvlxl(int __a, const unsigned char *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector unsigned char)(0), +static vector unsigned char __ATTRS_o_ai vec_lvlxl(int __a, + const unsigned char *__b) { + return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0), vec_lvsl(__a, __b)); } static vector unsigned char __ATTRS_o_ai -vec_lvlxl(int __a, const vector unsigned char *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector unsigned char)(0), +vec_lvlxl(int __a, const vector unsigned char *__b) { + return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool char __ATTRS_o_ai -vec_lvlxl(int __a, const vector bool char *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector bool char)(0), +static vector bool char __ATTRS_o_ai vec_lvlxl(int __a, + const vector bool char *__b) { + return vec_perm(vec_ldl(__a, __b), (vector bool char)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector short __ATTRS_o_ai -vec_lvlxl(int __a, const short *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector short)(0), - vec_lvsl(__a, __b)); +static vector short __ATTRS_o_ai vec_lvlxl(int __a, const short *__b) { + return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, __b)); } -static vector short __ATTRS_o_ai -vec_lvlxl(int __a, const vector short *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector short)(0), +static vector short __ATTRS_o_ai vec_lvlxl(int __a, const vector short *__b) { + return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned short __ATTRS_o_ai -vec_lvlxl(int __a, const unsigned short *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector unsigned short)(0), +static vector unsigned short __ATTRS_o_ai vec_lvlxl(int __a, + const unsigned short *__b) { + return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0), vec_lvsl(__a, __b)); } static vector unsigned short __ATTRS_o_ai -vec_lvlxl(int __a, const vector unsigned short *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector unsigned short)(0), +vec_lvlxl(int __a, const vector unsigned short *__b) { + return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool short __ATTRS_o_ai -vec_lvlxl(int __a, const vector bool short *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector bool short)(0), +static vector bool short __ATTRS_o_ai vec_lvlxl(int __a, + const vector bool short *__b) { + return vec_perm(vec_ldl(__a, __b), (vector bool short)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector pixel __ATTRS_o_ai -vec_lvlxl(int __a, const vector pixel *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector pixel)(0), +static vector pixel __ATTRS_o_ai vec_lvlxl(int __a, const vector pixel *__b) { + return vec_perm(vec_ldl(__a, __b), (vector pixel)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector int __ATTRS_o_ai -vec_lvlxl(int __a, const int *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector int)(0), - vec_lvsl(__a, __b)); +static vector int __ATTRS_o_ai vec_lvlxl(int __a, const int *__b) { + return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, __b)); } -static vector int __ATTRS_o_ai -vec_lvlxl(int __a, const vector int *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector int)(0), +static vector int __ATTRS_o_ai vec_lvlxl(int __a, const vector int *__b) { + return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned int __ATTRS_o_ai -vec_lvlxl(int __a, const unsigned int *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector unsigned int)(0), +static vector unsigned int __ATTRS_o_ai vec_lvlxl(int __a, + const unsigned int *__b) { + return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0), vec_lvsl(__a, __b)); } static vector unsigned int __ATTRS_o_ai -vec_lvlxl(int __a, const vector unsigned int *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector unsigned int)(0), +vec_lvlxl(int __a, const vector unsigned int *__b) { + return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool int __ATTRS_o_ai -vec_lvlxl(int __a, const vector bool int *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector bool int)(0), +static vector bool int __ATTRS_o_ai vec_lvlxl(int __a, + const vector bool int *__b) { + return vec_perm(vec_ldl(__a, __b), (vector bool int)(0), vec_lvsl(__a, (unsigned char *)__b)); } -static vector float __ATTRS_o_ai -vec_lvlxl(int __a, const float *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector float)(0), - vec_lvsl(__a, __b)); +static vector float __ATTRS_o_ai vec_lvlxl(int __a, const float *__b) { + return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, __b)); } -static vector float __ATTRS_o_ai -vec_lvlxl(int __a, vector float *__b) -{ - return vec_perm(vec_ldl(__a, __b), - (vector float)(0), +static vector float __ATTRS_o_ai vec_lvlxl(int __a, vector float *__b) { + return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, (unsigned char *)__b)); } /* vec_lvrx */ -static vector signed char __ATTRS_o_ai -vec_lvrx(int __a, const signed char *__b) -{ - return vec_perm((vector signed char)(0), - vec_ld(__a, __b), +static vector signed char __ATTRS_o_ai vec_lvrx(int __a, + const signed char *__b) { + return vec_perm((vector signed char)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } -static vector signed char __ATTRS_o_ai -vec_lvrx(int __a, const vector signed char *__b) -{ - return vec_perm((vector signed char)(0), - vec_ld(__a, __b), +static vector signed char __ATTRS_o_ai vec_lvrx(int __a, + const vector signed char *__b) { + return vec_perm((vector signed char)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned char __ATTRS_o_ai -vec_lvrx(int __a, const unsigned char *__b) -{ - return vec_perm((vector unsigned char)(0), - vec_ld(__a, __b), +static vector unsigned char __ATTRS_o_ai vec_lvrx(int __a, + const unsigned char *__b) { + return vec_perm((vector unsigned char)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static vector unsigned char __ATTRS_o_ai -vec_lvrx(int __a, const vector unsigned char *__b) -{ - return vec_perm((vector unsigned char)(0), - vec_ld(__a, __b), +vec_lvrx(int __a, const vector unsigned char *__b) { + return vec_perm((vector unsigned char)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool char __ATTRS_o_ai -vec_lvrx(int __a, const vector bool char *__b) -{ - return vec_perm((vector bool char)(0), - vec_ld(__a, __b), +static vector bool char __ATTRS_o_ai vec_lvrx(int __a, + const vector bool char *__b) { + return vec_perm((vector bool char)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector short __ATTRS_o_ai -vec_lvrx(int __a, const short *__b) -{ - return vec_perm((vector short)(0), - vec_ld(__a, __b), - vec_lvsl(__a, __b)); +static vector short __ATTRS_o_ai vec_lvrx(int __a, const short *__b) { + return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } -static vector short __ATTRS_o_ai -vec_lvrx(int __a, const vector short *__b) -{ - return vec_perm((vector short)(0), - vec_ld(__a, __b), +static vector short __ATTRS_o_ai vec_lvrx(int __a, const vector short *__b) { + return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned short __ATTRS_o_ai -vec_lvrx(int __a, const unsigned short *__b) -{ - return vec_perm((vector unsigned short)(0), - vec_ld(__a, __b), +static vector unsigned short __ATTRS_o_ai vec_lvrx(int __a, + const unsigned short *__b) { + return vec_perm((vector unsigned short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static vector unsigned short __ATTRS_o_ai -vec_lvrx(int __a, const vector unsigned short *__b) -{ - return vec_perm((vector unsigned short)(0), - vec_ld(__a, __b), +vec_lvrx(int __a, const vector unsigned short *__b) { + return vec_perm((vector unsigned short)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool short __ATTRS_o_ai -vec_lvrx(int __a, const vector bool short *__b) -{ - return vec_perm((vector bool short)(0), - vec_ld(__a, __b), +static vector bool short __ATTRS_o_ai vec_lvrx(int __a, + const vector bool short *__b) { + return vec_perm((vector bool short)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector pixel __ATTRS_o_ai -vec_lvrx(int __a, const vector pixel *__b) -{ - return vec_perm((vector pixel)(0), - vec_ld(__a, __b), +static vector pixel __ATTRS_o_ai vec_lvrx(int __a, const vector pixel *__b) { + return vec_perm((vector pixel)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector int __ATTRS_o_ai -vec_lvrx(int __a, const int *__b) -{ - return vec_perm((vector int)(0), - vec_ld(__a, __b), - vec_lvsl(__a, __b)); +static vector int __ATTRS_o_ai vec_lvrx(int __a, const int *__b) { + return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } -static vector int __ATTRS_o_ai -vec_lvrx(int __a, const vector int *__b) -{ - return vec_perm((vector int)(0), - vec_ld(__a, __b), +static vector int __ATTRS_o_ai vec_lvrx(int __a, const vector int *__b) { + return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned int __ATTRS_o_ai -vec_lvrx(int __a, const unsigned int *__b) -{ - return vec_perm((vector unsigned int)(0), - vec_ld(__a, __b), +static vector unsigned int __ATTRS_o_ai vec_lvrx(int __a, + const unsigned int *__b) { + return vec_perm((vector unsigned int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static vector unsigned int __ATTRS_o_ai -vec_lvrx(int __a, const vector unsigned int *__b) -{ - return vec_perm((vector unsigned int)(0), - vec_ld(__a, __b), +vec_lvrx(int __a, const vector unsigned int *__b) { + return vec_perm((vector unsigned int)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool int __ATTRS_o_ai -vec_lvrx(int __a, const vector bool int *__b) -{ - return vec_perm((vector bool int)(0), - vec_ld(__a, __b), +static vector bool int __ATTRS_o_ai vec_lvrx(int __a, + const vector bool int *__b) { + return vec_perm((vector bool int)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector float __ATTRS_o_ai -vec_lvrx(int __a, const float *__b) -{ - return vec_perm((vector float)(0), - vec_ld(__a, __b), - vec_lvsl(__a, __b)); +static vector float __ATTRS_o_ai vec_lvrx(int __a, const float *__b) { + return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } -static vector float __ATTRS_o_ai -vec_lvrx(int __a, const vector float *__b) -{ - return vec_perm((vector float)(0), - vec_ld(__a, __b), +static vector float __ATTRS_o_ai vec_lvrx(int __a, const vector float *__b) { + return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } /* vec_lvrxl */ -static vector signed char __ATTRS_o_ai -vec_lvrxl(int __a, const signed char *__b) -{ - return vec_perm((vector signed char)(0), - vec_ldl(__a, __b), +static vector signed char __ATTRS_o_ai vec_lvrxl(int __a, + const signed char *__b) { + return vec_perm((vector signed char)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static vector signed char __ATTRS_o_ai -vec_lvrxl(int __a, const vector signed char *__b) -{ - return vec_perm((vector signed char)(0), - vec_ldl(__a, __b), +vec_lvrxl(int __a, const vector signed char *__b) { + return vec_perm((vector signed char)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned char __ATTRS_o_ai -vec_lvrxl(int __a, const unsigned char *__b) -{ - return vec_perm((vector unsigned char)(0), - vec_ldl(__a, __b), +static vector unsigned char __ATTRS_o_ai vec_lvrxl(int __a, + const unsigned char *__b) { + return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static vector unsigned char __ATTRS_o_ai -vec_lvrxl(int __a, const vector unsigned char *__b) -{ - return vec_perm((vector unsigned char)(0), - vec_ldl(__a, __b), +vec_lvrxl(int __a, const vector unsigned char *__b) { + return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool char __ATTRS_o_ai -vec_lvrxl(int __a, const vector bool char *__b) -{ - return vec_perm((vector bool char)(0), - vec_ldl(__a, __b), +static vector bool char __ATTRS_o_ai vec_lvrxl(int __a, + const vector bool char *__b) { + return vec_perm((vector bool char)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector short __ATTRS_o_ai -vec_lvrxl(int __a, const short *__b) -{ - return vec_perm((vector short)(0), - vec_ldl(__a, __b), - vec_lvsl(__a, __b)); +static vector short __ATTRS_o_ai vec_lvrxl(int __a, const short *__b) { + return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } -static vector short __ATTRS_o_ai -vec_lvrxl(int __a, const vector short *__b) -{ - return vec_perm((vector short)(0), - vec_ldl(__a, __b), +static vector short __ATTRS_o_ai vec_lvrxl(int __a, const vector short *__b) { + return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned short __ATTRS_o_ai -vec_lvrxl(int __a, const unsigned short *__b) -{ - return vec_perm((vector unsigned short)(0), - vec_ldl(__a, __b), +static vector unsigned short __ATTRS_o_ai vec_lvrxl(int __a, + const unsigned short *__b) { + return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static vector unsigned short __ATTRS_o_ai -vec_lvrxl(int __a, const vector unsigned short *__b) -{ - return vec_perm((vector unsigned short)(0), - vec_ldl(__a, __b), +vec_lvrxl(int __a, const vector unsigned short *__b) { + return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool short __ATTRS_o_ai -vec_lvrxl(int __a, const vector bool short *__b) -{ - return vec_perm((vector bool short)(0), - vec_ldl(__a, __b), +static vector bool short __ATTRS_o_ai vec_lvrxl(int __a, + const vector bool short *__b) { + return vec_perm((vector bool short)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector pixel __ATTRS_o_ai -vec_lvrxl(int __a, const vector pixel *__b) -{ - return vec_perm((vector pixel)(0), - vec_ldl(__a, __b), +static vector pixel __ATTRS_o_ai vec_lvrxl(int __a, const vector pixel *__b) { + return vec_perm((vector pixel)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector int __ATTRS_o_ai -vec_lvrxl(int __a, const int *__b) -{ - return vec_perm((vector int)(0), - vec_ldl(__a, __b), - vec_lvsl(__a, __b)); +static vector int __ATTRS_o_ai vec_lvrxl(int __a, const int *__b) { + return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } -static vector int __ATTRS_o_ai -vec_lvrxl(int __a, const vector int *__b) -{ - return vec_perm((vector int)(0), - vec_ldl(__a, __b), +static vector int __ATTRS_o_ai vec_lvrxl(int __a, const vector int *__b) { + return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector unsigned int __ATTRS_o_ai -vec_lvrxl(int __a, const unsigned int *__b) -{ - return vec_perm((vector unsigned int)(0), - vec_ldl(__a, __b), +static vector unsigned int __ATTRS_o_ai vec_lvrxl(int __a, + const unsigned int *__b) { + return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static vector unsigned int __ATTRS_o_ai -vec_lvrxl(int __a, const vector unsigned int *__b) -{ - return vec_perm((vector unsigned int)(0), - vec_ldl(__a, __b), +vec_lvrxl(int __a, const vector unsigned int *__b) { + return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector bool int __ATTRS_o_ai -vec_lvrxl(int __a, const vector bool int *__b) -{ - return vec_perm((vector bool int)(0), - vec_ldl(__a, __b), +static vector bool int __ATTRS_o_ai vec_lvrxl(int __a, + const vector bool int *__b) { + return vec_perm((vector bool int)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } -static vector float __ATTRS_o_ai -vec_lvrxl(int __a, const float *__b) -{ - return vec_perm((vector float)(0), - vec_ldl(__a, __b), - vec_lvsl(__a, __b)); +static vector float __ATTRS_o_ai vec_lvrxl(int __a, const float *__b) { + return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } -static vector float __ATTRS_o_ai -vec_lvrxl(int __a, const vector float *__b) -{ - return vec_perm((vector float)(0), - vec_ldl(__a, __b), +static vector float __ATTRS_o_ai vec_lvrxl(int __a, const vector float *__b) { + return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } /* vec_stvlx */ -static void __ATTRS_o_ai -vec_stvlx(vector signed char __a, int __b, signed char *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector signed char __a, int __b, vector signed char *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector unsigned char __a, int __b, unsigned char *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector unsigned char __a, int __b, vector unsigned char *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector bool char __a, int __b, vector bool char *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector short __a, int __b, short *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector short __a, int __b, vector short *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector unsigned short __a, int __b, unsigned short *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector unsigned short __a, int __b, vector unsigned short *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector bool short __a, int __b, vector bool short *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector pixel __a, int __b, vector pixel *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector int __a, int __b, int *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector int __a, int __b, vector int *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector unsigned int __a, int __b, unsigned int *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector unsigned int __a, int __b, vector unsigned int *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector bool int __a, int __b, vector bool int *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlx(vector float __a, int __b, vector float *__c) -{ - return vec_st(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); +static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b, + signed char *__c) { + return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b, + vector signed char *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b, + unsigned char *__c) { + return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b, + vector unsigned char *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector bool char __a, int __b, + vector bool char *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, short *__c) { + return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, + vector short *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b, + unsigned short *__c) { + return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b, + vector unsigned short *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector bool short __a, int __b, + vector bool short *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector pixel __a, int __b, + vector pixel *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, int *__c) { + return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, vector int *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b, + unsigned int *__c) { + return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b, + vector unsigned int *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector bool int __a, int __b, + vector bool int *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlx(vector float __a, int __b, + vector float *__c) { + return vec_st( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); } /* vec_stvlxl */ -static void __ATTRS_o_ai -vec_stvlxl(vector signed char __a, int __b, signed char *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector signed char __a, int __b, vector signed char *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector unsigned char __a, int __b, unsigned char *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector unsigned char __a, int __b, vector unsigned char *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector bool char __a, int __b, vector bool char *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector short __a, int __b, short *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector short __a, int __b, vector short *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector unsigned short __a, int __b, unsigned short *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector unsigned short __a, int __b, vector unsigned short *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector bool short __a, int __b, vector bool short *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector pixel __a, int __b, vector pixel *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector int __a, int __b, int *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector int __a, int __b, vector int *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector unsigned int __a, int __b, unsigned int *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector unsigned int __a, int __b, vector unsigned int *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector bool int __a, int __b, vector bool int *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvlxl(vector float __a, int __b, vector float *__c) -{ - return vec_stl(vec_perm(vec_lvrx(__b, __c), - __a, - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); +static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, + signed char *__c) { + return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, + vector signed char *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b, + unsigned char *__c) { + return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b, + vector unsigned char *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector bool char __a, int __b, + vector bool char *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, short *__c) { + return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, + vector short *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b, + unsigned short *__c) { + return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b, + vector unsigned short *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector bool short __a, int __b, + vector bool short *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector pixel __a, int __b, + vector pixel *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, int *__c) { + return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, vector int *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b, + unsigned int *__c) { + return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b, + vector unsigned int *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector bool int __a, int __b, + vector bool int *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvlxl(vector float __a, int __b, + vector float *__c) { + return vec_stl( + vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); } /* vec_stvrx */ -static void __ATTRS_o_ai -vec_stvrx(vector signed char __a, int __b, signed char *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector signed char __a, int __b, vector signed char *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector unsigned char __a, int __b, unsigned char *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector unsigned char __a, int __b, vector unsigned char *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector bool char __a, int __b, vector bool char *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector short __a, int __b, short *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector short __a, int __b, vector short *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector unsigned short __a, int __b, unsigned short *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector unsigned short __a, int __b, vector unsigned short *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector bool short __a, int __b, vector bool short *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector pixel __a, int __b, vector pixel *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector int __a, int __b, int *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector int __a, int __b, vector int *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector unsigned int __a, int __b, unsigned int *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector unsigned int __a, int __b, vector unsigned int *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector bool int __a, int __b, vector bool int *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrx(vector float __a, int __b, vector float *__c) -{ - return vec_st(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); +static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b, + signed char *__c) { + return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b, + vector signed char *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b, + unsigned char *__c) { + return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b, + vector unsigned char *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector bool char __a, int __b, + vector bool char *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, short *__c) { + return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, + vector short *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b, + unsigned short *__c) { + return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b, + vector unsigned short *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector bool short __a, int __b, + vector bool short *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector pixel __a, int __b, + vector pixel *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, int *__c) { + return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, vector int *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b, + unsigned int *__c) { + return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b, + vector unsigned int *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector bool int __a, int __b, + vector bool int *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrx(vector float __a, int __b, + vector float *__c) { + return vec_st( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); } /* vec_stvrxl */ -static void __ATTRS_o_ai -vec_stvrxl(vector signed char __a, int __b, signed char *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector signed char __a, int __b, vector signed char *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector unsigned char __a, int __b, unsigned char *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector unsigned char __a, int __b, vector unsigned char *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector bool char __a, int __b, vector bool char *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector short __a, int __b, short *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector short __a, int __b, vector short *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector unsigned short __a, int __b, unsigned short *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector unsigned short __a, int __b, vector unsigned short *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector bool short __a, int __b, vector bool short *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector pixel __a, int __b, vector pixel *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector int __a, int __b, int *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector int __a, int __b, vector int *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector unsigned int __a, int __b, unsigned int *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, __c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector unsigned int __a, int __b, vector unsigned int *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector bool int __a, int __b, vector bool int *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); -} - -static void __ATTRS_o_ai -vec_stvrxl(vector float __a, int __b, vector float *__c) -{ - return vec_stl(vec_perm(__a, - vec_lvlx(__b, __c), - vec_lvsr(__b, (unsigned char *)__c)), - __b, __c); +static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b, + signed char *__c) { + return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b, + vector signed char *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b, + unsigned char *__c) { + return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b, + vector unsigned char *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector bool char __a, int __b, + vector bool char *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, short *__c) { + return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, + vector short *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b, + unsigned short *__c) { + return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b, + vector unsigned short *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector bool short __a, int __b, + vector bool short *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector pixel __a, int __b, + vector pixel *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, int *__c) { + return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, vector int *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b, + unsigned int *__c) { + return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, + __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b, + vector unsigned int *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector bool int __a, int __b, + vector bool int *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); +} + +static void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b, + vector float *__c) { + return vec_stl( + vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), + __b, __c); } /* vec_promote */ -static vector signed char __ATTRS_o_ai -vec_promote(signed char __a, int __b) -{ +static vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b) { vector signed char __res = (vector signed char)(0); __res[__b] = __a; return __res; } -static vector unsigned char __ATTRS_o_ai -vec_promote(unsigned char __a, int __b) -{ +static vector unsigned char __ATTRS_o_ai vec_promote(unsigned char __a, + int __b) { vector unsigned char __res = (vector unsigned char)(0); __res[__b] = __a; return __res; } -static vector short __ATTRS_o_ai -vec_promote(short __a, int __b) -{ +static vector short __ATTRS_o_ai vec_promote(short __a, int __b) { vector short __res = (vector short)(0); __res[__b] = __a; return __res; } -static vector unsigned short __ATTRS_o_ai -vec_promote(unsigned short __a, int __b) -{ +static vector unsigned short __ATTRS_o_ai vec_promote(unsigned short __a, + int __b) { vector unsigned short __res = (vector unsigned short)(0); __res[__b] = __a; return __res; } -static vector int __ATTRS_o_ai -vec_promote(int __a, int __b) -{ +static vector int __ATTRS_o_ai vec_promote(int __a, int __b) { vector int __res = (vector int)(0); __res[__b] = __a; return __res; } -static vector unsigned int __ATTRS_o_ai -vec_promote(unsigned int __a, int __b) -{ +static vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a, int __b) { vector unsigned int __res = (vector unsigned int)(0); __res[__b] = __a; return __res; } -static vector float __ATTRS_o_ai -vec_promote(float __a, int __b) -{ +static vector float __ATTRS_o_ai vec_promote(float __a, int __b) { vector float __res = (vector float)(0); __res[__b] = __a; return __res; @@ -11276,45 +9868,29 @@ vec_promote(float __a, int __b) /* vec_splats */ -static vector signed char __ATTRS_o_ai -vec_splats(signed char __a) -{ +static vector signed char __ATTRS_o_ai vec_splats(signed char __a) { return (vector signed char)(__a); } -static vector unsigned char __ATTRS_o_ai -vec_splats(unsigned char __a) -{ +static vector unsigned char __ATTRS_o_ai vec_splats(unsigned char __a) { return (vector unsigned char)(__a); } -static vector short __ATTRS_o_ai -vec_splats(short __a) -{ +static vector short __ATTRS_o_ai vec_splats(short __a) { return (vector short)(__a); } -static vector unsigned short __ATTRS_o_ai -vec_splats(unsigned short __a) -{ +static vector unsigned short __ATTRS_o_ai vec_splats(unsigned short __a) { return (vector unsigned short)(__a); } -static vector int __ATTRS_o_ai -vec_splats(int __a) -{ - return (vector int)(__a); -} +static vector int __ATTRS_o_ai vec_splats(int __a) { return (vector int)(__a); } -static vector unsigned int __ATTRS_o_ai -vec_splats(unsigned int __a) -{ +static vector unsigned int __ATTRS_o_ai vec_splats(unsigned int __a) { return (vector unsigned int)(__a); } -static vector float __ATTRS_o_ai -vec_splats(float __a) -{ +static vector float __ATTRS_o_ai vec_splats(float __a) { return (vector float)(__a); } @@ -11322,2531 +9898,2018 @@ vec_splats(float __a) /* vec_all_eq */ -static int __ATTRS_o_ai -vec_all_eq(vector signed char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_eq(vector signed char __a, + vector signed char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector signed char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_eq(vector signed char __a, + vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector unsigned char __a, vector unsigned char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector unsigned char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a, + vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool char __a, vector unsigned char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_all_eq(vector short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_eq(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_all_eq(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector unsigned short __a, vector unsigned short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector unsigned short __a, vector bool short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool short __a, vector short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool short __a, vector unsigned short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool short __a, vector bool short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector pixel __a, vector pixel __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_eq(vector pixel __a, vector pixel __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_all_eq(vector int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_eq(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_eq(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector unsigned int __a, vector unsigned int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector unsigned int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a, + vector bool int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool int __a, vector unsigned int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, + (vector int)__b); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_all_eq(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_all_eq(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_eq(vector long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_all_eq(vector long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector unsigned long long __a, vector unsigned long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, +static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector unsigned long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, +static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool long long __a, vector long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, +static int __ATTRS_o_ai vec_all_eq(vector bool long long __a, + vector long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool long long __a, vector unsigned long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, +static int __ATTRS_o_ai vec_all_eq(vector bool long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } -static int __ATTRS_o_ai -vec_all_eq(vector bool long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, +static int __ATTRS_o_ai vec_all_eq(vector bool long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } #endif -static int __ATTRS_o_ai -vec_all_eq(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_all_eq(vector float __a, vector float __b) { return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b); } /* vec_all_ge */ -static int __ATTRS_o_ai -vec_all_ge(vector signed char __a, vector signed char __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector signed char __a, vector bool char __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector unsigned char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector unsigned char __a, vector bool char __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_EQ, - (vector unsigned char)__b, +static int __ATTRS_o_ai vec_all_ge(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_EQ, - (vector unsigned char)__b, +static int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector unsigned short __a, vector unsigned short __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector unsigned short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, __a); +static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, + __a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, - (vector unsigned short)__b, +static int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool short __a, vector unsigned short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, (vector unsigned short)__a); +static int __ATTRS_o_ai vec_all_ge(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, + (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, - (vector unsigned short)__b, +static int __ATTRS_o_ai vec_all_ge(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector unsigned int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector unsigned int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, - (vector unsigned int)__b, +static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, (vector unsigned int)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, - (vector unsigned int)__b, +static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, (vector unsigned int)__a); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_all_ge(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector unsigned long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b, __a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool long long __a, vector signed long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ, - (vector unsigned long long)__b, +static int __ATTRS_o_ai vec_all_ge(vector bool long long __a, + vector signed long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b, (vector unsigned long long)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector bool long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, (vector unsigned long long)__a); } -static int __ATTRS_o_ai -vec_all_ge(vector bool long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ, - (vector unsigned long long)__b, +static int __ATTRS_o_ai vec_all_ge(vector bool long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b, (vector unsigned long long)__a); } #endif -static int __ATTRS_o_ai -vec_all_ge(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_all_ge(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b); } /* vec_all_gt */ -static int __ATTRS_o_ai -vec_all_gt(vector signed char __a, vector signed char __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector signed char __a, vector bool char __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector unsigned char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector unsigned char __a, vector bool char __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT, - (vector unsigned char)__a, +static int __ATTRS_o_ai vec_all_gt(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT, - (vector unsigned char)__a, +static int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector unsigned short __a, vector unsigned short __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector unsigned short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, (vector unsigned short)__b); +static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, + (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT, - (vector unsigned short)__a, +static int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool short __a, vector unsigned short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, __b); +static int __ATTRS_o_ai vec_all_gt(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, + __b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT, - (vector unsigned short)__a, +static int __ATTRS_o_ai vec_all_gt(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector unsigned int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector unsigned int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT, - (vector unsigned int)__a, +static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, (vector unsigned int)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT, - (vector unsigned int)__a, +static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_all_gt(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector unsigned long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, +static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, (vector unsigned long long)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool long long __a, vector signed long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_LT, - (vector unsigned long long)__a, +static int __ATTRS_o_ai vec_all_gt(vector bool long long __a, + vector signed long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a, (vector unsigned long long)__b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector bool long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a, __b); } -static int __ATTRS_o_ai -vec_all_gt(vector bool long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_LT, - (vector unsigned long long)__a, +static int __ATTRS_o_ai vec_all_gt(vector bool long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a, (vector unsigned long long)__b); } #endif -static int __ATTRS_o_ai -vec_all_gt(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_all_gt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b); } /* vec_all_in */ static int __attribute__((__always_inline__)) -vec_all_in(vector float __a, vector float __b) -{ +vec_all_in(vector float __a, vector float __b) { return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b); } /* vec_all_le */ -static int __ATTRS_o_ai -vec_all_le(vector signed char __a, vector signed char __b) -{ +static int __ATTRS_o_ai vec_all_le(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector signed char __a, vector bool char __b) -{ +static int __ATTRS_o_ai vec_all_le(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b); } -static int __ATTRS_o_ai -vec_all_le(vector unsigned char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_all_le(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector unsigned char __a, vector bool char __b) -{ +static int __ATTRS_o_ai vec_all_le(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_all_le(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_EQ, - (vector unsigned char)__a, +static int __ATTRS_o_ai vec_all_le(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_all_le(vector bool char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_all_le(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_EQ, - (vector unsigned char)__a, +static int __ATTRS_o_ai vec_all_le(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_all_le(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_all_le(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_all_le(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b); } -static int __ATTRS_o_ai -vec_all_le(vector unsigned short __a, vector unsigned short __b) -{ +static int __ATTRS_o_ai vec_all_le(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector unsigned short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, (vector unsigned short)__b); +static int __ATTRS_o_ai vec_all_le(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, + (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_all_le(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, - (vector unsigned short)__a, +static int __ATTRS_o_ai vec_all_le(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_all_le(vector bool short __a, vector unsigned short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, __b); +static int __ATTRS_o_ai vec_all_le(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, + __b); } -static int __ATTRS_o_ai -vec_all_le(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, - (vector unsigned short)__a, +static int __ATTRS_o_ai vec_all_le(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_all_le(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_all_le(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_le(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b); } -static int __ATTRS_o_ai -vec_all_le(vector unsigned int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_all_le(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector unsigned int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_le(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b); } -static int __ATTRS_o_ai -vec_all_le(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, - (vector unsigned int)__a, +static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, (vector unsigned int)__b); } -static int __ATTRS_o_ai -vec_all_le(vector bool int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_all_le(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, - (vector unsigned int)__a, +static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_all_le(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_all_le(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector unsigned long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_all_le(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_all_le(vector unsigned long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, +static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, (vector unsigned long long)__b); } -static int __ATTRS_o_ai -vec_all_le(vector bool long long __a, vector signed long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ, - (vector unsigned long long)__a, +static int __ATTRS_o_ai vec_all_le(vector bool long long __a, + vector signed long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a, (vector unsigned long long)__b); } -static int __ATTRS_o_ai -vec_all_le(vector bool long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_all_le(vector bool long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a, __b); } -static int __ATTRS_o_ai -vec_all_le(vector bool long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ, - (vector unsigned long long)__a, +static int __ATTRS_o_ai vec_all_le(vector bool long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a, (vector unsigned long long)__b); } #endif -static int __ATTRS_o_ai -vec_all_le(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_all_le(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a); } /* vec_all_lt */ -static int __ATTRS_o_ai -vec_all_lt(vector signed char __a, vector signed char __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector signed char __a, vector bool char __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector signed char __a, + vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector unsigned char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector unsigned char __a, vector bool char __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a, + vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT, - (vector unsigned char)__b, +static int __ATTRS_o_ai vec_all_lt(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector bool char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT, - (vector unsigned char)__b, +static int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector unsigned short __a, vector unsigned short __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector unsigned short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, __a); +static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, + __a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT, - (vector unsigned short)__b, +static int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool short __a, vector unsigned short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, (vector unsigned short)__a); +static int __ATTRS_o_ai vec_all_lt(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, + (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT, - (vector unsigned short)__b, +static int __ATTRS_o_ai vec_all_lt(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector unsigned int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector unsigned int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a, + vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT, - (vector unsigned int)__b, +static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, (vector unsigned int)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector bool int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT, - (vector unsigned int)__b, +static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, (vector unsigned int)__a); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_all_lt(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector unsigned long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b, __a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool long long __a, vector signed long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_LT, - (vector unsigned long long)__b, +static int __ATTRS_o_ai vec_all_lt(vector bool long long __a, + vector signed long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b, (vector unsigned long long)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector bool long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, (vector unsigned long long)__a); } -static int __ATTRS_o_ai -vec_all_lt(vector bool long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_LT, - (vector unsigned long long)__b, +static int __ATTRS_o_ai vec_all_lt(vector bool long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b, (vector unsigned long long)__a); } #endif -static int __ATTRS_o_ai -vec_all_lt(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_all_lt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a); } /* vec_all_nan */ -static int __attribute__((__always_inline__)) -vec_all_nan(vector float __a) -{ +static int __attribute__((__always_inline__)) vec_all_nan(vector float __a) { return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a); } /* vec_all_ne */ -static int __ATTRS_o_ai -vec_all_ne(vector signed char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_ne(vector signed char __a, + vector signed char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector signed char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_ne(vector signed char __a, + vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector unsigned char __a, vector unsigned char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector unsigned char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a, + vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool char __a, vector unsigned char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_all_ne(vector short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_ne(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_all_ne(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector unsigned short __a, vector unsigned short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector unsigned short __a, vector bool short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool short __a, vector short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool short __a, vector unsigned short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool short __a, vector bool short __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector pixel __a, vector pixel __b) -{ - return - __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); +static int __ATTRS_o_ai vec_all_ne(vector pixel __a, vector pixel __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, + (vector short)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_all_ne(vector int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_ne(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_all_ne(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector unsigned int __a, vector unsigned int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector unsigned int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a, + vector bool int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool int __a, vector unsigned int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, + (vector int)__b); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_all_ne(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_all_ne(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b); } -static int __ATTRS_o_ai -vec_all_ne(vector unsigned long long __a, vector unsigned long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a, +static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a, (vector long long)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_all_ne(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector unsigned long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, +static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_all_ne(vector bool long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool long long __a, vector unsigned long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, +static int __ATTRS_o_ai vec_all_ne(vector bool long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_all_ne(vector bool long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, +static int __ATTRS_o_ai vec_all_ne(vector bool long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, (vector signed long long)__b); } #endif -static int __ATTRS_o_ai -vec_all_ne(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_all_ne(vector float __a, vector float __b) { return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b); } /* vec_all_nge */ static int __attribute__((__always_inline__)) -vec_all_nge(vector float __a, vector float __b) -{ +vec_all_nge(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b); } /* vec_all_ngt */ static int __attribute__((__always_inline__)) -vec_all_ngt(vector float __a, vector float __b) -{ +vec_all_ngt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b); } /* vec_all_nle */ static int __attribute__((__always_inline__)) -vec_all_nle(vector float __a, vector float __b) -{ +vec_all_nle(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a); } /* vec_all_nlt */ static int __attribute__((__always_inline__)) -vec_all_nlt(vector float __a, vector float __b) -{ +vec_all_nlt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a); } /* vec_all_numeric */ static int __attribute__((__always_inline__)) -vec_all_numeric(vector float __a) -{ +vec_all_numeric(vector float __a) { return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a); } /* vec_any_eq */ -static int __ATTRS_o_ai -vec_any_eq(vector signed char __a, vector signed char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_eq(vector signed char __a, + vector signed char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector signed char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_eq(vector signed char __a, + vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector unsigned char __a, vector unsigned char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector unsigned char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a, + vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool char __a, vector signed char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool char __a, vector unsigned char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_any_eq(vector short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_eq(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_any_eq(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector unsigned short __a, vector unsigned short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector unsigned short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool short __a, vector unsigned short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_eq(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_eq(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector pixel __a, vector pixel __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_eq(vector pixel __a, vector pixel __b) { + return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_any_eq(vector int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_eq(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_any_eq(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector unsigned int __a, vector unsigned int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector unsigned int __a, vector bool int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a, + vector bool int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool int __a, vector int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool int __a, vector unsigned int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool int __a, vector bool int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, + (vector int)__b); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_any_eq(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_eq(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_eq(vector unsigned long long __a, vector unsigned long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a, - (vector long long)__b); +static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a, + (vector long long)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_eq(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector unsigned long long __a, vector bool long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a, - (vector signed long long)__b); +static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpequd_p( + __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool long long __a, vector signed long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a, - (vector signed long long)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool long long __a, + vector signed long long __b) { + return __builtin_altivec_vcmpequd_p( + __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool long long __a, vector unsigned long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a, - (vector signed long long)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpequd_p( + __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_eq(vector bool long long __a, vector bool long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a, - (vector signed long long)__b); +static int __ATTRS_o_ai vec_any_eq(vector bool long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpequd_p( + __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b); } #endif -static int __ATTRS_o_ai -vec_any_eq(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_any_eq(vector float __a, vector float __b) { return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b); } /* vec_any_ge */ -static int __ATTRS_o_ai -vec_any_ge(vector signed char __a, vector signed char __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector signed char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b, __a); +static int __ATTRS_o_ai vec_any_ge(vector signed char __a, + vector bool char __b) { + return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b, + __a); } -static int __ATTRS_o_ai -vec_any_ge(vector unsigned char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector unsigned char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, __a); +static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a, + vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, + __a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, - (vector unsigned char)__b, +static int __ATTRS_o_ai vec_any_ge(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool char __a, vector unsigned char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, (vector unsigned char)__a); +static int __ATTRS_o_ai vec_any_ge(vector bool char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, + (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, - (vector unsigned char)__b, +static int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector unsigned short __a, vector unsigned short __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector unsigned short __a, vector bool short __b) -{ - return - __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, __a); +static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, + __a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, - (vector unsigned short)__b, +static int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool short __a, vector unsigned short __b) -{ - return - __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, (vector unsigned short)__a); +static int __ATTRS_o_ai vec_any_ge(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, + (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, - (vector unsigned short)__b, +static int __ATTRS_o_ai vec_any_ge(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector unsigned int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector unsigned int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, __a); +static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a, + vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, + __a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, - (vector unsigned int)__b, +static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, (vector unsigned int)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool int __a, vector unsigned int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, (vector unsigned int)__a); +static int __ATTRS_o_ai vec_any_ge(vector bool int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, + (vector unsigned int)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, - (vector unsigned int)__b, +static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, (vector unsigned int)__a); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_any_ge(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, (vector signed long long)__b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector unsigned long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, +static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__b, __a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector bool long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__b, (vector unsigned long long)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector bool long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, (vector unsigned long long)__a); } -static int __ATTRS_o_ai -vec_any_ge(vector bool long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector bool long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__b, (vector unsigned long long)__a); } #endif -static int __ATTRS_o_ai -vec_any_ge(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_any_ge(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b); } /* vec_any_gt */ -static int __ATTRS_o_ai -vec_any_gt(vector signed char __a, vector signed char __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector signed char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, (vector signed char)__b); +static int __ATTRS_o_ai vec_any_gt(vector signed char __a, + vector bool char __b) { + return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, + (vector signed char)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector unsigned char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector unsigned char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, (vector unsigned char)__b); +static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a, + vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, + (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, - (vector unsigned char)__a, +static int __ATTRS_o_ai vec_any_gt(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool char __a, vector unsigned char __b) -{ - return - __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, __b); +static int __ATTRS_o_ai vec_any_gt(vector bool char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, + __b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, - (vector unsigned char)__a, +static int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector unsigned short __a, vector unsigned short __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector unsigned short __a, vector bool short __b) -{ - return - __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, (vector unsigned short)__b); +static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, + (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, - (vector unsigned short)__a, +static int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool short __a, vector unsigned short __b) -{ - return - __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, __b); +static int __ATTRS_o_ai vec_any_gt(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, + __b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, - (vector unsigned short)__a, +static int __ATTRS_o_ai vec_any_gt(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector unsigned int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector unsigned int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, (vector unsigned int)__b); +static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a, + vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, + (vector unsigned int)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, - (vector unsigned int)__a, +static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, (vector unsigned int)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool int __a, vector unsigned int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, __b); +static int __ATTRS_o_ai vec_any_gt(vector bool int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, + __b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, - (vector unsigned int)__a, +static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_any_gt(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, (vector signed long long)__b); } - -static int __ATTRS_o_ai -vec_any_gt(vector unsigned long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, +static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, (vector unsigned long long)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector bool long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__a, (vector unsigned long long)__b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool long long __a, vector unsigned long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, +static int __ATTRS_o_ai vec_any_gt(vector bool long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__a, __b); } -static int __ATTRS_o_ai -vec_any_gt(vector bool long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector bool long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__a, (vector unsigned long long)__b); } #endif -static int __ATTRS_o_ai -vec_any_gt(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_any_gt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b); } /* vec_any_le */ -static int __ATTRS_o_ai -vec_any_le(vector signed char __a, vector signed char __b) -{ +static int __ATTRS_o_ai vec_any_le(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector signed char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, (vector signed char)__b); +static int __ATTRS_o_ai vec_any_le(vector signed char __a, + vector bool char __b) { + return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, + (vector signed char)__b); } -static int __ATTRS_o_ai -vec_any_le(vector unsigned char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_any_le(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector unsigned char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, (vector unsigned char)__b); +static int __ATTRS_o_ai vec_any_le(vector unsigned char __a, + vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, + (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_any_le(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, - (vector unsigned char)__a, +static int __ATTRS_o_ai vec_any_le(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_any_le(vector bool char __a, vector unsigned char __b) -{ - return - __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, __b); +static int __ATTRS_o_ai vec_any_le(vector bool char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, + __b); } -static int __ATTRS_o_ai -vec_any_le(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, - (vector unsigned char)__a, +static int __ATTRS_o_ai vec_any_le(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, (vector unsigned char)__b); } -static int __ATTRS_o_ai -vec_any_le(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_any_le(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_any_le(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_le(vector unsigned short __a, vector unsigned short __b) -{ +static int __ATTRS_o_ai vec_any_le(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector unsigned short __a, vector bool short __b) -{ - return - __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, (vector unsigned short)__b); +static int __ATTRS_o_ai vec_any_le(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, + (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_any_le(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, - (vector unsigned short)__a, +static int __ATTRS_o_ai vec_any_le(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_any_le(vector bool short __a, vector unsigned short __b) -{ - return - __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, __b); +static int __ATTRS_o_ai vec_any_le(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, + __b); } -static int __ATTRS_o_ai -vec_any_le(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, - (vector unsigned short)__a, +static int __ATTRS_o_ai vec_any_le(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, (vector unsigned short)__b); } -static int __ATTRS_o_ai -vec_any_le(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_any_le(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_any_le(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b); } -static int __ATTRS_o_ai -vec_any_le(vector unsigned int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_any_le(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector unsigned int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, (vector unsigned int)__b); +static int __ATTRS_o_ai vec_any_le(vector unsigned int __a, + vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, + (vector unsigned int)__b); } -static int __ATTRS_o_ai -vec_any_le(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, - (vector unsigned int)__a, +static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, (vector unsigned int)__b); } -static int __ATTRS_o_ai -vec_any_le(vector bool int __a, vector unsigned int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, __b); +static int __ATTRS_o_ai vec_any_le(vector bool int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, + __b); } -static int __ATTRS_o_ai -vec_any_le(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, - (vector unsigned int)__a, +static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_any_le(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_le(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector unsigned long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_le(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_le(vector unsigned long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, +static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, (vector unsigned long long)__b); } -static int __ATTRS_o_ai -vec_any_le(vector bool long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_le(vector bool long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__a, (vector unsigned long long)__b); } -static int __ATTRS_o_ai -vec_any_le(vector bool long long __a, vector unsigned long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, +static int __ATTRS_o_ai vec_any_le(vector bool long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__a, __b); } -static int __ATTRS_o_ai -vec_any_le(vector bool long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_le(vector bool long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__a, (vector unsigned long long)__b); } #endif -static int __ATTRS_o_ai -vec_any_le(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_any_le(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a); } /* vec_any_lt */ -static int __ATTRS_o_ai -vec_any_lt(vector signed char __a, vector signed char __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector signed char __a, + vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector signed char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b, __a); +static int __ATTRS_o_ai vec_any_lt(vector signed char __a, + vector bool char __b) { + return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b, + __a); } -static int __ATTRS_o_ai -vec_any_lt(vector unsigned char __a, vector unsigned char __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a, + vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector unsigned char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, __a); +static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a, + vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, + __a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool char __a, vector signed char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, - (vector unsigned char)__b, +static int __ATTRS_o_ai vec_any_lt(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool char __a, vector unsigned char __b) -{ - return - __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, (vector unsigned char)__a); +static int __ATTRS_o_ai vec_any_lt(vector bool char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, + (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool char __a, vector bool char __b) -{ - return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, - (vector unsigned char)__b, +static int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, (vector unsigned char)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector unsigned short __a, vector unsigned short __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a, + vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector unsigned short __a, vector bool short __b) -{ - return - __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, __a); +static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, + __a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, - (vector unsigned short)__b, +static int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool short __a, vector unsigned short __b) -{ - return - __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, (vector unsigned short)__a); +static int __ATTRS_o_ai vec_any_lt(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, + (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, - (vector unsigned short)__b, +static int __ATTRS_o_ai vec_any_lt(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, (vector unsigned short)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector unsigned int __a, vector unsigned int __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a, + vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector unsigned int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, __a); +static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a, + vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, + __a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool int __a, vector int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, - (vector unsigned int)__b, +static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, (vector unsigned int)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool int __a, vector unsigned int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, (vector unsigned int)__a); +static int __ATTRS_o_ai vec_any_lt(vector bool int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, + (vector unsigned int)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool int __a, vector bool int __b) -{ - return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, - (vector unsigned int)__b, +static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, (vector unsigned int)__a); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_any_lt(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, (vector signed long long)__b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector unsigned long long __a, vector bool long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, +static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__b, __a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector bool long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__b, (vector unsigned long long)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool long long __a, vector unsigned long long __b) -{ - return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, +static int __ATTRS_o_ai vec_any_lt(vector bool long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, (vector unsigned long long)__a); } -static int __ATTRS_o_ai -vec_any_lt(vector bool long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector bool long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__b, (vector unsigned long long)__a); } #endif -static int __ATTRS_o_ai -vec_any_lt(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_any_lt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a); } /* vec_any_nan */ -static int __attribute__((__always_inline__)) -vec_any_nan(vector float __a) -{ +static int __attribute__((__always_inline__)) vec_any_nan(vector float __a) { return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a); } /* vec_any_ne */ -static int __ATTRS_o_ai -vec_any_ne(vector signed char __a, vector signed char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_ne(vector signed char __a, + vector signed char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector signed char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_ne(vector signed char __a, + vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector unsigned char __a, vector unsigned char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector unsigned char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a, + vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool char __a, vector signed char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool char __a, + vector signed char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool char __a, vector unsigned char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool char __a, + vector unsigned char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool char __a, vector bool char __b) -{ - return - __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector bool char __b) { + return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, + (vector char)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector short __a, vector short __b) -{ +static int __ATTRS_o_ai vec_any_ne(vector short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_ne(vector short __a, vector bool short __b) -{ +static int __ATTRS_o_ai vec_any_ne(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector unsigned short __a, vector unsigned short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector unsigned short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a, + vector bool short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool short __a, vector short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool short __a, vector unsigned short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_ne(vector bool short __a, + vector unsigned short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool short __a, vector bool short __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_ne(vector bool short __a, + vector bool short __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector pixel __a, vector pixel __b) -{ - return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, - (vector short)__a, +static int __ATTRS_o_ai vec_any_ne(vector pixel __a, vector pixel __b) { + return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector int __a, vector int __b) -{ +static int __ATTRS_o_ai vec_any_ne(vector int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_ne(vector int __a, vector bool int __b) -{ +static int __ATTRS_o_ai vec_any_ne(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector unsigned int __a, vector unsigned int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector unsigned int __a, vector bool int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a, + vector bool int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool int __a, vector int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool int __a, vector unsigned int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool int __a, + vector unsigned int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, + (vector int)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool int __a, vector bool int __b) -{ - return - __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector bool int __b) { + return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, + (vector int)__b); } #ifdef __POWER8_VECTOR__ -static int __ATTRS_o_ai -vec_any_ne(vector signed long long __a, vector signed long long __b) -{ +static int __ATTRS_o_ai vec_any_ne(vector signed long long __a, + vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b); } -static int __ATTRS_o_ai -vec_any_ne(vector unsigned long long __a, vector unsigned long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a, - (vector long long)__b); +static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a, + (vector long long)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector signed long long __a, vector bool long long __b) -{ +static int __ATTRS_o_ai vec_any_ne(vector signed long long __a, + vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector unsigned long long __a, vector bool long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a, - (vector signed long long)__b); +static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpequd_p( + __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool long long __a, vector signed long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a, - (vector signed long long)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool long long __a, + vector signed long long __b) { + return __builtin_altivec_vcmpequd_p( + __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool long long __a, vector unsigned long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a, - (vector signed long long)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool long long __a, + vector unsigned long long __b) { + return __builtin_altivec_vcmpequd_p( + __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b); } -static int __ATTRS_o_ai -vec_any_ne(vector bool long long __a, vector bool long long __b) -{ - return - __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a, - (vector signed long long)__b); +static int __ATTRS_o_ai vec_any_ne(vector bool long long __a, + vector bool long long __b) { + return __builtin_altivec_vcmpequd_p( + __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b); } #endif -static int __ATTRS_o_ai -vec_any_ne(vector float __a, vector float __b) -{ +static int __ATTRS_o_ai vec_any_ne(vector float __a, vector float __b) { return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b); } /* vec_any_nge */ static int __attribute__((__always_inline__)) -vec_any_nge(vector float __a, vector float __b) -{ +vec_any_nge(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b); } /* vec_any_ngt */ static int __attribute__((__always_inline__)) -vec_any_ngt(vector float __a, vector float __b) -{ +vec_any_ngt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b); } /* vec_any_nle */ static int __attribute__((__always_inline__)) -vec_any_nle(vector float __a, vector float __b) -{ +vec_any_nle(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a); } /* vec_any_nlt */ static int __attribute__((__always_inline__)) -vec_any_nlt(vector float __a, vector float __b) -{ +vec_any_nlt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a); } /* vec_any_numeric */ static int __attribute__((__always_inline__)) -vec_any_numeric(vector float __a) -{ +vec_any_numeric(vector float __a) { return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a); } /* vec_any_out */ static int __attribute__((__always_inline__)) -vec_any_out(vector float __a, vector float __b) -{ +vec_any_out(vector float __a, vector float __b) { return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b); } @@ -13868,111 +11931,85 @@ removed with -mno-crypto). This is under development. */ #ifdef __CRYPTO__ static vector unsigned long long __attribute__((__always_inline__)) -__builtin_crypto_vsbox (vector unsigned long long __a) -{ +__builtin_crypto_vsbox(vector unsigned long long __a) { return __builtin_altivec_crypto_vsbox(__a); } static vector unsigned long long __attribute__((__always_inline__)) -__builtin_crypto_vcipher (vector unsigned long long __a, - vector unsigned long long __b) -{ +__builtin_crypto_vcipher(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_crypto_vcipher(__a, __b); } static vector unsigned long long __attribute__((__always_inline__)) -__builtin_crypto_vcipherlast (vector unsigned long long __a, - vector unsigned long long __b) -{ +__builtin_crypto_vcipherlast(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_crypto_vcipherlast(__a, __b); } static vector unsigned long long __attribute__((__always_inline__)) -__builtin_crypto_vncipher (vector unsigned long long __a, - vector unsigned long long __b) -{ +__builtin_crypto_vncipher(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_crypto_vncipher(__a, __b); } static vector unsigned long long __attribute__((__always_inline__)) -__builtin_crypto_vncipherlast (vector unsigned long long __a, - vector unsigned long long __b) -{ +__builtin_crypto_vncipherlast(vector unsigned long long __a, + vector unsigned long long __b) { return __builtin_altivec_crypto_vncipherlast(__a, __b); } - #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw #endif #ifdef __POWER8_VECTOR__ static vector unsigned char __ATTRS_o_ai -__builtin_crypto_vpermxor (vector unsigned char __a, - vector unsigned char __b, - vector unsigned char __c) -{ +__builtin_crypto_vpermxor(vector unsigned char __a, vector unsigned char __b, + vector unsigned char __c) { return __builtin_altivec_crypto_vpermxor(__a, __b, __c); } static vector unsigned short __ATTRS_o_ai -__builtin_crypto_vpermxor (vector unsigned short __a, - vector unsigned short __b, - vector unsigned short __c) -{ - return (vector unsigned short) - __builtin_altivec_crypto_vpermxor((vector unsigned char) __a, - (vector unsigned char) __b, - (vector unsigned char) __c); +__builtin_crypto_vpermxor(vector unsigned short __a, vector unsigned short __b, + vector unsigned short __c) { + return (vector unsigned short)__builtin_altivec_crypto_vpermxor( + (vector unsigned char)__a, (vector unsigned char)__b, + (vector unsigned char)__c); } -static vector unsigned int __ATTRS_o_ai -__builtin_crypto_vpermxor (vector unsigned int __a, - vector unsigned int __b, - vector unsigned int __c) -{ - return (vector unsigned int) - __builtin_altivec_crypto_vpermxor((vector unsigned char) __a, - (vector unsigned char) __b, - (vector unsigned char) __c); +static vector unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor( + vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { + return (vector unsigned int)__builtin_altivec_crypto_vpermxor( + (vector unsigned char)__a, (vector unsigned char)__b, + (vector unsigned char)__c); } -static vector unsigned long long __ATTRS_o_ai -__builtin_crypto_vpermxor (vector unsigned long long __a, - vector unsigned long long __b, - vector unsigned long long __c) -{ - return (vector unsigned long long) - __builtin_altivec_crypto_vpermxor((vector unsigned char) __a, - (vector unsigned char) __b, - (vector unsigned char) __c); +static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpermxor( + vector unsigned long long __a, vector unsigned long long __b, + vector unsigned long long __c) { + return (vector unsigned long long)__builtin_altivec_crypto_vpermxor( + (vector unsigned char)__a, (vector unsigned char)__b, + (vector unsigned char)__c); } static vector unsigned char __ATTRS_o_ai -__builtin_crypto_vpmsumb (vector unsigned char __a, - vector unsigned char __b) -{ +__builtin_crypto_vpmsumb(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_crypto_vpmsumb(__a, __b); } static vector unsigned short __ATTRS_o_ai -__builtin_crypto_vpmsumb (vector unsigned short __a, - vector unsigned short __b) -{ +__builtin_crypto_vpmsumb(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_crypto_vpmsumh(__a, __b); } static vector unsigned int __ATTRS_o_ai -__builtin_crypto_vpmsumb (vector unsigned int __a, - vector unsigned int __b) -{ +__builtin_crypto_vpmsumb(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_crypto_vpmsumw(__a, __b); } -static vector unsigned long long __ATTRS_o_ai -__builtin_crypto_vpmsumb (vector unsigned long long __a, - vector unsigned long long __b) -{ +static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpmsumb( + vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_crypto_vpmsumd(__a, __b); } #endif diff --git a/contrib/llvm/tools/clang/lib/Headers/ammintrin.h b/contrib/llvm/tools/clang/lib/Headers/ammintrin.h index d87b9cd..17f5ab1 100644 --- a/contrib/llvm/tools/clang/lib/Headers/ammintrin.h +++ b/contrib/llvm/tools/clang/lib/Headers/ammintrin.h @@ -30,33 +30,175 @@ #include <pmmintrin.h> +/// \brief Extracts the specified bits from the lower 64 bits of the 128-bit +/// integer vector operand at the index idx and of the length len. +/// +/// \headerfile <x86intrin.h> +/// +/// \code +/// __m128i _mm_extracti_si64(__m128i x, const int len, const int idx); +/// \endcode +/// +/// \code +/// This intrinsic corresponds to the \c EXTRQ instruction. +/// \endcode +/// +/// \param x +/// The value from which bits are extracted. +/// \param len +/// Bits [5:0] specify the length; the other bits are ignored. If bits [5:0] +/// are zero, the length is interpreted as 64. +/// \param idx +/// Bits [5:0] specify the index of the least significant bit; the other +/// bits are ignored. If the sum of the index and length is greater than +/// 64, the result is undefined. If the length and index are both zero, +/// bits [63:0] of parameter x are extracted. If the length is zero +/// but the index is non-zero, the result is undefined. +/// \returns A 128-bit integer vector whose lower 64 bits contain the bits +/// extracted from the source operand. #define _mm_extracti_si64(x, len, idx) \ ((__m128i)__builtin_ia32_extrqi((__v2di)(__m128i)(x), \ (char)(len), (char)(idx))) +/// \brief Extracts the specified bits from the lower 64 bits of the 128-bit +/// integer vector operand at the index and of the length specified by __y. +/// +/// \headerfile <x86intrin.h> +/// +/// \code +/// This intrinsic corresponds to the \c EXTRQ instruction. +/// \endcode +/// +/// \param __x +/// The value from which bits are extracted. +/// \param __y +/// Specifies the index of the least significant bit at [13:8] +/// and the length at [5:0]; all other bits are ignored. +/// If bits [5:0] are zero, the length is interpreted as 64. +/// If the sum of the index and length is greater than 64, the result is +/// undefined. If the length and index are both zero, bits [63:0] of +/// parameter __x are extracted. If the length is zero but the index is +/// non-zero, the result is undefined. +/// \returns A 128-bit vector whose lower 64 bits contain the bits extracted +/// from the source operand. static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) _mm_extract_si64(__m128i __x, __m128i __y) { return (__m128i)__builtin_ia32_extrq((__v2di)__x, (__v16qi)__y); } +/// \brief Inserts bits of a specified length from the source integer vector +/// y into the lower 64 bits of the destination integer vector x at the +/// index idx and of the length len. +/// +/// \headerfile <x86intrin.h> +/// +/// \code +/// __m128i _mm_inserti_si64(__m128i x, __m128i y, const int len, +/// const int idx); +/// \endcode +/// +/// \code +/// This intrinsic corresponds to the \c INSERTQ instruction. +/// \endcode +/// +/// \param x +/// The destination operand where bits will be inserted. The inserted bits +/// are defined by the length len and by the index idx specifying the least +/// significant bit. +/// \param y +/// The source operand containing the bits to be extracted. The extracted +/// bits are the least significant bits of operand y of length len. +/// \param len +/// Bits [5:0] specify the length; the other bits are ignored. If bits [5:0] +/// are zero, the length is interpreted as 64. +/// \param idx +/// Bits [5:0] specify the index of the least significant bit; the other +/// bits are ignored. If the sum of the index and length is greater than +/// 64, the result is undefined. If the length and index are both zero, +/// bits [63:0] of parameter y are inserted into parameter x. If the +/// length is zero but the index is non-zero, the result is undefined. +/// \returns A 128-bit integer vector containing the original lower 64-bits +/// of destination operand x with the specified bitfields replaced by the +/// lower bits of source operand y. The upper 64 bits of the return value +/// are undefined. + #define _mm_inserti_si64(x, y, len, idx) \ ((__m128i)__builtin_ia32_insertqi((__v2di)(__m128i)(x), \ (__v2di)(__m128i)(y), \ (char)(len), (char)(idx))) +/// \brief Inserts bits of a specified length from the source integer vector +/// __y into the lower 64 bits of the destination integer vector __x at +/// the index and of the length specified by __y. +/// +/// \headerfile <x86intrin.h> +/// +/// \code +/// This intrinsic corresponds to the \c INSERTQ instruction. +/// \endcode +/// +/// \param __x +/// The destination operand where bits will be inserted. The inserted bits +/// are defined by the length and by the index of the least significant bit +/// specified by operand __y. +/// \param __y +/// The source operand containing the bits to be extracted. The extracted +/// bits are the least significant bits of operand __y with length specified +/// by bits [69:64]. These are inserted into the destination at the index +/// specified by bits [77:72]; all other bits are ignored. +/// If bits [69:64] are zero, the length is interpreted as 64. +/// If the sum of the index and length is greater than 64, the result is +/// undefined. If the length and index are both zero, bits [63:0] of +/// parameter __y are inserted into parameter __x. If the length +/// is zero but the index is non-zero, the result is undefined. +/// \returns A 128-bit integer vector containing the original lower 64-bits +/// of destination operand __x with the specified bitfields replaced by the +/// lower bits of source operand __y. The upper 64 bits of the return value +/// are undefined. + static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) _mm_insert_si64(__m128i __x, __m128i __y) { return (__m128i)__builtin_ia32_insertq((__v2di)__x, (__v2di)__y); } +/// \brief Stores a 64-bit double-precision value in a 64-bit memory location. +/// To minimize caching, the data is flagged as non-temporal (unlikely to be +/// used again soon). +/// +/// \headerfile <x86intrin.h> +/// +/// \code +/// This intrinsic corresponds to the \c MOVNTSD instruction. +/// \endcode +/// +/// \param __p +/// The 64-bit memory location used to store the register value. +/// \param __a +/// The 64-bit double-precision floating-point register value to +/// be stored. static __inline__ void __attribute__((__always_inline__, __nodebug__)) _mm_stream_sd(double *__p, __m128d __a) { __builtin_ia32_movntsd(__p, (__v2df)__a); } +/// \brief Stores a 32-bit single-precision floating-point value in a 32-bit +/// memory location. To minimize caching, the data is flagged as +/// non-temporal (unlikely to be used again soon). +/// +/// \headerfile <x86intrin.h> +/// +/// \code +/// This intrinsic corresponds to the \c MOVNTSS instruction. +/// \endcode +/// +/// \param __p +/// The 32-bit memory location used to store the register value. +/// \param __a +/// The 32-bit single-precision floating-point register value to +/// be stored. static __inline__ void __attribute__((__always_inline__, __nodebug__)) _mm_stream_ss(float *__p, __m128 __a) { diff --git a/contrib/llvm/tools/clang/lib/Headers/module.modulemap b/contrib/llvm/tools/clang/lib/Headers/module.modulemap index ac5876f..8fcb5bc 100644 --- a/contrib/llvm/tools/clang/lib/Headers/module.modulemap +++ b/contrib/llvm/tools/clang/lib/Headers/module.modulemap @@ -157,6 +157,8 @@ module _Builtin_intrinsics [system] [extern_c] { explicit module aes_pclmul { requires aes, pclmul header "wmmintrin.h" + export aes + export pclmul } explicit module aes { diff --git a/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp b/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp index 3f89ea6..4007914 100644 --- a/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp +++ b/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp @@ -199,7 +199,7 @@ Lexer *Lexer::Create_PragmaLexer(SourceLocation SpellingLoc, /// Stringify - Convert the specified string into a C string, with surrounding /// ""'s, and with escaped \ and " characters. -std::string Lexer::Stringify(const std::string &Str, bool Charify) { +std::string Lexer::Stringify(StringRef Str, bool Charify) { std::string Result = Str; char Quote = Charify ? '\'' : '"'; for (unsigned i = 0, e = Result.size(); i != e; ++i) { diff --git a/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp b/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp index 4129183..addad59 100644 --- a/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp +++ b/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp @@ -332,12 +332,11 @@ static bool isBetterKnownHeader(const ModuleMap::KnownHeader &New, ModuleMap::KnownHeader ModuleMap::findModuleForHeader(const FileEntry *File, - Module *RequestingModule, - bool IncludeTextualHeaders) { + Module *RequestingModule) { HeadersMap::iterator Known = findKnownHeader(File); auto MakeResult = [&](ModuleMap::KnownHeader R) -> ModuleMap::KnownHeader { - if (!IncludeTextualHeaders && (R.getRole() & ModuleMap::TextualHeader)) + if (R.getRole() & ModuleMap::TextualHeader) return ModuleMap::KnownHeader(); return R; }; diff --git a/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp b/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp index 9046ad5..03784e2 100644 --- a/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp +++ b/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp @@ -362,12 +362,8 @@ static bool isTrivialSingleTokenExpansion(const MacroInfo *MI, // If this is a function-like macro invocation, it's safe to trivially expand // as long as the identifier is not a macro argument. - for (MacroInfo::arg_iterator I = MI->arg_begin(), E = MI->arg_end(); - I != E; ++I) - if (*I == II) - return false; // Identifier is a macro argument. + return std::find(MI->arg_begin(), MI->arg_end(), II) == MI->arg_end(); - return true; } diff --git a/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp b/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp index af7a153..5f63d35 100644 --- a/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp +++ b/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp @@ -431,8 +431,7 @@ static void InvalidPTH(DiagnosticsEngine &Diags, const char *Msg) { Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Error, "%0")) << Msg; } -PTHManager *PTHManager::Create(const std::string &file, - DiagnosticsEngine &Diags) { +PTHManager *PTHManager::Create(StringRef file, DiagnosticsEngine &Diags) { // Memory map the PTH file. llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> FileOrErr = llvm::MemoryBuffer::getFile(file); diff --git a/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp b/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp index a8641ef..84256df 100644 --- a/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp +++ b/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp @@ -799,8 +799,10 @@ bool Parser::HandlePragmaLoopHint(LoopHint &Hint) { "PragmaLoopHintInfo::Toks must contain at least one token."); // If no option is specified the argument is assumed to be a constant expr. + bool OptionUnroll = false; bool StateOption = false; - if (OptionInfo) { // Pragma unroll does not specify an option. + if (OptionInfo) { // Pragma Unroll does not specify an option. + OptionUnroll = OptionInfo->isStr("unroll"); StateOption = llvm::StringSwitch<bool>(OptionInfo->getName()) .Case("vectorize", true) .Case("interleave", true) @@ -812,14 +814,13 @@ bool Parser::HandlePragmaLoopHint(LoopHint &Hint) { if (Toks[0].is(tok::eof)) { ConsumeToken(); // The annotation token. Diag(Toks[0].getLocation(), diag::err_pragma_loop_missing_argument) - << /*StateArgument=*/StateOption << /*FullKeyword=*/PragmaUnroll; + << /*StateArgument=*/StateOption << /*FullKeyword=*/OptionUnroll; return false; } // Validate the argument. if (StateOption) { ConsumeToken(); // The annotation token. - bool OptionUnroll = OptionInfo->isStr("unroll"); SourceLocation StateLoc = Toks[0].getLocation(); IdentifierInfo *StateInfo = Toks[0].getIdentifierInfo(); if (!StateInfo || ((OptionUnroll ? !StateInfo->isStr("full") diff --git a/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp b/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp index d697ecb..97f4a8d 100644 --- a/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp @@ -1463,7 +1463,7 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { PartialDiagnosticAt FNote(CurrentFunction->getBody()->getLocStart(), S.PDiag(diag::note_thread_warning_in_fun) << CurrentFunction->getNameAsString()); - ONS.push_back(FNote); + ONS.push_back(std::move(FNote)); } return ONS; } @@ -1477,7 +1477,7 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { PartialDiagnosticAt FNote(CurrentFunction->getBody()->getLocStart(), S.PDiag(diag::note_thread_warning_in_fun) << CurrentFunction->getNameAsString()); - ONS.push_back(FNote); + ONS.push_back(std::move(FNote)); } return ONS; } @@ -1490,7 +1490,7 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { if (!Loc.isValid()) Loc = FunLocation; PartialDiagnosticAt Warning(Loc, S.PDiag(DiagID) << Kind << LockName); - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } public: @@ -1516,7 +1516,7 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { void handleInvalidLockExp(StringRef Kind, SourceLocation Loc) override { PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_cannot_resolve_lock) << Loc); - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } void handleUnmatchedUnlock(StringRef Kind, Name LockName, @@ -1532,7 +1532,7 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_unlock_kind_mismatch) << Kind << LockName << Received << Expected); - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } void handleDoubleLock(StringRef Kind, Name LockName, SourceLocation Loc) override { @@ -1566,10 +1566,10 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { if (LocLocked.isValid()) { PartialDiagnosticAt Note(LocLocked, S.PDiag(diag::note_locked_here) << Kind); - Warnings.push_back(DelayedDiag(Warning, getNotes(Note))); + Warnings.emplace_back(std::move(Warning), getNotes(Note)); return; } - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } void handleExclusiveAndShared(StringRef Kind, Name LockName, @@ -1580,7 +1580,7 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { << Kind << LockName); PartialDiagnosticAt Note(Loc2, S.PDiag(diag::note_lock_exclusive_and_shared) << Kind << LockName); - Warnings.push_back(DelayedDiag(Warning, getNotes(Note))); + Warnings.emplace_back(std::move(Warning), getNotes(Note)); } void handleNoMutexHeld(StringRef Kind, const NamedDecl *D, @@ -1593,7 +1593,7 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { diag::warn_var_deref_requires_any_lock; PartialDiagnosticAt Warning(Loc, S.PDiag(DiagID) << D->getNameAsString() << getLockKindFromAccessKind(AK)); - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } void handleMutexNotHeld(StringRef Kind, const NamedDecl *D, @@ -1628,9 +1628,9 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { PartialDiagnosticAt VNote(D->getLocation(), S.PDiag(diag::note_guarded_by_declared_here) << D->getNameAsString()); - Warnings.push_back(DelayedDiag(Warning, getNotes(Note, VNote))); + Warnings.emplace_back(std::move(Warning), getNotes(Note, VNote)); } else - Warnings.push_back(DelayedDiag(Warning, getNotes(Note))); + Warnings.emplace_back(std::move(Warning), getNotes(Note)); } else { switch (POK) { case POK_VarAccess: @@ -1656,9 +1656,9 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { PartialDiagnosticAt Note(D->getLocation(), S.PDiag(diag::note_guarded_by_declared_here) << D->getNameAsString()); - Warnings.push_back(DelayedDiag(Warning, getNotes(Note))); + Warnings.emplace_back(std::move(Warning), getNotes(Note)); } else - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } } @@ -1667,7 +1667,7 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_acquire_requires_negative_cap) << Kind << LockName << Neg); - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } @@ -1675,20 +1675,20 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { SourceLocation Loc) override { PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_fun_excludes_mutex) << Kind << FunName << LockName); - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } void handleLockAcquiredBefore(StringRef Kind, Name L1Name, Name L2Name, SourceLocation Loc) override { PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_acquired_before) << Kind << L1Name << L2Name); - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } void handleBeforeAfterCycle(Name L1Name, SourceLocation Loc) override { PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_acquired_before_after_cycle) << L1Name); - Warnings.push_back(DelayedDiag(Warning, getNotes())); + Warnings.emplace_back(std::move(Warning), getNotes()); } void enterFunction(const FunctionDecl* FD) override { @@ -1732,8 +1732,8 @@ public: StringRef VariableName) override { PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_loop_state_mismatch) << VariableName); - - Warnings.push_back(DelayedDiag(Warning, OptionalNotes())); + + Warnings.emplace_back(std::move(Warning), OptionalNotes()); } void warnParamReturnTypestateMismatch(SourceLocation Loc, @@ -1744,8 +1744,8 @@ public: PartialDiagnosticAt Warning(Loc, S.PDiag( diag::warn_param_return_typestate_mismatch) << VariableName << ExpectedState << ObservedState); - - Warnings.push_back(DelayedDiag(Warning, OptionalNotes())); + + Warnings.emplace_back(std::move(Warning), OptionalNotes()); } void warnParamTypestateMismatch(SourceLocation Loc, StringRef ExpectedState, @@ -1753,16 +1753,16 @@ public: PartialDiagnosticAt Warning(Loc, S.PDiag( diag::warn_param_typestate_mismatch) << ExpectedState << ObservedState); - - Warnings.push_back(DelayedDiag(Warning, OptionalNotes())); + + Warnings.emplace_back(std::move(Warning), OptionalNotes()); } void warnReturnTypestateForUnconsumableType(SourceLocation Loc, StringRef TypeName) override { PartialDiagnosticAt Warning(Loc, S.PDiag( diag::warn_return_typestate_for_unconsumable_type) << TypeName); - - Warnings.push_back(DelayedDiag(Warning, OptionalNotes())); + + Warnings.emplace_back(std::move(Warning), OptionalNotes()); } void warnReturnTypestateMismatch(SourceLocation Loc, StringRef ExpectedState, @@ -1770,8 +1770,8 @@ public: PartialDiagnosticAt Warning(Loc, S.PDiag( diag::warn_return_typestate_mismatch) << ExpectedState << ObservedState); - - Warnings.push_back(DelayedDiag(Warning, OptionalNotes())); + + Warnings.emplace_back(std::move(Warning), OptionalNotes()); } void warnUseOfTempInInvalidState(StringRef MethodName, StringRef State, @@ -1779,8 +1779,8 @@ public: PartialDiagnosticAt Warning(Loc, S.PDiag( diag::warn_use_of_temp_in_invalid_state) << MethodName << State); - - Warnings.push_back(DelayedDiag(Warning, OptionalNotes())); + + Warnings.emplace_back(std::move(Warning), OptionalNotes()); } void warnUseInInvalidState(StringRef MethodName, StringRef VariableName, @@ -1788,8 +1788,8 @@ public: PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_use_in_invalid_state) << MethodName << VariableName << State); - - Warnings.push_back(DelayedDiag(Warning, OptionalNotes())); + + Warnings.emplace_back(std::move(Warning), OptionalNotes()); } }; }}} @@ -1886,6 +1886,7 @@ AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, AC.getCFGBuildOptions().AddImplicitDtors = true; AC.getCFGBuildOptions().AddTemporaryDtors = true; AC.getCFGBuildOptions().AddCXXNewAllocator = false; + AC.getCFGBuildOptions().AddCXXDefaultInitExprInCtors = true; // Force that certain expressions appear as CFGElements in the CFG. This // is used to speed up various analyses. diff --git a/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp b/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp index aac28be..6b9eb2a 100644 --- a/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp @@ -72,10 +72,10 @@ public: JumpScopeChecker(Stmt *Body, Sema &S); private: void BuildScopeInformation(Decl *D, unsigned &ParentScope); - void BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, + void BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope); void BuildScopeInformation(Stmt *S, unsigned &origParentScope); - + void VerifyJumps(); void VerifyIndirectJumps(); void NoteJumpIntoScopes(ArrayRef<unsigned> ToScopes); @@ -166,7 +166,7 @@ static ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) { // A program that jumps from a point where a variable with automatic // storage duration is not in scope to a point where it is in scope // is ill-formed unless the variable has scalar type, class type with - // a trivial default constructor and a trivial destructor, a + // a trivial default constructor and a trivial destructor, a // cv-qualified version of one of these types, or an array of one of // the preceding types and is declared without an initializer. @@ -218,7 +218,7 @@ void JumpScopeChecker::BuildScopeInformation(Decl *D, unsigned &ParentScope) { D->getLocation())); ParentScope = Scopes.size()-1; } - + // If the decl has an initializer, walk it with the potentially new // scope we just installed. if (VarDecl *VD = dyn_cast<VarDecl>(D)) @@ -227,8 +227,8 @@ void JumpScopeChecker::BuildScopeInformation(Decl *D, unsigned &ParentScope) { } /// \brief Build scope information for a captured block literal variables. -void JumpScopeChecker::BuildScopeInformation(VarDecl *D, - const BlockDecl *BDecl, +void JumpScopeChecker::BuildScopeInformation(VarDecl *D, + const BlockDecl *BDecl, unsigned &ParentScope) { // exclude captured __block variables; there's no destructor // associated with the block literal for them. @@ -257,7 +257,7 @@ void JumpScopeChecker::BuildScopeInformation(VarDecl *D, SourceLocation Loc = D->getLocation(); if (Loc.isInvalid()) Loc = BDecl->getLocation(); - Scopes.push_back(GotoScope(ParentScope, + Scopes.push_back(GotoScope(ParentScope, Diags.first, Diags.second, Loc)); ParentScope = Scopes.size()-1; } @@ -272,11 +272,11 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) // propagate out into the enclosing scope. Otherwise we have to worry // about block literals, which have the lifetime of their enclosing statement. unsigned independentParentScope = origParentScope; - unsigned &ParentScope = ((isa<Expr>(S) && !isa<StmtExpr>(S)) + unsigned &ParentScope = ((isa<Expr>(S) && !isa<StmtExpr>(S)) ? origParentScope : independentParentScope); bool SkipFirstSubStmt = false; - + // If we found a label, remember that it is in ParentScope scope. switch (S->getStmtClass()) { case Stmt::AddrLabelExprClass: @@ -307,7 +307,7 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) SkipFirstSubStmt = true; } // Fall through - + case Stmt::GotoStmtClass: // Remember both what scope a goto is in as well as the fact that we have // it. This makes the second scan not have to walk the AST again. @@ -332,7 +332,7 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) diag::note_protected_by_cxx_catch, diag::note_exits_cxx_catch, CS->getSourceRange().getBegin())); - BuildScopeInformation(CS->getHandlerBlock(), + BuildScopeInformation(CS->getHandlerBlock(), (newParentScope = Scopes.size()-1)); } return; @@ -354,14 +354,14 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) diag::note_protected_by_seh_except, diag::note_exits_seh_except, Except->getSourceRange().getBegin())); - BuildScopeInformation(Except->getBlock(), + BuildScopeInformation(Except->getBlock(), (newParentScope = Scopes.size()-1)); } else if (SEHFinallyStmt *Finally = TS->getFinallyHandler()) { Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_seh_finally, diag::note_exits_seh_finally, Finally->getSourceRange().getBegin())); - BuildScopeInformation(Finally->getBlock(), + BuildScopeInformation(Finally->getBlock(), (newParentScope = Scopes.size()-1)); } @@ -377,7 +377,7 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) SkipFirstSubStmt = false; continue; } - + Stmt *SubStmt = *CI; if (!SubStmt) continue; @@ -428,7 +428,7 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) diag::note_exits_objc_catch, AC->getAtCatchLoc())); // @catches are nested and it isn't - BuildScopeInformation(AC->getCatchBody(), + BuildScopeInformation(AC->getCatchBody(), (newParentScope = Scopes.size()-1)); } @@ -443,7 +443,7 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) continue; } - + unsigned newParentScope; // Disallow jumps into the protected statement of an @synchronized, but // allow jumps into the object expression it protects. @@ -459,7 +459,7 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) diag::note_protected_by_objc_synchronized, diag::note_exits_objc_synchronized, AS->getAtSynchronizedLoc())); - BuildScopeInformation(AS->getSynchBody(), + BuildScopeInformation(AS->getSynchBody(), (newParentScope = Scopes.size()-1)); continue; } diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp index 091e779..d9dc4df9 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp @@ -1081,6 +1081,15 @@ static TryCastResult TryStaticCast(Sema &Self, ExprResult &SrcExpr, Kind = CK_BitCast; return TC_Success; } + + // Microsoft permits static_cast from 'pointer-to-void' to + // 'pointer-to-function'. + if (!CStyle && Self.getLangOpts().MSVCCompat && + DestPointee->isFunctionType()) { + Self.Diag(OpRange.getBegin(), diag::ext_ms_cast_fn_obj) << OpRange; + Kind = CK_BitCast; + return TC_Success; + } } else if (DestType->isObjCObjectPointerType()) { // allow both c-style cast and static_cast of objective-c pointers as diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp index 23a6fc3..c3b81b6 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp @@ -1604,6 +1604,10 @@ ExprResult Sema::SemaAtomicOpsOverloaded(ExprResult TheCallResult, return ExprError(); } + // atomic_fetch_or takes a pointer to a volatile 'A'. We shouldn't let the + // volatile-ness of the pointee-type inject itself into the result or the + // other operands. + ValType.removeLocalVolatile(); QualType ResultType = ValType; if (Form == Copy || Form == GNUXchg || Form == Init) ResultType = Context.VoidTy; diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp index 18d352b..fd97809 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp @@ -1018,9 +1018,7 @@ void ResultBuilder::AddResult(Result R) { } /// \brief Enter into a new scope. -void ResultBuilder::EnterNewScope() { - ShadowMaps.push_back(ShadowMap()); -} +void ResultBuilder::EnterNewScope() { ShadowMaps.emplace_back(); } /// \brief Exit from the current scope. void ResultBuilder::ExitScope() { diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp index 31fe055..1d04159 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp @@ -3302,11 +3302,10 @@ static void handleGNUInlineAttr(Sema &S, Decl *D, const AttributeList &Attr) { static void handleCallConvAttr(Sema &S, Decl *D, const AttributeList &Attr) { if (hasDeclarator(D)) return; - const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); // Diagnostic is emitted elsewhere: here we store the (valid) Attr // in the Decl node for syntactic reasoning, e.g., pretty-printing. CallingConv CC; - if (S.CheckCallingConvAttr(Attr, CC, FD)) + if (S.CheckCallingConvAttr(Attr, CC, /*FD*/nullptr)) return; if (!isa<ObjCMethodDecl>(D)) { diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp index b1dfe0e..c80ef2d 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp @@ -1345,57 +1345,6 @@ static bool findCircularInheritance(const CXXRecordDecl *Class, return false; } -/// \brief Perform propagation of DLL attributes from a derived class to a -/// templated base class for MS compatibility. -static void propagateDLLAttrToBaseClassTemplate( - Sema &S, CXXRecordDecl *Class, Attr *ClassAttr, - ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc) { - if (getDLLAttr( - BaseTemplateSpec->getSpecializedTemplate()->getTemplatedDecl())) { - // If the base class template has a DLL attribute, don't try to change it. - return; - } - - if (BaseTemplateSpec->getSpecializationKind() == TSK_Undeclared) { - // If the base class is not already specialized, we can do the propagation. - auto *NewAttr = cast<InheritableAttr>(ClassAttr->clone(S.getASTContext())); - NewAttr->setInherited(true); - BaseTemplateSpec->addAttr(NewAttr); - return; - } - - bool DifferentAttribute = false; - if (Attr *SpecializationAttr = getDLLAttr(BaseTemplateSpec)) { - if (!SpecializationAttr->isInherited()) { - // The template has previously been specialized or instantiated with an - // explicit attribute. We should not try to change it. - return; - } - if (SpecializationAttr->getKind() == ClassAttr->getKind()) { - // The specialization already has the right attribute. - return; - } - DifferentAttribute = true; - } - - // The template was previously instantiated or explicitly specialized without - // a dll attribute, or the template was previously instantiated with a - // different inherited attribute. It's too late for us to change the - // attribute, so warn that this is unsupported. - S.Diag(BaseLoc, diag::warn_attribute_dll_instantiated_base_class) - << BaseTemplateSpec->isExplicitSpecialization() << DifferentAttribute; - S.Diag(ClassAttr->getLocation(), diag::note_attribute); - if (BaseTemplateSpec->isExplicitSpecialization()) { - S.Diag(BaseTemplateSpec->getLocation(), - diag::note_template_class_explicit_specialization_was_here) - << BaseTemplateSpec; - } else { - S.Diag(BaseTemplateSpec->getPointOfInstantiation(), - diag::note_template_class_instantiation_was_here) - << BaseTemplateSpec; - } -} - /// \brief Check the validity of a C++ base class specifier. /// /// \returns a new CXXBaseSpecifier if well-formed, emits diagnostics @@ -1467,8 +1416,8 @@ Sema::CheckBaseSpecifier(CXXRecordDecl *Class, if (Attr *ClassAttr = getDLLAttr(Class)) { if (auto *BaseTemplate = dyn_cast_or_null<ClassTemplateSpecializationDecl>( BaseType->getAsCXXRecordDecl())) { - propagateDLLAttrToBaseClassTemplate(*this, Class, ClassAttr, - BaseTemplate, BaseLoc); + propagateDLLAttrToBaseClassTemplate(Class, ClassAttr, BaseTemplate, + BaseLoc); } } } @@ -4791,8 +4740,9 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { TemplateSpecializationKind TSK = Class->getTemplateSpecializationKind(); - // Don't dllexport explicit class template instantiation declarations. - if (ClassExported && TSK == TSK_ExplicitInstantiationDeclaration) { + // Ignore explicit dllexport on explicit class template instantiation declarations. + if (ClassExported && !ClassAttr->isInherited() && + TSK == TSK_ExplicitInstantiationDeclaration) { Class->dropAttr<DLLExportAttr>(); return; } @@ -4840,12 +4790,15 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { } if (MD && ClassExported) { + if (TSK == TSK_ExplicitInstantiationDeclaration) + // Don't go any further if this is just an explicit instantiation + // declaration. + continue; + if (MD->isUserProvided()) { // Instantiate non-default class member functions ... // .. except for certain kinds of template specializations. - if (TSK == TSK_ExplicitInstantiationDeclaration) - continue; if (TSK == TSK_ImplicitInstantiation && !ClassAttr->isInherited()) continue; @@ -4876,6 +4829,61 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { } } +/// \brief Perform propagation of DLL attributes from a derived class to a +/// templated base class for MS compatibility. +void Sema::propagateDLLAttrToBaseClassTemplate( + CXXRecordDecl *Class, Attr *ClassAttr, + ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc) { + if (getDLLAttr( + BaseTemplateSpec->getSpecializedTemplate()->getTemplatedDecl())) { + // If the base class template has a DLL attribute, don't try to change it. + return; + } + + auto TSK = BaseTemplateSpec->getSpecializationKind(); + if (!getDLLAttr(BaseTemplateSpec) && + (TSK == TSK_Undeclared || TSK == TSK_ExplicitInstantiationDeclaration || + TSK == TSK_ImplicitInstantiation)) { + // The template hasn't been instantiated yet (or it has, but only as an + // explicit instantiation declaration or implicit instantiation, which means + // we haven't codegenned any members yet), so propagate the attribute. + auto *NewAttr = cast<InheritableAttr>(ClassAttr->clone(getASTContext())); + NewAttr->setInherited(true); + BaseTemplateSpec->addAttr(NewAttr); + + // If the template is already instantiated, checkDLLAttributeRedeclaration() + // needs to be run again to work see the new attribute. Otherwise this will + // get run whenever the template is instantiated. + if (TSK != TSK_Undeclared) + checkClassLevelDLLAttribute(BaseTemplateSpec); + + return; + } + + if (getDLLAttr(BaseTemplateSpec)) { + // The template has already been specialized or instantiated with an + // attribute, explicitly or through propagation. We should not try to change + // it. + return; + } + + // The template was previously instantiated or explicitly specialized without + // a dll attribute, It's too late for us to add an attribute, so warn that + // this is unsupported. + Diag(BaseLoc, diag::warn_attribute_dll_instantiated_base_class) + << BaseTemplateSpec->isExplicitSpecialization(); + Diag(ClassAttr->getLocation(), diag::note_attribute); + if (BaseTemplateSpec->isExplicitSpecialization()) { + Diag(BaseTemplateSpec->getLocation(), + diag::note_template_class_explicit_specialization_was_here) + << BaseTemplateSpec; + } else { + Diag(BaseTemplateSpec->getPointOfInstantiation(), + diag::note_template_class_instantiation_was_here) + << BaseTemplateSpec; + } +} + /// \brief Perform semantic checks on a class definition that has been /// completing, introducing implicitly-declared members, checking for /// abstract types, etc. diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp index 7ab269c..b0bc231 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp @@ -1110,10 +1110,15 @@ static QualType handleFloatConversion(Sema &S, ExprResult &LHS, return RHSType; } - if (LHSFloat) + if (LHSFloat) { + // Half FP has to be promoted to float unless it is natively supported + if (LHSType->isHalfType() && !S.getLangOpts().NativeHalfType) + LHSType = S.Context.FloatTy; + return handleIntToFloatConversion(S, LHS, RHS, LHSType, RHSType, /*convertFloat=*/!IsCompAssign, /*convertInt=*/ true); + } assert(RHSFloat); return handleIntToFloatConversion(S, RHS, LHS, RHSType, LHSType, /*convertInt=*/ true, @@ -3420,6 +3425,22 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) { Ty = Context.LongTy; else if (AllowUnsigned) Ty = Context.UnsignedLongTy; + // Check according to the rules of C90 6.1.3.2p5. C++03 [lex.icon]p2 + // is compatible. + else if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11) { + const unsigned LongLongSize = + Context.getTargetInfo().getLongLongWidth(); + Diag(Tok.getLocation(), + getLangOpts().CPlusPlus + ? Literal.isLong + ? diag::warn_old_implicitly_unsigned_long_cxx + : /*C++98 UB*/ diag:: + ext_old_implicitly_unsigned_long_cxx + : diag::warn_old_implicitly_unsigned_long) + << (LongLongSize > LongSize ? /*will have type 'long long'*/ 0 + : /*will be ill-formed*/ 1); + Ty = Context.UnsignedLongTy; + } Width = LongSize; } } diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp index c745b13..d0a55b5 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp @@ -1180,6 +1180,16 @@ Module *Sema::getOwningModule(Decl *Entity) { assert(!Entity->isFromASTFile() && "hidden entity from AST file has no owning module"); + if (!getLangOpts().ModulesLocalVisibility) { + // If we're not tracking visibility locally, the only way a declaration + // can be hidden and local is if it's hidden because it's parent is (for + // instance, maybe this is a lazily-declared special member of an imported + // class). + auto *Parent = cast<NamedDecl>(Entity->getDeclContext()); + assert(Parent->isHidden() && "unexpectedly hidden decl"); + return getOwningModule(Parent); + } + // It's local and hidden; grab or compute its owning module. M = Entity->getLocalOwningModule(); if (M) @@ -1218,9 +1228,11 @@ Module *Sema::getOwningModule(Decl *Entity) { } void Sema::makeMergedDefinitionVisible(NamedDecl *ND, SourceLocation Loc) { - auto *M = PP.getModuleContainingLocation(Loc); - assert(M && "hidden definition not in any module"); - Context.mergeDefinitionIntoModule(ND, M); + if (auto *M = PP.getModuleContainingLocation(Loc)) + Context.mergeDefinitionIntoModule(ND, M); + else + // We're not building a module; just make the definition visible. + ND->setHidden(false); } /// \brief Find the module in which the given declaration was defined. @@ -3062,7 +3074,7 @@ class ShadowContextRAII { public: ShadowContextRAII(VisibleDeclsRecord &Visible) : Visible(Visible) { - Visible.ShadowMaps.push_back(ShadowMap()); + Visible.ShadowMaps.emplace_back(); } ~ShadowContextRAII() { diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp index 9f48616..d19d881 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp @@ -154,6 +154,14 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, if (CheckNakedParmReference(OutputExpr, *this)) return StmtError(); + // Bitfield can't be referenced with a pointer. + if (Info.allowsMemory() && OutputExpr->refersToBitField()) + return StmtError(Diag(OutputExpr->getLocStart(), + diag::err_asm_bitfield_in_memory_constraint) + << 1 + << Info.getConstraintStr() + << OutputExpr->getSourceRange()); + OutputConstraintInfos.push_back(Info); // If this is dependent, just continue. @@ -230,6 +238,14 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, if (CheckNakedParmReference(InputExpr, *this)) return StmtError(); + // Bitfield can't be referenced with a pointer. + if (Info.allowsMemory() && InputExpr->refersToBitField()) + return StmtError(Diag(InputExpr->getLocStart(), + diag::err_asm_bitfield_in_memory_constraint) + << 0 + << Info.getConstraintStr() + << InputExpr->getSourceRange()); + // Only allow void types for memory constraints. if (Info.allowsMemory() && !Info.allowsRegister()) { if (CheckAsmLValue(InputExpr, *this)) diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp index 37eeee2..19c0f2a 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp @@ -7369,12 +7369,23 @@ Sema::ActOnExplicitInstantiation(Scope *S, // FIXME: Need to notify the ASTMutationListener that we did this. Def->setTemplateSpecializationKind(TSK); - if (!getDLLAttr(Def) && getDLLAttr(Specialization)) { + if (!getDLLAttr(Def) && getDLLAttr(Specialization) && + Context.getTargetInfo().getCXXABI().isMicrosoft()) { + // In the MS ABI, an explicit instantiation definition can add a dll + // attribute to a template with a previous instantiation declaration. + // MinGW doesn't allow this. auto *A = cast<InheritableAttr>( getDLLAttr(Specialization)->clone(getASTContext())); A->setInherited(true); Def->addAttr(A); checkClassLevelDLLAttribute(Def); + + // Propagate attribute to base class templates. + for (auto &B : Def->bases()) { + if (auto *BT = dyn_cast_or_null<ClassTemplateSpecializationDecl>( + B.getType()->getAsCXXRecordDecl())) + propagateDLLAttrToBaseClassTemplate(Def, A, BT, B.getLocStart()); + } } } diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp index 57a4689..628eb73 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp @@ -2842,14 +2842,14 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, if ((T.getCVRQualifiers() || T->isAtomicType()) && !(S.getLangOpts().CPlusPlus && (T->isDependentType() || T->isRecordType()))) { - if (T->isVoidType() && !S.getLangOpts().CPlusPlus && - D.getFunctionDefinitionKind() == FDK_Definition) { - // [6.9.1/3] qualified void return is invalid on a C - // function definition. Apparently ok on declarations and - // in C++ though (!) - S.Diag(DeclType.Loc, diag::err_func_returning_qualified_void) << T; - } else - diagnoseRedundantReturnTypeQualifiers(S, T, D, chunkIndex); + if (T->isVoidType() && !S.getLangOpts().CPlusPlus && + D.getFunctionDefinitionKind() == FDK_Definition) { + // [6.9.1/3] qualified void return is invalid on a C + // function definition. Apparently ok on declarations and + // in C++ though (!) + S.Diag(DeclType.Loc, diag::err_func_returning_qualified_void) << T; + } else + diagnoseRedundantReturnTypeQualifiers(S, T, D, chunkIndex); } // Objective-C ARC ownership qualifiers are ignored on the function @@ -3500,16 +3500,27 @@ static AttributeList::Kind getAttrListKind(AttributedType::Kind kind) { } static void fillAttributedTypeLoc(AttributedTypeLoc TL, - const AttributeList *attrs) { - AttributedType::Kind kind = TL.getAttrKind(); - - assert(attrs && "no type attributes in the expected location!"); - AttributeList::Kind parsedKind = getAttrListKind(kind); - while (attrs->getKind() != parsedKind) { + const AttributeList *attrs, + const AttributeList *DeclAttrs = nullptr) { + // DeclAttrs and attrs cannot be both empty. + assert((attrs || DeclAttrs) && + "no type attributes in the expected location!"); + + AttributeList::Kind parsedKind = getAttrListKind(TL.getAttrKind()); + // Try to search for an attribute of matching kind in attrs list. + while (attrs && attrs->getKind() != parsedKind) attrs = attrs->getNext(); - assert(attrs && "no matching attribute in expected location!"); + if (!attrs) { + // No matching type attribute in attrs list found. + // Try searching through C++11 attributes in the declarator attribute list. + while (DeclAttrs && (!DeclAttrs->isCXX11Attribute() || + DeclAttrs->getKind() != parsedKind)) + DeclAttrs = DeclAttrs->getNext(); + attrs = DeclAttrs; } + assert(attrs && "no matching type attribute in expected location!"); + TL.setAttrNameLoc(attrs->getLoc()); if (TL.hasAttrExprOperand()) { assert(attrs->isArgExpr(0) && "mismatched attribute operand kind"); @@ -3863,6 +3874,7 @@ Sema::GetTypeSourceInfoForDeclarator(Declarator &D, QualType T, TypeSourceInfo *ReturnTypeInfo) { TypeSourceInfo *TInfo = Context.CreateTypeSourceInfo(T); UnqualTypeLoc CurrTL = TInfo->getTypeLoc().getUnqualifiedLoc(); + const AttributeList *DeclAttrs = D.getAttributes(); // Handle parameter packs whose type is a pack expansion. if (isa<PackExpansionType>(T)) { @@ -3879,7 +3891,7 @@ Sema::GetTypeSourceInfoForDeclarator(Declarator &D, QualType T, } while (AttributedTypeLoc TL = CurrTL.getAs<AttributedTypeLoc>()) { - fillAttributedTypeLoc(TL, D.getTypeObject(i).getAttrs()); + fillAttributedTypeLoc(TL, D.getTypeObject(i).getAttrs(), DeclAttrs); CurrTL = TL.getNextTypeLoc().getUnqualifiedLoc(); } diff --git a/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp b/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp index 5e3a827..609c25d 100644 --- a/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp +++ b/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp @@ -4514,16 +4514,15 @@ bool ASTReader::ParseHeaderSearchOptions(const RecordData &Record, = static_cast<frontend::IncludeDirGroup>(Record[Idx++]); bool IsFramework = Record[Idx++]; bool IgnoreSysRoot = Record[Idx++]; - HSOpts.UserEntries.push_back( - HeaderSearchOptions::Entry(Path, Group, IsFramework, IgnoreSysRoot)); + HSOpts.UserEntries.emplace_back(std::move(Path), Group, IsFramework, + IgnoreSysRoot); } // System header prefixes. for (unsigned N = Record[Idx++]; N; --N) { std::string Prefix = ReadString(Record, Idx); bool IsSystemHeader = Record[Idx++]; - HSOpts.SystemHeaderPrefixes.push_back( - HeaderSearchOptions::SystemHeaderPrefix(Prefix, IsSystemHeader)); + HSOpts.SystemHeaderPrefixes.emplace_back(std::move(Prefix), IsSystemHeader); } HSOpts.ResourceDir = ReadString(Record, Idx); diff --git a/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp b/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp index bf74c84..e689234 100644 --- a/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp +++ b/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp @@ -2135,9 +2135,8 @@ void ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) { Record.push_back(MI->isGNUVarargs()); Record.push_back(MI->hasCommaPasting()); Record.push_back(MI->getNumArgs()); - for (MacroInfo::arg_iterator I = MI->arg_begin(), E = MI->arg_end(); - I != E; ++I) - AddIdentifierRef(*I, Record); + for (const IdentifierInfo *Arg : MI->args()) + AddIdentifierRef(Arg, Record); } // If we have a detailed preprocessing record, record the macro definition diff --git a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp index 08ba26a..275481f 100644 --- a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +++ b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp @@ -199,7 +199,7 @@ GenericTaintChecker::TaintPropagationRule::getTaintPropagationRule( const FunctionDecl *FDecl, StringRef Name, CheckerContext &C) { - // TODO: Currently, we might loose precision here: we always mark a return + // TODO: Currently, we might lose precision here: we always mark a return // value as tainted even if it's just a pointer, pointing to tainted data. // Check for exact name match for functions without builtin substitutes. diff --git a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp index 8e51154..d1938a0 100644 --- a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp +++ b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp @@ -110,7 +110,8 @@ void ObjCContainersChecker::checkPreStmt(const CallExpr *CE, if (Name.equals("CFArrayGetValueAtIndex")) { ProgramStateRef State = C.getState(); // Retrieve the size. - // Find out if we saw this array symbol before and have information about it. + // Find out if we saw this array symbol before and have information about + // it. const Expr *ArrayExpr = CE->getArg(0); SymbolRef ArraySym = getArraySym(ArrayExpr, C); if (!ArraySym) diff --git a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp index 63bb1e2..699549f 100644 --- a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp +++ b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp @@ -69,7 +69,7 @@ void ModelInjector::onBodySynthesis(const NamedDecl *D) { FrontendOptions &FrontendOpts = Invocation->getFrontendOpts(); InputKind IK = IK_CXX; // FIXME FrontendOpts.Inputs.clear(); - FrontendOpts.Inputs.push_back(FrontendInputFile(fileName, IK)); + FrontendOpts.Inputs.emplace_back(fileName, IK); FrontendOpts.DisableFree = true; Invocation->getDiagnosticOpts().VerifyDiagnostics = 0; diff --git a/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp b/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp index 2514f02..4483b18 100644 --- a/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp +++ b/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp @@ -302,8 +302,7 @@ FixedCompilationDatabase(Twine Directory, ArrayRef<std::string> CommandLine) { std::vector<std::string> ToolCommandLine(1, "clang-tool"); ToolCommandLine.insert(ToolCommandLine.end(), CommandLine.begin(), CommandLine.end()); - CompileCommands.push_back( - CompileCommand(Directory, std::move(ToolCommandLine))); + CompileCommands.emplace_back(Directory, std::move(ToolCommandLine)); } std::vector<CompileCommand> diff --git a/contrib/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp b/contrib/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp index b9fc92b..32e8e5b 100644 --- a/contrib/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp +++ b/contrib/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp @@ -43,8 +43,9 @@ Replacement::Replacement(const SourceManager &Sources, SourceLocation Start, Replacement::Replacement(const SourceManager &Sources, const CharSourceRange &Range, - StringRef ReplacementText) { - setFromSourceRange(Sources, Range, ReplacementText); + StringRef ReplacementText, + const LangOptions &LangOpts) { + setFromSourceRange(Sources, Range, ReplacementText, LangOpts); } bool Replacement::isApplicable() const { @@ -124,23 +125,25 @@ void Replacement::setFromSourceLocation(const SourceManager &Sources, // to handle ranges for refactoring in general first - there is no obvious // good way how to integrate this into the Lexer yet. static int getRangeSize(const SourceManager &Sources, - const CharSourceRange &Range) { + const CharSourceRange &Range, + const LangOptions &LangOpts) { SourceLocation SpellingBegin = Sources.getSpellingLoc(Range.getBegin()); SourceLocation SpellingEnd = Sources.getSpellingLoc(Range.getEnd()); std::pair<FileID, unsigned> Start = Sources.getDecomposedLoc(SpellingBegin); std::pair<FileID, unsigned> End = Sources.getDecomposedLoc(SpellingEnd); if (Start.first != End.first) return -1; if (Range.isTokenRange()) - End.second += Lexer::MeasureTokenLength(SpellingEnd, Sources, - LangOptions()); + End.second += Lexer::MeasureTokenLength(SpellingEnd, Sources, LangOpts); return End.second - Start.second; } void Replacement::setFromSourceRange(const SourceManager &Sources, const CharSourceRange &Range, - StringRef ReplacementText) { + StringRef ReplacementText, + const LangOptions &LangOpts) { setFromSourceLocation(Sources, Sources.getSpellingLoc(Range.getBegin()), - getRangeSize(Sources, Range), ReplacementText); + getRangeSize(Sources, Range, LangOpts), + ReplacementText); } unsigned shiftedCodePosition(const Replacements &Replaces, unsigned Position) { diff --git a/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp b/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp index 7dc211e..454a2ff 100644 --- a/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp +++ b/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp @@ -220,10 +220,10 @@ void JSONCompilationDatabase::getCommands( for (int I = 0, E = CommandsRef.size(); I != E; ++I) { SmallString<8> DirectoryStorage; SmallString<1024> CommandStorage; - Commands.push_back(CompileCommand( - // FIXME: Escape correctly: - CommandsRef[I].first->getValue(DirectoryStorage), - unescapeCommandLine(CommandsRef[I].second->getValue(CommandStorage)))); + Commands.emplace_back( + // FIXME: Escape correctly: + CommandsRef[I].first->getValue(DirectoryStorage), + unescapeCommandLine(CommandsRef[I].second->getValue(CommandStorage))); } } diff --git a/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp b/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp index 6feffa8..f73d07b 100644 --- a/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp +++ b/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp @@ -173,10 +173,8 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, } // Issue errors on unknown arguments. - for (arg_iterator it = Args->filtered_begin(OPT_UNKNOWN), - ie = Args->filtered_end(); - it != ie; ++it) { - Diags.Report(diag::err_drv_unknown_argument) << (*it)->getAsString(*Args); + for (const Arg *A : Args->filtered(OPT_UNKNOWN)) { + Diags.Report(diag::err_drv_unknown_argument) << A->getAsString(*Args); Success = false; } diff --git a/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp b/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp index e6c6d85..11a766c 100644 --- a/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -64,10 +64,9 @@ GetFlattenedSpellings(const Record &Attr) { for (const auto &Spelling : Spellings) { if (Spelling->getValueAsString("Variety") == "GCC") { // Gin up two new spelling objects to add into the list. - Ret.push_back(FlattenedSpelling("GNU", Spelling->getValueAsString("Name"), - "", true)); - Ret.push_back(FlattenedSpelling( - "CXX11", Spelling->getValueAsString("Name"), "gnu", true)); + Ret.emplace_back("GNU", Spelling->getValueAsString("Name"), "", true); + Ret.emplace_back("CXX11", Spelling->getValueAsString("Name"), "gnu", + true); } else Ret.push_back(FlattenedSpelling(*Spelling)); } diff --git a/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp b/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp index 857b22e..3349030 100644 --- a/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp +++ b/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp @@ -66,7 +66,7 @@ void EmitClangCommentCommandInfo(RecordKeeper &Records, raw_ostream &OS) { std::string Name = Tag.getValueAsString("Name"); std::string Return; raw_string_ostream(Return) << "return &Commands[" << i << "];"; - Matches.push_back(StringMatcher::StringPair(Name, Return)); + Matches.emplace_back(std::move(Name), std::move(Return)); } OS << "const CommandInfo *CommandTraits::getBuiltinCommandInfo(\n" diff --git a/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp b/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp index 22c6226..477bbc8 100644 --- a/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp +++ b/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp @@ -24,8 +24,7 @@ void clang::EmitClangCommentHTMLTags(RecordKeeper &Records, raw_ostream &OS) { std::vector<Record *> Tags = Records.getAllDerivedDefinitions("Tag"); std::vector<StringMatcher::StringPair> Matches; for (Record *Tag : Tags) { - std::string Spelling = Tag->getValueAsString("Spelling"); - Matches.push_back(StringMatcher::StringPair(Spelling, "return true;")); + Matches.emplace_back(Tag->getValueAsString("Spelling"), "return true;"); } emitSourceFileHeader("HTML tag name matcher", OS); diff --git a/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp b/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp index e039ae5..7644ae2 100644 --- a/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp +++ b/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp @@ -131,7 +131,7 @@ class Type { private: TypeSpec TS; - bool Float, Signed, Void, Poly, Constant, Pointer; + bool Float, Signed, Immediate, Void, Poly, Constant, Pointer; // ScalarForMangling and NoManglingQ are really not suited to live here as // they are not related to the type. But they live in the TypeSpec (not the // prototype), so this is really the only place to store them. @@ -140,13 +140,13 @@ private: public: Type() - : Float(false), Signed(false), Void(true), Poly(false), Constant(false), - Pointer(false), ScalarForMangling(false), NoManglingQ(false), - Bitwidth(0), ElementBitwidth(0), NumVectors(0) {} + : Float(false), Signed(false), Immediate(false), Void(true), Poly(false), + Constant(false), Pointer(false), ScalarForMangling(false), + NoManglingQ(false), Bitwidth(0), ElementBitwidth(0), NumVectors(0) {} Type(TypeSpec TS, char CharMod) - : TS(TS), Float(false), Signed(false), Void(false), Poly(false), - Constant(false), Pointer(false), ScalarForMangling(false), + : TS(TS), Float(false), Signed(false), Immediate(false), Void(false), + Poly(false), Constant(false), Pointer(false), ScalarForMangling(false), NoManglingQ(false), Bitwidth(0), ElementBitwidth(0), NumVectors(0) { applyModifier(CharMod); } @@ -167,6 +167,7 @@ public: bool isFloating() const { return Float; } bool isInteger() const { return !Float && !Poly; } bool isSigned() const { return Signed; } + bool isImmediate() const { return Immediate; } bool isScalar() const { return NumVectors == 0; } bool isVector() const { return NumVectors > 0; } bool isFloat() const { return Float && ElementBitwidth == 32; } @@ -192,6 +193,14 @@ public: Float = false; Poly = false; Signed = Sign; + Immediate = false; + ElementBitwidth = ElemWidth; + } + void makeImmediate(unsigned ElemWidth) { + Float = false; + Poly = false; + Signed = true; + Immediate = true; ElementBitwidth = ElemWidth; } void makeScalar() { @@ -337,9 +346,9 @@ public: // Modify the TypeSpec per-argument to get a concrete Type, and create // known variables for each. // Types[0] is the return value. - Types.push_back(Type(OutTS, Proto[0])); + Types.emplace_back(OutTS, Proto[0]); for (unsigned I = 1; I < Proto.size(); ++I) - Types.push_back(Type(InTS, Proto[I])); + Types.emplace_back(InTS, Proto[I]); } /// Get the Record that this intrinsic is based off. @@ -600,6 +609,12 @@ std::string Type::builtin_str() const { else if (isInteger() && !Pointer && !Signed) S = "U" + S; + // Constant indices are "int", but have the "constant expression" modifier. + if (isImmediate()) { + assert(isInteger() && isSigned()); + S = "I" + S; + } + if (isScalar()) { if (Constant) S += "C"; if (Pointer) S += "*"; @@ -853,6 +868,7 @@ void Type::applyModifier(char Mod) { ElementBitwidth = Bitwidth = 32; NumVectors = 0; Signed = true; + Immediate = true; break; case 'l': Float = false; @@ -860,6 +876,7 @@ void Type::applyModifier(char Mod) { ElementBitwidth = Bitwidth = 64; NumVectors = 0; Signed = false; + Immediate = true; break; case 'z': ElementBitwidth /= 2; @@ -1019,9 +1036,8 @@ std::string Intrinsic::getBuiltinTypeStr() { if (LocalCK == ClassI) T.makeSigned(); - // Constant indices are always just "int". if (hasImmediate() && getImmediateIdx() == I) - T.makeInteger(32, true); + T.makeImmediate(32); S += T.builtin_str(); } |