aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt12
-rw-r--r--docs/CrossCompilation.rst2
-rw-r--r--docs/DriverInternals.rst4
-rw-r--r--docs/LibASTMatchersTutorial.rst2
-rw-r--r--docs/UsersManual.rst71
-rw-r--r--include/clang/AST/Decl.h6
-rw-r--r--include/clang/AST/DeclBase.h4
-rw-r--r--include/clang/AST/DeclCXX.h4
-rw-r--r--include/clang/ASTMatchers/ASTMatchers.h17
-rw-r--r--include/clang/Analysis/CFG.h3
-rw-r--r--include/clang/Basic/DiagnosticCommonKinds.td18
-rw-r--r--include/clang/Basic/DiagnosticGroups.td3
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td16
-rw-r--r--include/clang/Basic/TokenKinds.def13
-rw-r--r--include/clang/Config/config.h.cmake3
-rw-r--r--include/clang/Config/config.h.in3
-rw-r--r--include/clang/Driver/CLCompatOptions.td2
-rw-r--r--include/clang/Driver/Options.td1
-rw-r--r--include/clang/Driver/Types.def10
-rw-r--r--include/clang/Lex/HeaderSearchOptions.h4
-rw-r--r--include/clang/Lex/Lexer.h2
-rw-r--r--include/clang/Lex/MacroInfo.h96
-rw-r--r--include/clang/Lex/ModuleMap.h7
-rw-r--r--include/clang/Lex/PPCallbacks.h17
-rw-r--r--include/clang/Lex/PTHManager.h2
-rw-r--r--include/clang/Lex/Preprocessor.h6
-rw-r--r--include/clang/Lex/PreprocessorOptions.h12
-rw-r--r--include/clang/Sema/Lookup.h8
-rw-r--r--include/clang/Sema/Sema.h4
-rw-r--r--include/clang/Tooling/Core/Replacement.h32
-rw-r--r--lib/ARCMigrate/ObjCMT.cpp2
-rw-r--r--lib/AST/DeclBase.cpp4
-rw-r--r--lib/AST/DeclCXX.cpp22
-rw-r--r--lib/AST/DeclPrinter.cpp6
-rw-r--r--lib/AST/ExprConstant.cpp5
-rw-r--r--lib/AST/MicrosoftMangle.cpp34
-rw-r--r--lib/AST/Stmt.cpp4
-rw-r--r--lib/AST/StmtPrinter.cpp16
-rw-r--r--lib/ASTMatchers/ASTMatchFinder.cpp12
-rw-r--r--lib/ASTMatchers/Dynamic/Diagnostics.cpp6
-rw-r--r--lib/ASTMatchers/Dynamic/Registry.cpp1
-rw-r--r--lib/Analysis/CFG.cpp18
-rw-r--r--lib/Basic/Diagnostic.cpp2
-rw-r--r--lib/Basic/IdentifierTable.cpp4
-rw-r--r--lib/Basic/SourceLocation.cpp2
-rw-r--r--lib/Basic/Targets.cpp98
-rw-r--r--lib/CodeGen/BackendUtil.cpp13
-rw-r--r--lib/CodeGen/CGBuiltin.cpp85
-rw-r--r--lib/CodeGen/CGCXX.cpp2
-rw-r--r--lib/CodeGen/CGCall.cpp48
-rw-r--r--lib/CodeGen/CGCall.h18
-rw-r--r--lib/CodeGen/CGExprAgg.cpp11
-rw-r--r--lib/CodeGen/CGExprConstant.cpp10
-rw-r--r--lib/CodeGen/CGLoopInfo.cpp3
-rw-r--r--lib/CodeGen/CGObjCGNU.cpp7
-rw-r--r--lib/CodeGen/CGRecordLayoutBuilder.cpp10
-rw-r--r--lib/CodeGen/CMakeLists.txt1
-rw-r--r--lib/CodeGen/CodeGenFunction.h12
-rw-r--r--lib/CodeGen/CodeGenModule.cpp39
-rw-r--r--lib/CodeGen/CodeGenModule.h7
-rw-r--r--lib/CodeGen/CodeGenPGO.cpp2
-rw-r--r--lib/CodeGen/TargetInfo.cpp192
-rw-r--r--lib/CodeGen/TargetInfo.h6
-rw-r--r--lib/Driver/Driver.cpp26
-rw-r--r--lib/Driver/MSVCToolChain.cpp27
-rw-r--r--lib/Driver/ToolChain.cpp2
-rw-r--r--lib/Driver/ToolChains.cpp129
-rw-r--r--lib/Driver/ToolChains.h3
-rw-r--r--lib/Driver/Tools.cpp608
-rw-r--r--lib/Driver/Tools.h11
-rw-r--r--lib/Driver/Types.cpp2
-rw-r--r--lib/Format/BreakableToken.cpp4
-rw-r--r--lib/Format/ContinuationIndenter.cpp19
-rw-r--r--lib/Format/ContinuationIndenter.h6
-rw-r--r--lib/Format/Format.cpp2
-rw-r--r--lib/Format/FormatToken.h1
-rw-r--r--lib/Format/TokenAnnotator.cpp93
-rw-r--r--lib/Format/UnwrappedLineParser.cpp51
-rw-r--r--lib/Format/UnwrappedLineParser.h5
-rw-r--r--lib/Format/WhitespaceManager.cpp12
-rw-r--r--lib/Frontend/ASTUnit.cpp2
-rw-r--r--lib/Frontend/CompilerInstance.cpp5
-rw-r--r--lib/Frontend/CompilerInvocation.cpp201
-rw-r--r--lib/Frontend/InitHeaderSearch.cpp2
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp6
-rw-r--r--lib/Frontend/TextDiagnosticBuffer.cpp8
-rw-r--r--lib/Headers/altivec.h12461
-rw-r--r--lib/Headers/ammintrin.h142
-rw-r--r--lib/Headers/module.modulemap2
-rw-r--r--lib/Lex/Lexer.cpp2
-rw-r--r--lib/Lex/ModuleMap.cpp5
-rw-r--r--lib/Lex/PPMacroExpansion.cpp6
-rw-r--r--lib/Lex/PTHLexer.cpp3
-rw-r--r--lib/Parse/ParsePragma.cpp7
-rw-r--r--lib/Sema/AnalysisBasedWarnings.cpp63
-rw-r--r--lib/Sema/JumpDiagnostics.cpp34
-rw-r--r--lib/Sema/SemaCast.cpp9
-rw-r--r--lib/Sema/SemaChecking.cpp4
-rw-r--r--lib/Sema/SemaCodeComplete.cpp4
-rw-r--r--lib/Sema/SemaDeclAttr.cpp3
-rw-r--r--lib/Sema/SemaDeclCXX.cpp122
-rw-r--r--lib/Sema/SemaExpr.cpp23
-rw-r--r--lib/Sema/SemaLookup.cpp20
-rw-r--r--lib/Sema/SemaStmtAsm.cpp16
-rw-r--r--lib/Sema/SemaTemplate.cpp13
-rw-r--r--lib/Sema/SemaType.cpp44
-rw-r--r--lib/Serialization/ASTReader.cpp7
-rw-r--r--lib/Serialization/ASTWriter.cpp5
-rw-r--r--lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp3
-rw-r--r--lib/StaticAnalyzer/Frontend/ModelInjector.cpp2
-rw-r--r--lib/Tooling/CompilationDatabase.cpp3
-rw-r--r--lib/Tooling/Core/Replacement.cpp17
-rw-r--r--lib/Tooling/JSONCompilationDatabase.cpp8
-rw-r--r--test/ASTMerge/codegen-body.c1
-rw-r--r--test/CodeGen/atomic-ops.c8
-rw-r--r--test/CodeGen/avx512f-builtins.c6
-rw-r--r--test/CodeGen/builtins-ppc-p8vector.c166
-rw-r--r--test/CodeGen/builtins-ppc-vsx.c177
-rw-r--r--test/CodeGen/catch-undef-behavior.c28
-rw-r--r--test/CodeGen/fp16-ops.c139
-rw-r--r--test/CodeGen/mips-varargs.c17
-rw-r--r--test/CodeGen/neon-immediate-ubsan.c24
-rw-r--r--test/CodeGenCXX/dllexport.cpp29
-rw-r--r--test/CodeGenCXX/dllimport.cpp35
-rw-r--r--test/CodeGenCXX/pointers-to-data-members.cpp10
-rw-r--r--test/CodeGenCXX/pragma-loop.cpp (renamed from test/CodeGen/pragma-loop.cpp)0
-rw-r--r--test/CodeGenCXX/pragma-unroll.cpp (renamed from test/CodeGen/pragma-unroll.cpp)0
-rw-r--r--test/CodeGenCXX/stack-reuse-miscompile.cpp36
-rw-r--r--test/CodeGenCXX/stack-reuse.cpp146
-rw-r--r--test/CodeGenCXX/x86_64-arguments-avx.cpp37
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/lib/sparc64-linux-gnu/.keep0
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/lib64/.keep0
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/usr/include/c++/4.9/.keep0
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/usr/include/sparc64-linux-gnu/c++/4.9/.keep0
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtbegin.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtend.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crt1.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crti.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crtn.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/lib/sparc-linux-gnu/.keep0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/lib64/.keep0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/c++/4.9/backward/.keep0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/c++/4.9/64/.keep0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtbegin.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtend.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtbegin.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtend.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crt1.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crti.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crtn.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crt1.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crti.o0
-rw-r--r--test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crtn.o0
-rw-r--r--test/Driver/arm-cortex-cpus.c20
-rw-r--r--test/Driver/arm-mfpu.c24
-rw-r--r--test/Driver/cl-outputs.c25
-rw-r--r--test/Driver/crash-report-header.h18
-rw-r--r--test/Driver/fopenmp.c33
-rw-r--r--test/Driver/krait-cpu.c3
-rw-r--r--test/Driver/linux-header-search.cpp57
-rw-r--r--test/Driver/linux-ld.c61
-rw-r--r--test/Driver/msvc-triple.c9
-rw-r--r--test/Driver/pic.c2
-rw-r--r--test/Driver/windows-arm-minimal-arch.c2
-rw-r--r--test/Format/style-on-command-line.cpp5
-rw-r--r--test/Frontend/source-col-map.c5
-rw-r--r--test/Headers/altivec-intrin.c4
-rw-r--r--test/Lexer/keywords_test.cpp11
-rw-r--r--test/Modules/Inputs/template-default-args/a.h4
-rw-r--r--test/Modules/Inputs/template-default-args/b.h0
-rw-r--r--test/Modules/Inputs/template-default-args/module.modulemap1
-rw-r--r--test/Modules/template-default-args.cpp22
-rw-r--r--test/Parser/pragma-loop.cpp2
-rw-r--r--test/Preprocessor/arm-target-features.c5
-rw-r--r--test/Preprocessor/init.c33
-rw-r--r--test/Profile/Inputs/func-entry.proftext10
-rw-r--r--test/Profile/func-entry.c19
-rw-r--r--test/Sema/PR16678.c153
-rw-r--r--test/Sema/asm.c17
-rw-r--r--test/Sema/ast-print-x86.c9
-rw-r--r--test/Sema/ast-print.c8
-rw-r--r--test/Sema/const-eval.c3
-rw-r--r--test/SemaCXX/MicrosoftCompatibility-cxx98.cpp6
-rw-r--r--test/SemaCXX/attr-noreturn.cpp148
-rw-r--r--test/SemaCXX/cxx11-gnu-attrs.cpp13
-rw-r--r--test/SemaCXX/dllexport.cpp24
-rw-r--r--test/SemaCXX/dllimport.cpp24
-rw-r--r--tools/clang-format/clang-format.py2
-rw-r--r--tools/driver/cc1as_main.cpp6
-rw-r--r--tools/libclang/CXType.cpp2
-rw-r--r--unittests/AST/DeclPrinterTest.cpp18
-rw-r--r--unittests/Format/FormatTest.cpp29
-rw-r--r--unittests/Format/FormatTestJS.cpp75
-rw-r--r--unittests/Tooling/RefactoringTest.cpp25
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp7
-rw-r--r--utils/TableGen/ClangCommentCommandInfoEmitter.cpp2
-rw-r--r--utils/TableGen/ClangCommentHTMLTagsEmitter.cpp3
-rw-r--r--utils/TableGen/NeonEmitter.cpp36
-rwxr-xr-xutils/check_cfc/check_cfc.py32
-rwxr-xr-xutils/check_cfc/obj_diff.py26
-rwxr-xr-xutils/check_cfc/test_check_cfc.py10
202 files changed, 8627 insertions, 8626 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a8d3339df77..357286b0e6ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -182,6 +182,9 @@ set(GCC_INSTALL_PREFIX "" CACHE PATH "Directory where gcc is installed." )
set(DEFAULT_SYSROOT "" CACHE PATH
"Default <path> to all compiler invocations for --sysroot=<path>." )
+set(CLANG_DEFAULT_OPENMP_RUNTIME "libgomp" CACHE STRING
+ "Default OpenMP runtime used by -fopenmp.")
+
set(CLANG_VENDOR "" CACHE STRING
"Vendor-specific text for showing with version information.")
@@ -362,6 +365,7 @@ macro(add_clang_library name)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
install(TARGETS ${name}
+ EXPORT ClangTargets
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
RUNTIME DESTINATION bin)
@@ -441,11 +445,6 @@ if(CLANG_ENABLE_STATIC_ANALYZER)
add_definitions(-DCLANG_ENABLE_STATIC_ANALYZER)
endif()
-set(OPENMP_DEFAULT_LIB "" CACHE STRING "OpenMP library used by default for -fopenmp.")
-if(OPENMP_DEFAULT_LIB)
- add_definitions(-DOPENMP_DEFAULT_LIB=${OPENMP_DEFAULT_LIB})
-endif()
-
# Clang version information
set(CLANG_EXECUTABLE_VERSION
"${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
@@ -526,9 +525,10 @@ if (CLANG_BUILT_STANDALONE)
# Install a <prefix>/share/clang/cmake/ClangConfig.cmake file so that
# find_package(Clang) works. Install the target list with it.
+ install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
+
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake
- ${CLANG_BINARY_DIR}/share/clang/cmake/ClangTargets.cmake
DESTINATION share/clang/cmake)
# Also copy ClangConfig.cmake to the build directory so that dependent projects
diff --git a/docs/CrossCompilation.rst b/docs/CrossCompilation.rst
index fd42856ec3ad..d3a775b4fd44 100644
--- a/docs/CrossCompilation.rst
+++ b/docs/CrossCompilation.rst
@@ -110,7 +110,7 @@ will be chosen, so you'll almost always have to change it via flags.
Typical flags include:
* ``-mcpu=<cpu-name>``, like x86-64, swift, cortex-a15
- * ``-fpu=<fpu-name>``, like SSE3, NEON, controlling the FP unit available
+ * ``-mfpu=<fpu-name>``, like SSE3, NEON, controlling the FP unit available
* ``-mfloat-abi=<fabi>``, like soft, hard, controlling which registers
to use for floating-point
diff --git a/docs/DriverInternals.rst b/docs/DriverInternals.rst
index c779555dae37..4cd2e5dfe6b4 100644
--- a/docs/DriverInternals.rst
+++ b/docs/DriverInternals.rst
@@ -138,12 +138,12 @@ The driver functionality is conceptually divided into five stages:
this vector instead of storing its values directly.
The clang driver can dump the results of this stage using the
- ``-ccc-print-options`` flag (which must precede any actual command
+ ``-###`` flag (which must precede any actual command
line arguments). For example:
.. code-block:: console
- $ clang -ccc-print-options -Xarch_i386 -fomit-frame-pointer -Wa,-fast -Ifoo -I foo t.c
+ $ clang -### -Xarch_i386 -fomit-frame-pointer -Wa,-fast -Ifoo -I foo t.c
Option 0 - Name: "-Xarch_", Values: {"i386", "-fomit-frame-pointer"}
Option 1 - Name: "-Wa,", Values: {"-fast"}
Option 2 - Name: "-I", Values: {"foo"}
diff --git a/docs/LibASTMatchersTutorial.rst b/docs/LibASTMatchersTutorial.rst
index 1e88ec203c9f..fe36511a0cf5 100644
--- a/docs/LibASTMatchersTutorial.rst
+++ b/docs/LibASTMatchersTutorial.rst
@@ -169,7 +169,7 @@ You should now be able to run the syntax checker, which is located in
.. code-block:: console
- cat "int main() { return 0; }" > test.cpp
+ echo "int main() { return 0; }" > test.cpp
bin/loop-convert test.cpp --
Note the two dashes after we specify the source file. The additional
diff --git a/docs/UsersManual.rst b/docs/UsersManual.rst
index 2a6fc82a90de..2ddf0822dd6e 100644
--- a/docs/UsersManual.rst
+++ b/docs/UsersManual.rst
@@ -1216,6 +1216,32 @@ behavior. Code that is not exercised in the profile will be optimized as if it
is unimportant, and the compiler may make poor optimization choices for code
that is disproportionately used while profiling.
+Differences Between Sampling and Instrumentation
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Although both techniques are used for similar purposes, there are important
+differences between the two:
+
+1. Profile data generated with one cannot be used by the other, and there is no
+ conversion tool that can convert one to the other. So, a profile generated
+ via ``-fprofile-instr-generate`` must be used with ``-fprofile-instr-use``.
+ Similarly, sampling profiles generated by external profilers must be
+ converted and used with ``-fprofile-sample-use``.
+
+2. Instrumentation profile data can be used for code coverage analysis and
+ optimization.
+
+3. Sampling profiles can only be used for optimization. They cannot be used for
+ code coverage analysis. Although it would be technically possible to use
+ sampling profiles for code coverage, sample-based profiles are too
+ coarse-grained for code coverage purposes; it would yield poor results.
+
+4. Sampling profiles must be generated by an external tool. The profile
+ generated by that tool must then be converted into a format that can be read
+ by LLVM. The section on sampling profilers describes one of the supported
+ sampling profile formats.
+
+
Using Sampling Profilers
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1283,21 +1309,38 @@ usual build cycle when using sample profilers for optimization:
$ clang++ -O2 -gline-tables-only -fprofile-sample-use=code.prof code.cc -o code
-Sample Profile Format
-"""""""""""""""""""""
+Sample Profile Formats
+""""""""""""""""""""""
+
+Since external profilers generate profile data in a variety of custom formats,
+the data generated by the profiler must be converted into a format that can be
+read by the backend. LLVM supports three different sample profile formats:
+
+1. ASCII text. This is the easiest one to generate. The file is divided into
+ sections, which correspond to each of the functions with profile
+ information. The format is described below.
+
+2. Binary encoding. This uses a more efficient encoding that yields smaller
+ profile files, which may be useful when generating large profiles. It can be
+ generated from the text format using the ``llvm-profdata`` tool.
+
+3. GCC encoding. This is based on the gcov format, which is accepted by GCC. It
+ is only interesting in environments where GCC and Clang co-exist. Similarly
+ to the binary encoding, it can be generated using the ``llvm-profdata`` tool.
+
+If you are using Linux Perf to generate sampling profiles, you can use the
+conversion tool ``create_llvm_prof`` described in the previous section.
+Otherwise, you will need to write a conversion tool that converts your
+profiler's native format into one of these three.
-If you are not using Linux Perf to collect profiles, you will need to
-write a conversion tool from your profiler to LLVM's format. This section
-explains the file format expected by the backend.
-NOTE: This format is not intended to be used for code coverage. For that,
-you need to use Clang's instrumentation based profiling
-(``-fprofile-instr-generate``).
+Sample Profile Text Format
+""""""""""""""""""""""""""
-Sample profiles are written as ASCII text. The file is divided into sections,
-which correspond to each of the functions executed at runtime. Each
-section has the following format (taken from
-https://github.com/google/autofdo/blob/master/profile_writer.h):
+This section describes the ASCII text format for sampling profiles. It is,
+arguably, the easiest one to generate. If you are interested in generating any
+of the other two, consult the ``ProfileData`` library in in LLVM's source tree
+(specifically, ``llvm/lib/ProfileData/SampleProfWriter.cpp``).
.. code-block:: console
@@ -1404,8 +1447,8 @@ instrumentation:
$ LLVM_PROFILE_FILE="code-%p.profraw" ./code
3. Combine profiles from multiple runs and convert the "raw" profile format to
- the input expected by clang. Use the ``merge`` command of the llvm-profdata
- tool to do this.
+ the input expected by clang. Use the ``merge`` command of the
+ ``llvm-profdata`` tool to do this.
.. code-block:: console
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index 451f9da1b60a..e06b58b37be2 100644
--- a/include/clang/AST/Decl.h
+++ b/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/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 5c382b0d5780..f176e5479e1e 100644
--- a/include/clang/AST/DeclBase.h
+++ b/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/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h
index f7cb4624cb55..537ad4640c24 100644
--- a/include/clang/AST/DeclCXX.h
+++ b/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/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h
index 7f9764619c2b..94c77f7f73ba 100644
--- a/include/clang/ASTMatchers/ASTMatchers.h
+++ b/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/include/clang/Analysis/CFG.h b/include/clang/Analysis/CFG.h
index e7f638362639..5430c3bc6f21 100644
--- a/include/clang/Analysis/CFG.h
+++ b/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/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td
index afdd9269d097..deb23f3149cb 100644
--- a/include/clang/Basic/DiagnosticCommonKinds.td
+++ b/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/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 61436eabe52a..016c2e198e3a 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/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/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 9ccd5adf21ab..be1911e7d506 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/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/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index 28aafca1162a..b6d983b55245 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/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/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
index 5d89b1aaa1ac..78a508697e83 100644
--- a/include/clang/Config/config.h.cmake
+++ b/include/clang/Config/config.h.cmake
@@ -8,6 +8,9 @@
/* Bug report URL. */
#define BUG_REPORT_URL "${BUG_REPORT_URL}"
+/* Default OpenMP runtime used by -fopenmp. */
+#define CLANG_DEFAULT_OPENMP_RUNTIME "${CLANG_DEFAULT_OPENMP_RUNTIME}"
+
/* Multilib suffix for libdir. */
#define CLANG_LIBDIR_SUFFIX "${CLANG_LIBDIR_SUFFIX}"
diff --git a/include/clang/Config/config.h.in b/include/clang/Config/config.h.in
index dba05db2b99d..4395e73c568a 100644
--- a/include/clang/Config/config.h.in
+++ b/include/clang/Config/config.h.in
@@ -8,6 +8,9 @@
/* Bug report URL. */
#undef BUG_REPORT_URL
+/* Default OpenMP runtime used by -fopenmp. */
+#undef CLANG_DEFAULT_OPENMP_RUNTIME
+
/* Multilib suffix for libdir. */
#undef CLANG_LIBDIR_SUFFIX
diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td
index 959a72e5389e..e217cb755f6e 100644
--- a/include/clang/Driver/CLCompatOptions.td
+++ b/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/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
index dec917b6e929..7e39a9ae5b22 100644
--- a/include/clang/Driver/Options.td
+++ b/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/include/clang/Driver/Types.def b/include/clang/Driver/Types.def
index adc12d34debb..4b696ae5e053 100644
--- a/include/clang/Driver/Types.def
+++ b/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/include/clang/Lex/HeaderSearchOptions.h b/include/clang/Lex/HeaderSearchOptions.h
index 775943de8169..316134c405b3 100644
--- a/include/clang/Lex/HeaderSearchOptions.h
+++ b/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/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h
index 07564b9de784..12565d0b14b6 100644
--- a/include/clang/Lex/Lexer.h
+++ b/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/include/clang/Lex/MacroInfo.h b/include/clang/Lex/MacroInfo.h
index 81d075cb000c..8b82a5bc9310 100644
--- a/include/clang/Lex/MacroInfo.h
+++ b/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/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h
index 83a410dfc9e8..e41efc5d419d 100644
--- a/include/clang/Lex/ModuleMap.h
+++ b/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/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h
index 1ddb5d61eff5..3803533b49b1 100644
--- a/include/clang/Lex/PPCallbacks.h
+++ b/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/include/clang/Lex/PTHManager.h b/include/clang/Lex/PTHManager.h
index a4198f890e13..26178eddf36d 100644
--- a/include/clang/Lex/PTHManager.h
+++ b/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/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index ea15dbdf2144..f6e61c0e7ad6 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/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/include/clang/Lex/PreprocessorOptions.h b/include/clang/Lex/PreprocessorOptions.h
index 135c87fa837b..963d95d7f1d1 100644
--- a/include/clang/Lex/PreprocessorOptions.h
+++ b/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/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h
index 5bfee8b0d037..97192b53fa44 100644
--- a/include/clang/Sema/Lookup.h
+++ b/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/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index 39ea3c62a878..60664c5fdc99 100644
--- a/include/clang/Sema/Sema.h
+++ b/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/include/clang/Tooling/Core/Replacement.h b/include/clang/Tooling/Core/Replacement.h
index 30a7036c2bb5..f189e1250121 100644
--- a/include/clang/Tooling/Core/Replacement.h
+++ b/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/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp
index a43879c23655..8c2e0f4de808 100644
--- a/lib/ARCMigrate/ObjCMT.cpp
+++ b/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/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 79cadcfcb167..70bd16ffdd5d 100644
--- a/lib/AST/DeclBase.cpp
+++ b/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/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 8dc62dd07f2c..b00b8a0ea9cc 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/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/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp
index c0f3e17693dc..d8cd40ec9c60 100644
--- a/lib/AST/DeclPrinter.cpp
+++ b/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/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index d1ec7aea1d2a..be24a2ae2c8c 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/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/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp
index 77522c1f9c5d..db5b48e5672d 100644
--- a/lib/AST/MicrosoftMangle.cpp
+++ b/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/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index 6baa99bbc5bf..09bb17b0e701 100644
--- a/lib/AST/Stmt.cpp
+++ b/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/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index dc4f9964c7a6..db6d8c231ef2 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/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/lib/ASTMatchers/ASTMatchFinder.cpp b/lib/ASTMatchers/ASTMatchFinder.cpp
index c5f3063fb4f3..e3b666ef42af 100644
--- a/lib/ASTMatchers/ASTMatchFinder.cpp
+++ b/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/lib/ASTMatchers/Dynamic/Diagnostics.cpp b/lib/ASTMatchers/Dynamic/Diagnostics.cpp
index f6d34494dec5..72f127185ef5 100644
--- a/lib/ASTMatchers/Dynamic/Diagnostics.cpp
+++ b/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/lib/ASTMatchers/Dynamic/Registry.cpp b/lib/ASTMatchers/Dynamic/Registry.cpp
index 04d3a3256313..59c204d370a6 100644
--- a/lib/ASTMatchers/Dynamic/Registry.cpp
+++ b/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/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp
index 2744c5fbe72d..b2fdd2787985 100644
--- a/lib/Analysis/CFG.cpp
+++ b/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/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 631b97899bd5..19928042fdac 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/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/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp
index e830be9603e6..4e06352d31d8 100644
--- a/lib/Basic/IdentifierTable.cpp
+++ b/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/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp
index 6b885a7bc806..d254e8620a96 100644
--- a/lib/Basic/SourceLocation.cpp
+++ b/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/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index a768081e70e0..c0c692484588 100644
--- a/lib/Basic/Targets.cpp
+++ b/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/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 7f0c7bafc046..8cece0d126f5 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/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/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 272baac80897..d86534d5f8d4 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/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/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 29a199d6973a..7d7ed784b181 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/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/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index f2340530d66d..e77539c63236 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/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/lib/CodeGen/CGCall.h b/lib/CodeGen/CGCall.h
index b228733fb8ce..7a4708e5ccfa 100644
--- a/lib/CodeGen/CGCall.h
+++ b/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/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 6fedf0efda9d..8b1bc69352b3 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/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/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 73ca0cc1c3d5..b90b3ab61d8e 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/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/lib/CodeGen/CGLoopInfo.cpp b/lib/CodeGen/CGLoopInfo.cpp
index 011ae7e836ae..0675544bedf0 100644
--- a/lib/CodeGen/CGLoopInfo.cpp
+++ b/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/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index 1580c777ea47..b52d623b948b 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/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/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp
index 72ecd65c28a9..c89d5cc3892a 100644
--- a/lib/CodeGen/CGRecordLayoutBuilder.cpp
+++ b/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/lib/CodeGen/CMakeLists.txt b/lib/CodeGen/CMakeLists.txt
index 18f505d8c592..5a060b30808b 100644
--- a/lib/CodeGen/CMakeLists.txt
+++ b/lib/CodeGen/CMakeLists.txt
@@ -13,6 +13,7 @@ set(LLVM_LINK_COMPONENTS
ProfileData
ScalarOpts
Support
+ Target
TransformUtils
)
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 650ad7b04009..469022dc62ed 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/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/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 400506129e64..9496831ea8c8 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index feef6c2583ec..edde426e9230 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/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/lib/CodeGen/CodeGenPGO.cpp b/lib/CodeGen/CodeGenPGO.cpp
index c97244328d37..f182a469b3a4 100644
--- a/lib/CodeGen/CodeGenPGO.cpp
+++ b/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/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 53154b513eb7..e77c1242e70b 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/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/lib/CodeGen/TargetInfo.h b/lib/CodeGen/TargetInfo.h
index cc469d69e390..bf63265f0283 100644
--- a/lib/CodeGen/TargetInfo.h
+++ b/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/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 65d0049b0b49..8cca1de0fb2b 100644
--- a/lib/Driver/Driver.cpp
+++ b/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/lib/Driver/MSVCToolChain.cpp b/lib/Driver/MSVCToolChain.cpp
index 7739cb0cf5c7..d824fe4c1083 100644
--- a/lib/Driver/MSVCToolChain.cpp
+++ b/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/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index f7b7402215a6..82eb85411510 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/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/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 6d52ab9d71a5..115a16f7663d 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/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/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 8906e2101ea0..0b7073f2ba0b 100644
--- a/lib/Driver/ToolChains.h
+++ b/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/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 527038f9650b..711dee273197 100644
--- a/lib/Driver/Tools.cpp
+++ b/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");
}
@@ -7243,7 +7176,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;
}
@@ -7590,7 +7523,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);
@@ -7754,35 +7687,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);
@@ -7800,21 +7731,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
@@ -7895,15 +7826,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;
@@ -7927,9 +7858,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)
@@ -7943,10 +7874,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");
@@ -7954,10 +7883,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");
@@ -8043,30 +7970,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)
@@ -8126,17 +8059,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;
@@ -8165,16 +8098,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/lib/Driver/Tools.h b/lib/Driver/Tools.h
index 25fe063f7f12..133a389e5109 100644
--- a/lib/Driver/Tools.h
+++ b/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/lib/Driver/Types.cpp b/lib/Driver/Types.cpp
index 7b281457557b..0b0878fdd802 100644
--- a/lib/Driver/Types.cpp
+++ b/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/lib/Format/BreakableToken.cpp b/lib/Format/BreakableToken.cpp
index 66e935abdf55..e3e162d070f8 100644
--- a/lib/Format/BreakableToken.cpp
+++ b/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/lib/Format/ContinuationIndenter.cpp b/lib/Format/ContinuationIndenter.cpp
index 4e8f5af263d2..91bc64b2b8b4 100644
--- a/lib/Format/ContinuationIndenter.cpp
+++ b/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/lib/Format/ContinuationIndenter.h b/lib/Format/ContinuationIndenter.h
index 36691d945b4f..1da6bd95f100 100644
--- a/lib/Format/ContinuationIndenter.h
+++ b/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/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 10c68f9da617..c725b4bf30ab 100644
--- a/lib/Format/Format.cpp
+++ b/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/lib/Format/FormatToken.h b/lib/Format/FormatToken.h
index ec0fdf4aa813..dd12969454e4 100644
--- a/lib/Format/FormatToken.h
+++ b/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/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp
index 98f5709b9062..78e6103bfcd5 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/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/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 939528fbffe5..6ad43294ca97 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/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/lib/Format/UnwrappedLineParser.h b/lib/Format/UnwrappedLineParser.h
index 6a6e56fea028..c2fa02957685 100644
--- a/lib/Format/UnwrappedLineParser.h
+++ b/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/lib/Format/WhitespaceManager.cpp b/lib/Format/WhitespaceManager.cpp
index 4baaab1c9877..65395277f89a 100644
--- a/lib/Format/WhitespaceManager.cpp
+++ b/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/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 7226344b754b..4fd330d44b77 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/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/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 9e017273cb2a..aef3905b328c 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/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/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 8d3d31228a70..4f7d15fa507f 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/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/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 2bd999e8e530..bf8470ef1e78 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/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/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index 037a6a525e2f..6192554299ab 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/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/lib/Frontend/TextDiagnosticBuffer.cpp b/lib/Frontend/TextDiagnosticBuffer.cpp
index 9c6bebb07210..d49e983fcd37 100644
--- a/lib/Frontend/TextDiagnosticBuffer.cpp
+++ b/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/lib/Headers/altivec.h b/lib/Headers/altivec.h
index 1f8c831bb739..7427ed53fcba 100644
--- a/lib/Headers/altivec.h
+++ b/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/lib/Headers/ammintrin.h b/lib/Headers/ammintrin.h
index d87b9cde4405..17f5ab15718a 100644
--- a/lib/Headers/ammintrin.h
+++ b/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/lib/Headers/module.modulemap b/lib/Headers/module.modulemap
index ac5876f8d726..8fcb5bc1b3d2 100644
--- a/lib/Headers/module.modulemap
+++ b/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/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 3f89ea649cbb..4007914b6c08 100644
--- a/lib/Lex/Lexer.cpp
+++ b/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/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp
index 412918362d32..addad59c5a3e 100644
--- a/lib/Lex/ModuleMap.cpp
+++ b/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/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp
index 9046ad51c14a..03784e204503 100644
--- a/lib/Lex/PPMacroExpansion.cpp
+++ b/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/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index af7a15384e35..5f63d35c5be7 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/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/lib/Parse/ParsePragma.cpp b/lib/Parse/ParsePragma.cpp
index a8641efb705c..84256dfd8e31 100644
--- a/lib/Parse/ParsePragma.cpp
+++ b/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/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp
index d697ecb21454..97f4a8def8c1 100644
--- a/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/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/lib/Sema/JumpDiagnostics.cpp b/lib/Sema/JumpDiagnostics.cpp
index aac28bedfa5d..6b9eb2a4edde 100644
--- a/lib/Sema/JumpDiagnostics.cpp
+++ b/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/lib/Sema/SemaCast.cpp b/lib/Sema/SemaCast.cpp
index 091e77936c1e..d9dc4df9f271 100644
--- a/lib/Sema/SemaCast.cpp
+++ b/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/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 23a6fc3c4cd4..c3b81b6683d2 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/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/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 18d352ba829b..fd97809295a5 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/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/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 31fe05592f00..1d0415990e1b 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/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/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index b1dfe0e95e2d..c80ef2d2bdc1 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/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/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 7ab269c3b6d5..b0bc231e7e6c 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/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/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index c745b136bede..d0a55b57c61f 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/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/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp
index 9f48616ea5bf..d19d8819d8e2 100644
--- a/lib/Sema/SemaStmtAsm.cpp
+++ b/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/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 37eeee2f8867..19c0f2a9390d 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/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/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 57a4689c6d72..628eb734cdd6 100644
--- a/lib/Sema/SemaType.cpp
+++ b/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/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp
index 5e3a82795049..609c25da3ebd 100644
--- a/lib/Serialization/ASTReader.cpp
+++ b/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/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp
index bf74c8471c3d..e689234c20e9 100644
--- a/lib/Serialization/ASTWriter.cpp
+++ b/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/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp b/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
index 08ba26a53037..275481f9e46c 100644
--- a/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
+++ b/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/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp b/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
index 8e51154fc3a1..d1938a0f7f7e 100644
--- a/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
+++ b/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/lib/StaticAnalyzer/Frontend/ModelInjector.cpp b/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
index 63bb1e245885..699549f81767 100644
--- a/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
+++ b/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/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp
index 2514f027f472..4483b189ca9f 100644
--- a/lib/Tooling/CompilationDatabase.cpp
+++ b/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/lib/Tooling/Core/Replacement.cpp b/lib/Tooling/Core/Replacement.cpp
index b9fc92bb6c71..32e8e5bd6b97 100644
--- a/lib/Tooling/Core/Replacement.cpp
+++ b/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/lib/Tooling/JSONCompilationDatabase.cpp b/lib/Tooling/JSONCompilationDatabase.cpp
index 7dc211e934b2..454a2ffd9587 100644
--- a/lib/Tooling/JSONCompilationDatabase.cpp
+++ b/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/test/ASTMerge/codegen-body.c b/test/ASTMerge/codegen-body.c
index a5c260cd91bb..7232bf4164b5 100644
--- a/test/ASTMerge/codegen-body.c
+++ b/test/ASTMerge/codegen-body.c
@@ -1,4 +1,3 @@
-// XFAIL: hexagon
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/body1.c
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/body2.c
// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s
diff --git a/test/CodeGen/atomic-ops.c b/test/CodeGen/atomic-ops.c
index 733c60eb859c..13ab5f117f93 100644
--- a/test/CodeGen/atomic-ops.c
+++ b/test/CodeGen/atomic-ops.c
@@ -105,6 +105,14 @@ int fi3e(atomic_int *i) {
return atomic_fetch_or(i, 1);
}
+int fi3f(int *i) {
+ // CHECK-LABEL: @fi3f
+ // CHECK-NOT: store volatile
+ // CHECK: atomicrmw or
+ // CHECK-NOT: {{ or }}
+ return __atomic_fetch_or(i, (short)1, memory_order_seq_cst);
+}
+
_Bool fi4(_Atomic(int) *i) {
// CHECK-LABEL: @fi4(
// CHECK: [[PAIR:%[.0-9A-Z_a-z]+]] = cmpxchg i32* [[PTR:%[.0-9A-Z_a-z]+]], i32 [[EXPECTED:%[.0-9A-Z_a-z]+]], i32 [[DESIRED:%[.0-9A-Z_a-z]+]]
diff --git a/test/CodeGen/avx512f-builtins.c b/test/CodeGen/avx512f-builtins.c
index 2f19f99e4f25..a49a1982bf47 100644
--- a/test/CodeGen/avx512f-builtins.c
+++ b/test/CodeGen/avx512f-builtins.c
@@ -8,14 +8,14 @@
__m512d test_mm512_sqrt_pd(__m512d a)
{
// CHECK-LABEL: @test_mm512_sqrt_pd
- // CHECK: @llvm.x86.avx512.sqrt.pd.512
+ // CHECK: @llvm.x86.avx512.mask.sqrt.pd.512
return _mm512_sqrt_pd(a);
}
__m512 test_mm512_sqrt_ps(__m512 a)
{
// CHECK-LABEL: @test_mm512_sqrt_ps
- // CHECK: @llvm.x86.avx512.sqrt.ps.512
+ // CHECK: @llvm.x86.avx512.mask.sqrt.ps.512
return _mm512_sqrt_ps(a);
}
@@ -898,4 +898,4 @@ __m512i test_mm512_mullo_epi32(__m512i __A, __m512i __B) {
//CHECK-LABEL: @test_mm512_mullo_epi32
//CHECK: mul <16 x i32>
return _mm512_mullo_epi32(__A,__B);
-} \ No newline at end of file
+}
diff --git a/test/CodeGen/builtins-ppc-p8vector.c b/test/CodeGen/builtins-ppc-p8vector.c
index c91686c0ea7c..f74bbad9daf0 100644
--- a/test/CodeGen/builtins-ppc-p8vector.c
+++ b/test/CodeGen/builtins-ppc-p8vector.c
@@ -7,22 +7,22 @@ vector int vi = { -1, 2, -3, 4 };
vector unsigned int vui = { 1, 2, 3, 4 };
vector bool int vbi = {0, -1, -1, 0};
vector bool long long vbll = { 1, 0 };
-vector long long vll = { 1, 2 };
+vector signed long long vsll = { 1, 2 };
vector unsigned long long vull = { 1, 2 };
int res_i;
vector int res_vi;
vector unsigned int res_vui;
vector bool int res_vbi;
-vector long long res_vll;
-vector unsigned long long res_vull;
vector bool long long res_vbll;
+vector signed long long res_vsll;
+vector unsigned long long res_vull;
// CHECK-LABEL: define void @test1
void test1() {
/* vec_cmpeq */
- res_vbll = vec_cmpeq(vll, vll);
+ res_vbll = vec_cmpeq(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd
// CHECK-LE: @llvm.ppc.altivec.vcmpequd
// CHECK-PPC: error: call to 'vec_cmpeq' is ambiguous
@@ -33,7 +33,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_cmpeq' is ambiguous
/* vec_cmpgt */
- res_vbll = vec_cmpgt(vll, vll);
+ res_vbll = vec_cmpgt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd
// CHECK-PPC: error: call to 'vec_cmpgt' is ambiguous
@@ -45,12 +45,12 @@ void test1() {
/* ----------------------- predicates --------------------------- */
/* vec_all_eq */
- res_i = vec_all_eq(vll, vll);
+ res_i = vec_all_eq(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
- res_i = vec_all_eq(vll, vbll);
+ res_i = vec_all_eq(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
@@ -65,7 +65,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
- res_i = vec_all_eq(vbll, vll);
+ res_i = vec_all_eq(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
@@ -81,12 +81,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
/* vec_all_ne */
- res_i = vec_all_ne(vll, vll);
+ res_i = vec_all_ne(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
- res_i = vec_all_ne(vll, vbll);
+ res_i = vec_all_ne(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
@@ -101,7 +101,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
- res_i = vec_all_ne(vbll, vll);
+ res_i = vec_all_ne(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
@@ -117,12 +117,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
/* vec_any_eq */
- res_i = vec_any_eq(vll, vll);
+ res_i = vec_any_eq(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
- res_i = vec_any_eq(vll, vbll);
+ res_i = vec_any_eq(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
@@ -137,7 +137,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
- res_i = vec_any_eq(vbll, vll);
+ res_i = vec_any_eq(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
@@ -153,12 +153,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
/* vec_any_ne */
- res_i = vec_any_ne(vll, vll);
+ res_i = vec_any_ne(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
- res_i = vec_any_ne(vll, vbll);
+ res_i = vec_any_ne(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
@@ -173,7 +173,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
- res_i = vec_any_ne(vbll, vll);
+ res_i = vec_any_ne(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
@@ -189,12 +189,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
/* vec_all_ge */
- res_i = vec_all_ge(vll, vll);
+ res_i = vec_all_ge(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
- res_i = vec_all_ge(vll, vbll);
+ res_i = vec_all_ge(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
@@ -209,7 +209,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
- res_i = vec_all_ge(vbll, vll);
+ res_i = vec_all_ge(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
@@ -225,12 +225,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
/* vec_all_gt */
- res_i = vec_all_gt(vll, vll);
+ res_i = vec_all_gt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
- res_i = vec_all_gt(vll, vbll);
+ res_i = vec_all_gt(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
@@ -245,7 +245,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
- res_i = vec_all_gt(vbll, vll);
+ res_i = vec_all_gt(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
@@ -261,12 +261,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
/* vec_all_le */
- res_i = vec_all_le(vll, vll);
+ res_i = vec_all_le(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
- res_i = vec_all_le(vll, vbll);
+ res_i = vec_all_le(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
@@ -281,7 +281,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
- res_i = vec_all_le(vbll, vll);
+ res_i = vec_all_le(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
@@ -297,12 +297,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
/* vec_all_lt */
- res_i = vec_all_lt(vll, vll);
+ res_i = vec_all_lt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
- res_i = vec_all_lt(vll, vbll);
+ res_i = vec_all_lt(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
@@ -317,7 +317,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
- res_i = vec_all_lt(vbll, vll);
+ res_i = vec_all_lt(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
@@ -333,12 +333,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
/* vec_any_ge */
- res_i = vec_any_ge(vll, vll);
+ res_i = vec_any_ge(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
- res_i = vec_any_ge(vll, vbll);
+ res_i = vec_any_ge(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
@@ -353,7 +353,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
- res_i = vec_any_ge(vbll, vll);
+ res_i = vec_any_ge(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
@@ -369,12 +369,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
/* vec_any_gt */
- res_i = vec_any_gt(vll, vll);
+ res_i = vec_any_gt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
- res_i = vec_any_gt(vll, vbll);
+ res_i = vec_any_gt(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
@@ -389,7 +389,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
- res_i = vec_any_gt(vbll, vll);
+ res_i = vec_any_gt(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
@@ -405,12 +405,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
/* vec_any_le */
- res_i = vec_any_le(vll, vll);
+ res_i = vec_any_le(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
- res_i = vec_any_le(vll, vbll);
+ res_i = vec_any_le(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
@@ -425,7 +425,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
- res_i = vec_any_le(vbll, vll);
+ res_i = vec_any_le(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
@@ -441,12 +441,12 @@ void test1() {
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
/* vec_any_lt */
- res_i = vec_any_lt(vll, vll);
+ res_i = vec_any_lt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
- res_i = vec_any_lt(vll, vbll);
+ res_i = vec_any_lt(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
@@ -461,7 +461,7 @@ void test1() {
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
- res_i = vec_any_lt(vbll, vll);
+ res_i = vec_any_lt(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
@@ -477,17 +477,17 @@ void test1() {
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
/* vec_max */
- res_vll = vec_max(vll, vll);
+ res_vsll = vec_max(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vmaxsd
// CHECK-LE: @llvm.ppc.altivec.vmaxsd
// CHECK-PPC: error: call to 'vec_max' is ambiguous
- res_vll = vec_max(vbll, vll);
+ res_vsll = vec_max(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vmaxsd
// CHECK-LE: @llvm.ppc.altivec.vmaxsd
// CHECK-PPC: error: call to 'vec_max' is ambiguous
- res_vll = vec_max(vll, vbll);
+ res_vsll = vec_max(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vmaxsd
// CHECK-LE: @llvm.ppc.altivec.vmaxsd
// CHECK-PPC: error: call to 'vec_max' is ambiguous
@@ -508,17 +508,17 @@ void test1() {
// CHECK-PPC: error: call to 'vec_max' is ambiguous
/* vec_min */
- res_vll = vec_min(vll, vll);
+ res_vsll = vec_min(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vminsd
// CHECK-LE: @llvm.ppc.altivec.vminsd
// CHECK-PPC: error: call to 'vec_min' is ambiguous
- res_vll = vec_min(vbll, vll);
+ res_vsll = vec_min(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vminsd
// CHECK-LE: @llvm.ppc.altivec.vminsd
// CHECK-PPC: error: call to 'vec_min' is ambiguous
- res_vll = vec_min(vll, vbll);
+ res_vsll = vec_min(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vminsd
// CHECK-LE: @llvm.ppc.altivec.vminsd
// CHECK-PPC: error: call to 'vec_min' is ambiguous
@@ -539,7 +539,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_min' is ambiguous
/* vec_mule */
- res_vll = vec_mule(vi, vi);
+ res_vsll = vec_mule(vi, vi);
// CHECK: @llvm.ppc.altivec.vmulesw
// CHECK-LE: @llvm.ppc.altivec.vmulosw
// CHECK-PPC: error: call to 'vec_mule' is ambiguous
@@ -550,7 +550,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_mule' is ambiguous
/* vec_mulo */
- res_vll = vec_mulo(vi, vi);
+ res_vsll = vec_mulo(vi, vi);
// CHECK: @llvm.ppc.altivec.vmulosw
// CHECK-LE: @llvm.ppc.altivec.vmulesw
// CHECK-PPC: error: call to 'vec_mulo' is ambiguous
@@ -561,7 +561,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_mulo' is ambiguous
/* vec_packs */
- res_vi = vec_packs(vll, vll);
+ res_vi = vec_packs(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vpksdss
// CHECK-LE: @llvm.ppc.altivec.vpksdss
// CHECK-PPC: error: call to 'vec_packs' is ambiguous
@@ -572,7 +572,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_packs' is ambiguous
/* vec_packsu */
- res_vui = vec_packsu(vll, vll);
+ res_vui = vec_packsu(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vpksdus
// CHECK-LE: @llvm.ppc.altivec.vpksdus
// CHECK-PPC: error: call to 'vec_packsu' is ambiguous
@@ -583,7 +583,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_packsu' is ambiguous
/* vec_rl */
- res_vll = vec_rl(vll, vull);
+ res_vsll = vec_rl(vsll, vull);
// CHECK: @llvm.ppc.altivec.vrld
// CHECK-LE: @llvm.ppc.altivec.vrld
// CHECK-PPC: error: call to 'vec_rl' is ambiguous
@@ -594,7 +594,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_rl' is ambiguous
/* vec_sl */
- res_vll = vec_sl(vll, vull);
+ res_vsll = vec_sl(vsll, vull);
// CHECK: shl <2 x i64>
// CHECK-LE: shl <2 x i64>
// CHECK-PPC: error: call to 'vec_sl' is ambiguous
@@ -605,7 +605,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_sl' is ambiguous
/* vec_sr */
- res_vll = vec_sr(vll, vull);
+ res_vsll = vec_sr(vsll, vull);
// CHECK: ashr <2 x i64>
// CHECK-LE: ashr <2 x i64>
// CHECK-PPC: error: call to 'vec_sr' is ambiguous
@@ -616,7 +616,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_sr' is ambiguous
/* vec_sra */
- res_vll = vec_sra(vll, vull);
+ res_vsll = vec_sra(vsll, vull);
// CHECK: ashr <2 x i64>
// CHECK-LE: ashr <2 x i64>
// CHECK-PPC: error: call to 'vec_sra' is ambiguous
@@ -627,7 +627,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_sra' is ambiguous
/* vec_unpackh */
- res_vll = vec_unpackh(vi);
+ res_vsll = vec_unpackh(vi);
// CHECK: llvm.ppc.altivec.vupkhsw
// CHECK-LE: llvm.ppc.altivec.vupklsw
// CHECK-PPC: error: call to 'vec_unpackh' is ambiguous
@@ -638,7 +638,7 @@ void test1() {
// CHECK-PPC: error: call to 'vec_unpackh' is ambiguous
/* vec_unpackl */
- res_vll = vec_unpackl(vi);
+ res_vsll = vec_unpackl(vi);
// CHECK: llvm.ppc.altivec.vupklsw
// CHECK-LE: llvm.ppc.altivec.vupkhsw
// CHECK-PPC: error: call to 'vec_unpackl' is ambiguous
@@ -649,19 +649,19 @@ void test1() {
// CHECK-PPC: error: call to 'vec_unpackl' is ambiguous
/* vec_vpksdss */
- res_vi = vec_vpksdss(vll, vll);
+ res_vi = vec_vpksdss(vsll, vsll);
// CHECK: llvm.ppc.altivec.vpksdss
// CHECK-LE: llvm.ppc.altivec.vpksdss
// CHECK-PPC: warning: implicit declaration of function 'vec_vpksdss'
/* vec_vpksdus */
- res_vui = vec_vpksdus(vll, vll);
+ res_vui = vec_vpksdus(vsll, vsll);
// CHECK: llvm.ppc.altivec.vpksdus
// CHECK-LE: llvm.ppc.altivec.vpksdus
// CHECK-PPC: warning: implicit declaration of function 'vec_vpksdus'
/* vec_vpkudum */
- res_vi = vec_vpkudum(vll, vll);
+ res_vi = vec_vpkudum(vsll, vsll);
// CHECK: vperm
// CHECK-LE: vperm
// CHECK-PPC: warning: implicit declaration of function 'vec_vpkudum'
@@ -676,7 +676,7 @@ void test1() {
// CHECK-PPC: warning: implicit declaration of function 'vec_vpkudus'
/* vec_vupkhsw */
- res_vll = vec_vupkhsw(vi);
+ res_vsll = vec_vupkhsw(vi);
// CHECK: llvm.ppc.altivec.vupkhsw
// CHECK-LE: llvm.ppc.altivec.vupklsw
// CHECK-PPC: warning: implicit declaration of function 'vec_vupkhsw'
@@ -686,7 +686,7 @@ void test1() {
// CHECK-LE: llvm.ppc.altivec.vupklsw
/* vec_vupklsw */
- res_vll = vec_vupklsw(vi);
+ res_vsll = vec_vupklsw(vi);
// CHECK: llvm.ppc.altivec.vupklsw
// CHECK-LE: llvm.ppc.altivec.vupkhsw
// CHECK-PPC: warning: implicit declaration of function 'vec_vupklsw'
@@ -695,4 +695,46 @@ void test1() {
// CHECK: llvm.ppc.altivec.vupklsw
// CHECK-LE: llvm.ppc.altivec.vupkhsw
+ /* vec_max */
+ res_vsll = vec_max(vsll, vsll);
+// CHECK: @llvm.ppc.altivec.vmaxsd
+// CHECK-LE: @llvm.ppc.altivec.vmaxsd
+
+ res_vsll = vec_max(vbll, vsll);
+// CHECK: @llvm.ppc.altivec.vmaxsd
+// CHECK-LE: @llvm.ppc.altivec.vmaxsd
+
+ res_vsll = vec_max(vsll, vbll);
+// CHECK: @llvm.ppc.altivec.vmaxsd
+// CHECK-LE: @llvm.ppc.altivec.vmaxsd
+
+ res_vull = vec_max(vull, vull);
+// CHECK: @llvm.ppc.altivec.vmaxud
+// CHECK-LE: @llvm.ppc.altivec.vmaxud
+
+ res_vull = vec_max(vbll, vull);
+// CHECK: @llvm.ppc.altivec.vmaxud
+// CHECK-LE: @llvm.ppc.altivec.vmaxud
+
+ /* vec_min */
+ res_vsll = vec_min(vsll, vsll);
+// CHECK: @llvm.ppc.altivec.vminsd
+// CHECK-LE: @llvm.ppc.altivec.vminsd
+
+ res_vsll = vec_min(vbll, vsll);
+// CHECK: @llvm.ppc.altivec.vminsd
+// CHECK-LE: @llvm.ppc.altivec.vminsd
+
+ res_vsll = vec_min(vsll, vbll);
+// CHECK: @llvm.ppc.altivec.vminsd
+// CHECK-LE: @llvm.ppc.altivec.vminsd
+
+ res_vull = vec_min(vull, vull);
+// CHECK: @llvm.ppc.altivec.vminud
+// CHECK-LE: @llvm.ppc.altivec.vminud
+
+ res_vull = vec_min(vbll, vull);
+// CHECK: @llvm.ppc.altivec.vminud
+// CHECK-LE: @llvm.ppc.altivec.vminud
+
}
diff --git a/test/CodeGen/builtins-ppc-vsx.c b/test/CodeGen/builtins-ppc-vsx.c
index 58a8cc32dce3..631cb6ccafbe 100644
--- a/test/CodeGen/builtins-ppc-vsx.c
+++ b/test/CodeGen/builtins-ppc-vsx.c
@@ -7,6 +7,7 @@ vector float vf = { -1.5, 2.5, -3.5, 4.5 };
vector double vd = { 3.5, -7.5 };
vector signed int vsi = { -1, 2, -3, 4 };
vector unsigned int vui = { 0, 1, 2, 3 };
+vector bool long long vbll = { 1, 0 };
vector signed long long vsll = { 255LL, -937LL };
vector unsigned long long vull = { 1447LL, 2894LL };
double d = 23.4;
@@ -15,6 +16,7 @@ vector float res_vf;
vector double res_vd;
vector signed int res_vsi;
vector unsigned int res_vui;
+vector bool long long res_vbll;
vector signed long long res_vsll;
vector unsigned long long res_vull;
double res_d;
@@ -113,4 +115,179 @@ void test1() {
vec_vsx_st(vd, 0, &res_vd);
// CHECK: @llvm.ppc.vsx.stxvd2x
+
+ /* vec_and */
+ res_vsll = vec_and(vsll, vsll);
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_and(vbll, vsll);
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_and(vsll, vbll);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_and(vull, vull);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_and(vbll, vull);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_and(vull, vbll);
+// CHECK: and <2 x i64>
+
+ res_vbll = vec_and(vbll, vbll);
+// CHECK: and <2 x i64>
+
+ /* vec_vand */
+ res_vsll = vec_vand(vsll, vsll);
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_vand(vbll, vsll);
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_vand(vsll, vbll);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_vand(vull, vull);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_vand(vbll, vull);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_vand(vull, vbll);
+// CHECK: and <2 x i64>
+
+ res_vbll = vec_vand(vbll, vbll);
+// CHECK: and <2 x i64>
+
+ /* vec_andc */
+ res_vsll = vec_andc(vsll, vsll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_andc(vbll, vsll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_andc(vsll, vbll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vull = vec_andc(vull, vull);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vull = vec_andc(vbll, vull);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vull = vec_andc(vull, vbll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vbll = vec_andc(vbll, vbll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ /* vec_nor */
+ res_vsll = vec_nor(vsll, vsll);
+// CHECK: or <2 x i64>
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_nor(vull, vull);
+// CHECK: or <2 x i64>
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_nor(vbll, vbll);
+// CHECK: or <2 x i64>
+// CHECK: xor <2 x i64>
+
+ /* vec_or */
+ res_vsll = vec_or(vsll, vsll);
+// CHECK: or <2 x i64>
+
+ res_vsll = vec_or(vbll, vsll);
+// CHECK: or <2 x i64>
+
+ res_vsll = vec_or(vsll, vbll);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_or(vull, vull);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_or(vbll, vull);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_or(vull, vbll);
+// CHECK: or <2 x i64>
+
+ res_vbll = vec_or(vbll, vbll);
+// CHECK: or <2 x i64>
+
+ /* vec_vor */
+ res_vsll = vec_vor(vsll, vsll);
+// CHECK: or <2 x i64>
+
+ res_vsll = vec_vor(vbll, vsll);
+// CHECK: or <2 x i64>
+
+ res_vsll = vec_vor(vsll, vbll);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_vor(vull, vull);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_vor(vbll, vull);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_vor(vull, vbll);
+// CHECK: or <2 x i64>
+
+ res_vbll = vec_vor(vbll, vbll);
+// CHECK: or <2 x i64>
+
+ /* vec_xor */
+ res_vsll = vec_xor(vsll, vsll);
+// CHECK: xor <2 x i64>
+
+ res_vsll = vec_xor(vbll, vsll);
+// CHECK: xor <2 x i64>
+
+ res_vsll = vec_xor(vsll, vbll);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_xor(vull, vull);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_xor(vbll, vull);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_xor(vull, vbll);
+// CHECK: xor <2 x i64>
+
+ res_vbll = vec_xor(vbll, vbll);
+// CHECK: xor <2 x i64>
+
+ /* vec_vxor */
+ res_vsll = vec_vxor(vsll, vsll);
+// CHECK: xor <2 x i64>
+
+ res_vsll = vec_vxor(vbll, vsll);
+// CHECK: xor <2 x i64>
+
+ res_vsll = vec_vxor(vsll, vbll);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_vxor(vull, vull);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_vxor(vbll, vull);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_vxor(vull, vbll);
+// CHECK: xor <2 x i64>
+
+ res_vbll = vec_vxor(vbll, vbll);
+// CHECK: xor <2 x i64>
+
}
diff --git a/test/CodeGen/catch-undef-behavior.c b/test/CodeGen/catch-undef-behavior.c
index a4386588757d..66954190aff7 100644
--- a/test/CodeGen/catch-undef-behavior.c
+++ b/test/CodeGen/catch-undef-behavior.c
@@ -371,6 +371,34 @@ void call_decl_nonnull(int *a) {
decl_nonnull(a);
}
+extern void *memcpy (void *, const void *, unsigned) __attribute__((nonnull(1, 2)));
+
+// CHECK-COMMON-LABEL: @call_memcpy_nonnull
+void call_memcpy_nonnull(void *p, void *q, int sz) {
+ // CHECK-COMMON: icmp ne i8* {{.*}}, null
+ // CHECK-UBSAN: call void @__ubsan_handle_nonnull_arg
+ // CHECK-TRAP: call void @llvm.trap()
+
+ // CHECK-COMMON: icmp ne i8* {{.*}}, null
+ // CHECK-UBSAN: call void @__ubsan_handle_nonnull_arg
+ // CHECK-TRAP: call void @llvm.trap()
+ memcpy(p, q, sz);
+}
+
+extern void *memmove (void *, const void *, unsigned) __attribute__((nonnull(1, 2)));
+
+// CHECK-COMMON-LABEL: @call_memmove_nonnull
+void call_memmove_nonnull(void *p, void *q, int sz) {
+ // CHECK-COMMON: icmp ne i8* {{.*}}, null
+ // CHECK-UBSAN: call void @__ubsan_handle_nonnull_arg
+ // CHECK-TRAP: call void @llvm.trap()
+
+ // CHECK-COMMON: icmp ne i8* {{.*}}, null
+ // CHECK-UBSAN: call void @__ubsan_handle_nonnull_arg
+ // CHECK-TRAP: call void @llvm.trap()
+ memmove(p, q, sz);
+}
+
// CHECK-COMMON-LABEL: @call_nonnull_variadic
__attribute__((nonnull)) void nonnull_variadic(int a, ...);
void call_nonnull_variadic(int a, int *b) {
diff --git a/test/CodeGen/fp16-ops.c b/test/CodeGen/fp16-ops.c
index fe0fa2c2667e..7cd08a03d642 100644
--- a/test/CodeGen/fp16-ops.c
+++ b/test/CodeGen/fp16-ops.c
@@ -10,6 +10,7 @@
typedef unsigned cond_t;
volatile cond_t test;
+volatile int i0;
volatile __fp16 h0 = 0.0, h1 = 1.0, h2;
volatile float f0, f1, f2;
volatile double d0;
@@ -91,6 +92,11 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fmul float
h1 = f0 * h2;
+ // CHECK: [[F16TOF32]]
+ // CHECK: fmul float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: fmul half
+ h1 = h0 * i0;
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -116,6 +122,11 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fdiv float
h1 = (f0 / h2);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fdiv float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: fdiv half
+ h1 = (h0 / i0);
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -141,6 +152,11 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fadd float
h1 = (f2 + h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fadd float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: fadd half
+ h1 = (h0 + i0);
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -166,6 +182,11 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fsub float
h1 = (f2 - h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fsub float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: fsub half
+ h1 = (h0 - i0);
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -187,6 +208,14 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fcmp olt float
test = (f2 < h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp olt float
+ // NATIVE-HALF: fcmp olt half
+ test = (i0 < h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp olt float
+ // NATIVE-HALF: fcmp olt half
+ test = (h0 < i0);
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -208,6 +237,14 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fcmp ogt float
test = (f0 > h2);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp ogt float
+ // NATIVE-HALF: fcmp ogt half
+ test = (i0 > h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp ogt float
+ // NATIVE-HALF: fcmp ogt half
+ test = (h0 > i0);
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -229,6 +266,15 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fcmp ole float
test = (f2 <= h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp ole float
+ // NATIVE-HALF: fcmp ole half
+ test = (i0 <= h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp ole float
+ // NATIVE-HALF: fcmp ole half
+ test = (h0 <= i0);
+
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -250,6 +296,14 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fcmp oge float
test = (f0 >= h2);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp oge float
+ // NATIVE-HALF: fcmp oge half
+ test = (i0 >= h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp oge float
+ // NATIVE-HALF: fcmp oge half
+ test = (h0 >= i0);
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -271,6 +325,14 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fcmp oeq float
test = (f1 == h1);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp oeq float
+ // NATIVE-HALF: fcmp oeq half
+ test = (i0 == h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp oeq float
+ // NATIVE-HALF: fcmp oeq half
+ test = (h0 == i0);
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -292,6 +354,14 @@ void foo(void) {
// NATIVE-HALF: fpext half
// NATIVE-HALF: fcmp une float
test = (f1 != h1);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp une float
+ // NATIVE-HALF: fcmp une half
+ test = (i0 != h0);
+ // CHECK: [[F16TOF32]]
+ // CHECK: fcmp une float
+ // NATIVE-HALF: fcmp une half
+ test = (h0 != i0);
// CHECK: [[F16TOF32]]
// CHECK: fcmp une float
@@ -310,6 +380,15 @@ void foo(void) {
// NATIVE-HALF: fptrunc float
h0 = f0;
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ h0 = i0;
+ // CHECK: [[F16TOF32]]
+ // CHECK: fptosi float {{.*}} to i32
+ // NATIVE-HALF: fptosi half {{.*}} to i32
+ i0 = h0;
+
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
// CHECK: fadd float
@@ -329,6 +408,21 @@ void foo(void) {
// NATIVE-HALF: fadd float
// NATIVE-HALF: fptrunc float
h0 += f2;
+ // CHECK: [[F16TOF32]]
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: fadd float
+ // CHECK: fptosi float {{.*}} to i32
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ // NATIVE-HALF: fadd half
+ // NATIVE-HALF: fptosi half {{.*}} to i32
+ i0 += h0;
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: [[F16TOF32]]
+ // CHECK: fadd float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ // NATIVE-HALF: fadd half
+ h0 += i0;
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -349,6 +443,21 @@ void foo(void) {
// NATIVE-HALF: fsub float
// NATIVE-HALF: fptrunc float
h0 -= f2;
+ // CHECK: [[F16TOF32]]
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: fsub float
+ // CHECK: fptosi float {{.*}} to i32
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ // NATIVE-HALF: fsub half
+ // NATIVE-HALF: fptosi half {{.*}} to i32
+ i0 -= h0;
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: [[F16TOF32]]
+ // CHECK: fsub float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ // NATIVE-HALF: fsub half
+ h0 -= i0;
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -369,6 +478,21 @@ void foo(void) {
// NATIVE-HALF: fmul float
// NATIVE-HALF: fptrunc float
h0 *= f2;
+ // CHECK: [[F16TOF32]]
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: fmul float
+ // CHECK: fptosi float {{.*}} to i32
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ // NATIVE-HALF: fmul half
+ // NATIVE-HALF: fptosi half {{.*}} to i32
+ i0 *= h0;
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: [[F16TOF32]]
+ // CHECK: fmul float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ // NATIVE-HALF: fmul half
+ h0 *= i0;
// CHECK: [[F16TOF32]]
// CHECK: [[F16TOF32]]
@@ -389,6 +513,21 @@ void foo(void) {
// NATIVE-HALF: fdiv float
// NATIVE-HALF: fptrunc float
h0 /= f2;
+ // CHECK: [[F16TOF32]]
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: fdiv float
+ // CHECK: fptosi float {{.*}} to i32
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ // NATIVE-HALF: fdiv half
+ // NATIVE-HALF: fptosi half {{.*}} to i32
+ i0 /= h0;
+ // CHECK: sitofp i32 {{.*}} to float
+ // CHECK: [[F16TOF32]]
+ // CHECK: fdiv float
+ // CHECK: [[F32TOF16]]
+ // NATIVE-HALF: sitofp i32 {{.*}} to half
+ // NATIVE-HALF: fdiv half
+ h0 /= i0;
// Check conversions to/from double
// NOHALF: call i16 @llvm.convert.to.fp16.f64(
diff --git a/test/CodeGen/mips-varargs.c b/test/CodeGen/mips-varargs.c
index 8fd1df60b728..891769c711dd 100644
--- a/test/CodeGen/mips-varargs.c
+++ b/test/CodeGen/mips-varargs.c
@@ -111,14 +111,14 @@ long long test_i64(char *fmt, ...) {
// ALL: [[VA1:%.+]] = bitcast i8** %va to i8*
// ALL: call void @llvm.va_start(i8* [[VA1]])
//
-// O32: [[AP_CUR:%.+]] = load i8*, i8** %va, align [[PTRALIGN]]
+// O32: [[TMP0:%.+]] = bitcast i8** %va to i32*
+// O32: [[AP_CUR:%.+]] = load [[INTPTR_T:i32]], i32* [[TMP0]], align [[PTRALIGN]]
// NEW: [[TMP0:%.+]] = bitcast i8** %va to i64**
// NEW: [[AP_CUR:%.+]] = load i64*, i64** [[TMP0]], align [[PTRALIGN]]
//
// i64 is 8-byte aligned, while this is within O32's stack alignment there's no
// guarantee that the offset is still 8-byte aligned after earlier reads.
-// O32: [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]]
-// O32: [[PTR1:%.+]] = add i32 [[PTR0]], 7
+// O32: [[PTR1:%.+]] = add i32 [[AP_CUR]], 7
// O32: [[PTR2:%.+]] = and i32 [[PTR1]], -8
// O32: [[PTR3:%.+]] = inttoptr [[INTPTR_T]] [[PTR2]] to i64*
// O32: [[PTR4:%.+]] = inttoptr [[INTPTR_T]] [[PTR2]] to i8*
@@ -200,11 +200,14 @@ int test_v4i32(char *fmt, ...) {
// ALL: %va = alloca i8*, align [[PTRALIGN]]
// ALL: [[VA1:%.+]] = bitcast i8** %va to i8*
// ALL: call void @llvm.va_start(i8* [[VA1]])
-// ALL: [[AP_CUR:%.+]] = load i8*, i8** %va, align [[PTRALIGN]]
//
-// O32: [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]]
-// N32: [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]]
-// N64: [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i64]]
+// O32: [[TMP0:%.+]] = bitcast i8** %va to i32*
+// N32: [[TMP0:%.+]] = bitcast i8** %va to i32*
+// N64: [[TMP0:%.+]] = bitcast i8** %va to i64*
+//
+// O32: [[PTR0:%.+]] = load [[INTPTR_T:i32]], i32* [[TMP0]], align [[PTRALIGN]]
+// N32: [[PTR0:%.+]] = load [[INTPTR_T:i32]], i32* [[TMP0]], align [[PTRALIGN]]
+// N64: [[PTR0:%.+]] = load [[INTPTR_T:i64]], i64* [[TMP0]], align [[PTRALIGN]]
//
// Vectors are 16-byte aligned, however the O32 ABI has a maximum alignment of
// 8-bytes since the base of the stack is 8-byte aligned.
diff --git a/test/CodeGen/neon-immediate-ubsan.c b/test/CodeGen/neon-immediate-ubsan.c
new file mode 100644
index 000000000000..3fe4b003972b
--- /dev/null
+++ b/test/CodeGen/neon-immediate-ubsan.c
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -triple armv7s-linux-gnu -emit-llvm -O1 -o - %s \
+// RUN: -target-feature +neon -target-cpu cortex-a8 \
+// RUN: -fsanitize=signed-integer-overflow \
+// RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=ARMV7
+
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -emit-llvm -O1 -o - %s \
+// RUN: -target-feature +neon -target-cpu cortex-a53 \
+// RUN: -fsanitize=signed-integer-overflow \
+// RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=AARCH64
+
+// Verify we emit constants for "immediate" builtin arguments.
+// Emitting a scalar expression can make the immediate be generated as
+// overflow intrinsics, if the overflow sanitizer is enabled.
+
+// PR23517
+
+#include <arm_neon.h>
+
+int32x2_t test_vqrshrn_n_s64(int64x2_t a) {
+ // CHECK-LABEL: @test_vqrshrn_n_s64
+ // CHECK-AARCH64: call <2 x i32> @llvm.aarch64.neon.sqrshrn.v2i32(<2 x i64> {{.*}}, i32 1)
+ // CHECK-ARMV7: call <2 x i32> @llvm.arm.neon.vqrshiftns.v2i32(<2 x i64> {{.*}}, <2 x i64> <i64 -1, i64 -1>)
+ return vqrshrn_n_s64(a, 0 + 1);
+}
diff --git a/test/CodeGenCXX/dllexport.cpp b/test/CodeGenCXX/dllexport.cpp
index 3a1a3ffd871e..477e7dcf0b53 100644
--- a/test/CodeGenCXX/dllexport.cpp
+++ b/test/CodeGenCXX/dllexport.cpp
@@ -691,10 +691,13 @@ extern template struct ExplicitInstantiationDeclExportedTemplate<int>;
USEMEMFUNC(ExplicitInstantiationDeclExportedTemplate<int>, f);
// M32-DAG: {{declare|define available_externally}} x86_thiscallcc void @"\01?f@?$ExplicitInstantiationDeclExportedTemplate@H@@QAEXXZ"
-template <typename T> struct ExplicitInstantiationDeclExportedDefTemplate { void f() {} };
+template <typename T> struct ExplicitInstantiationDeclExportedDefTemplate { void f() {} ExplicitInstantiationDeclExportedDefTemplate() {} };
extern template struct ExplicitInstantiationDeclExportedDefTemplate<int>;
template struct __declspec(dllexport) ExplicitInstantiationDeclExportedDefTemplate<int>;
+USEMEMFUNC(ExplicitInstantiationDeclExportedDefTemplate<int>, f);
// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?f@?$ExplicitInstantiationDeclExportedDefTemplate@H@@QAEXXZ"
+// M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExplicitInstantiationDeclExportedDefTemplate* @"\01??0?$ExplicitInstantiationDeclExportedDefTemplate@H@@QAE@XZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN44ExplicitInstantiationDeclExportedDefTemplateIiE1fEv
namespace { struct InternalLinkageType {}; }
struct __declspec(dllexport) PR23308 {
@@ -704,6 +707,11 @@ void PR23308::f(InternalLinkageType*) {}
long use(PR23308* p) { p->f(nullptr); }
// M32-DAG: define internal x86_thiscallcc void @"\01?f@PR23308@@QAEXPAUInternalLinkageType@?A@@@Z"
+template <typename T> struct PR23770BaseTemplate { void f() {} };
+template <typename T> struct PR23770DerivedTemplate : PR23770BaseTemplate<int> {};
+extern template struct PR23770DerivedTemplate<int>;
+template struct __declspec(dllexport) PR23770DerivedTemplate<int>;
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?f@?$PR23770BaseTemplate@H@@QAEXXZ"
//===----------------------------------------------------------------------===//
@@ -754,11 +762,11 @@ USEMEMFUNC(DerivedFromImportedTemplate, func)
// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ImportedClassTemplate@H@@QAEXXZ"
// G32-DAG: declare dllimport x86_thiscallcc void @_ZN21ImportedClassTemplateIiE4funcEv
-// Base class already instantiated without dll attribute.
+// Base class already implicitly instantiated without dll attribute.
struct DerivedFromTemplateD : public ClassTemplate<double> {};
struct __declspec(dllexport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
USEMEMFUNC(DerivedFromTemplateD2, func)
-// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?func@?$ClassTemplate@N@@QAEXXZ"
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ClassTemplate@N@@QAEXXZ"
// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ClassTemplateIdE4funcEv
// MS: Base class already instantiated with different dll attribute.
@@ -811,3 +819,18 @@ struct __declspec(dllexport) BottomClass : public MiddleClass<int> { };
USEMEMFUNC(BottomClass, func)
// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$TopClass@H@@QAEXXZ"
// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN8TopClassIiE4funcEv
+
+template <typename T> struct ExplicitInstantiationDeclTemplateBase { void func() {} };
+extern template struct ExplicitInstantiationDeclTemplateBase<int>;
+struct __declspec(dllexport) DerivedFromExplicitInstantiationDeclTemplateBase : public ExplicitInstantiationDeclTemplateBase<int> {};
+template struct ExplicitInstantiationDeclTemplateBase<int>;
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase@H@@QAEXXZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv
+
+template <typename T> struct ExplicitInstantiationDeclTemplateBase2 { void func() {} };
+extern template struct ExplicitInstantiationDeclTemplateBase2<int>;
+struct __declspec(dllexport) DerivedFromExplicitInstantiationDeclTemplateBase2 : public ExplicitInstantiationDeclTemplateBase2<int> {};
+template struct __declspec(dllimport) ExplicitInstantiationDeclTemplateBase2<int>;
+USEMEMFUNC(ExplicitInstantiationDeclTemplateBase2<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase2@H@@QAEXXZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN38ExplicitInstantiationDeclTemplateBase2IiE4funcEv
diff --git a/test/CodeGenCXX/dllimport.cpp b/test/CodeGenCXX/dllimport.cpp
index 6de856017b54..0f15ff0291b9 100644
--- a/test/CodeGenCXX/dllimport.cpp
+++ b/test/CodeGenCXX/dllimport.cpp
@@ -724,18 +724,29 @@ template struct __declspec(dllimport) ExplicitlyInstantiatedWithDifferentAttr<in
USEMEMFUNC(ExplicitlyInstantiatedWithDifferentAttr<int>, f);
// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$ExplicitlyInstantiatedWithDifferentAttr@H@@QAEXXZ"
-template <typename T> struct ExplicitInstantiationDeclImportedDefTemplate { void f() {} };
+template <typename T> struct ExplicitInstantiationDeclImportedDefTemplate { void f() {} ExplicitInstantiationDeclImportedDefTemplate() {}};
extern template struct ExplicitInstantiationDeclImportedDefTemplate<int>;
template struct __declspec(dllimport) ExplicitInstantiationDeclImportedDefTemplate<int>;
+USECLASS(ExplicitInstantiationDeclImportedDefTemplate<int>);
USEMEMFUNC(ExplicitInstantiationDeclImportedDefTemplate<int>, f);
// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$ExplicitInstantiationDeclImportedDefTemplate@H@@QAEXXZ"
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc %struct.ExplicitInstantiationDeclImportedDefTemplate* @"\01??0?$ExplicitInstantiationDeclImportedDefTemplate@H@@QAE@XZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN44ExplicitInstantiationDeclImportedDefTemplateIiE1fEv
-template <typename T> struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate { void f() {} };
+template <typename T> struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate { void f() {} ExplicitInstantiationDeclExportedDefImportedTemplate() {} };
extern template struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate <int>;
template struct __declspec(dllexport) ExplicitInstantiationDeclExportedDefImportedTemplate<int>;
+USECLASS(ExplicitInstantiationDeclExportedDefImportedTemplate<int>);
USEMEMFUNC(ExplicitInstantiationDeclExportedDefImportedTemplate<int>, f);
// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$ExplicitInstantiationDeclExportedDefImportedTemplate@H@@QAEXXZ"
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc %struct.ExplicitInstantiationDeclExportedDefImportedTemplate* @"\01??0?$ExplicitInstantiationDeclExportedDefImportedTemplate@H@@QAE@XZ"
+template <typename T> struct PR23770BaseTemplate { void f() {} };
+template <typename T> struct PR23770DerivedTemplate : PR23770BaseTemplate<int> {};
+extern template struct PR23770DerivedTemplate<int>;
+template struct __declspec(dllimport) PR23770DerivedTemplate<int>;
+USEMEMFUNC(PR23770BaseTemplate<int>, f);
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01?f@?$PR23770BaseTemplate@H@@QAEXXZ"
//===----------------------------------------------------------------------===//
// Classes with template base classes
@@ -781,11 +792,11 @@ USEMEMFUNC(ExportedClassTemplate<int>, func)
// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExportedClassTemplate@H@@QAEXXZ"
// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN21ExportedClassTemplateIiE4funcEv
-// Base class already instantiated without attribute.
+// Base class already implicitly instantiated without attribute.
struct DerivedFromTemplateD : public ClassTemplate<double> {};
struct __declspec(dllimport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
USEMEMFUNC(ClassTemplate<double>, func)
-// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?func@?$ClassTemplate@N@@QAEXXZ"
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ClassTemplate@N@@QAEXXZ"
// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ClassTemplateIdE4funcEv
// MS: Base class already instantiated with dfferent attribute.
@@ -838,3 +849,19 @@ struct __declspec(dllimport) BottomClass : public MiddleClass<int> { };
USEMEMFUNC(TopClass<int>, func)
// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$TopClass@H@@QAEXXZ"
// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN8TopClassIiE4funcEv
+
+template <typename T> struct ExplicitInstantiationDeclTemplateBase { void func() {} };
+extern template struct ExplicitInstantiationDeclTemplateBase<int>;
+struct __declspec(dllimport) DerivedFromExplicitInstantiationDeclTemplateBase : public ExplicitInstantiationDeclTemplateBase<int> {};
+template struct ExplicitInstantiationDeclTemplateBase<int>;
+USEMEMFUNC(ExplicitInstantiationDeclTemplateBase<int>, func)
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase@H@@QAEXXZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv
+
+template <typename T> struct ExplicitInstantiationDeclTemplateBase2 { void func() {} };
+extern template struct ExplicitInstantiationDeclTemplateBase2<int>;
+struct __declspec(dllimport) DerivedFromExplicitInstantiationDeclTemplateBase2 : public ExplicitInstantiationDeclTemplateBase2<int> {};
+template struct __declspec(dllexport) ExplicitInstantiationDeclTemplateBase2<int>;
+USEMEMFUNC(ExplicitInstantiationDeclTemplateBase2<int>, func)
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase2@H@@QAEXXZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN38ExplicitInstantiationDeclTemplateBase2IiE4funcEv
diff --git a/test/CodeGenCXX/pointers-to-data-members.cpp b/test/CodeGenCXX/pointers-to-data-members.cpp
index 0f2ddaac23b1..94337d98a195 100644
--- a/test/CodeGenCXX/pointers-to-data-members.cpp
+++ b/test/CodeGenCXX/pointers-to-data-members.cpp
@@ -285,4 +285,14 @@ S s;
// CHECK-GLOBAL: @_ZN19FlexibleArrayMember1sE = global %"struct.FlexibleArrayMember::S" zeroinitializer, align 8
}
+namespace IndirectPDM {
+union U {
+ union {
+ int U::*m;
+ };
+};
+U u;
+// CHECK-GLOBAL: @_ZN11IndirectPDM1uE = global %"union.IndirectPDM::U" { %union.anon { i64 -1 } }, align 8
+}
+
// CHECK-O3: attributes [[NUW]] = { nounwind readnone{{.*}} }
diff --git a/test/CodeGen/pragma-loop.cpp b/test/CodeGenCXX/pragma-loop.cpp
index dd40c1d72600..dd40c1d72600 100644
--- a/test/CodeGen/pragma-loop.cpp
+++ b/test/CodeGenCXX/pragma-loop.cpp
diff --git a/test/CodeGen/pragma-unroll.cpp b/test/CodeGenCXX/pragma-unroll.cpp
index 8b73fa6c8aab..8b73fa6c8aab 100644
--- a/test/CodeGen/pragma-unroll.cpp
+++ b/test/CodeGenCXX/pragma-unroll.cpp
diff --git a/test/CodeGenCXX/stack-reuse-miscompile.cpp b/test/CodeGenCXX/stack-reuse-miscompile.cpp
new file mode 100644
index 000000000000..63d15fd1e8c9
--- /dev/null
+++ b/test/CodeGenCXX/stack-reuse-miscompile.cpp
@@ -0,0 +1,36 @@
+// RUN: %clang -S -target armv7l-unknown-linux-gnueabihf -emit-llvm -O1 -mllvm -disable-llvm-optzns -S %s -o - | FileCheck %s
+
+// This test should not to generate llvm.lifetime.start/llvm.lifetime.end for
+// f function because all temporary objects in this function are used for the
+// final result
+
+class S {
+ char *ptr;
+ unsigned int len;
+};
+
+class T {
+ S left;
+ S right;
+
+public:
+ T(const char s[]);
+ T(S);
+
+ T concat(const T &Suffix) const;
+ const char * str() const;
+};
+
+const char * f(S s)
+{
+// CHECK: [[T1:%.*]] = alloca %class.T, align 4
+// CHECK: [[T2:%.*]] = alloca %class.T, align 4
+// CHECK: [[T3:%.*]] = alloca %class.T, align 4
+// CHECK: [[T4:%.*]] = call %class.T* @_ZN1TC1EPKc(%class.T* [[T1]], i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0))
+// CHECK: [[T5:%.*]] = call %class.T* @_ZN1TC1E1S(%class.T* [[T2]], [2 x i32] %{{.*}})
+// CHECK: call void @_ZNK1T6concatERKS_(%class.T* sret [[T3]], %class.T* [[T1]], %class.T* dereferenceable(16) [[T2]])
+// CHECK: [[T6:%.*]] = call i8* @_ZNK1T3strEv(%class.T* [[T3]])
+// CHECK: ret i8* [[T6]]
+
+ return T("[").concat(T(s)).str();
+}
diff --git a/test/CodeGenCXX/stack-reuse.cpp b/test/CodeGenCXX/stack-reuse.cpp
new file mode 100644
index 000000000000..a975f30a048a
--- /dev/null
+++ b/test/CodeGenCXX/stack-reuse.cpp
@@ -0,0 +1,146 @@
+// RUN: %clang -target armv7l-unknown-linux-gnueabihf -S %s -o - -emit-llvm -O1 -disable-llvm-optzns | FileCheck %s
+
+// Stack should be reused when possible, no need to allocate two separate slots
+// if they have disjoint lifetime.
+
+// Sizes of objects are related to previously existed threshold of 32. In case
+// of S_large stack size is rounded to 40 bytes.
+
+// 32B
+struct S_small {
+ int a[8];
+};
+
+// 36B
+struct S_large {
+ int a[9];
+};
+
+// Helper class for lifetime scope absence testing
+struct Combiner {
+ S_large a, b;
+
+ Combiner(S_large);
+ Combiner f();
+};
+
+extern S_small foo_small();
+extern S_large foo_large();
+extern void bar_small(S_small*);
+extern void bar_large(S_large*);
+
+// Prevent mangling of function names.
+extern "C" {
+
+void small_rvoed_unnamed_temporary_object() {
+// CHECK-LABEL: define void @small_rvoed_unnamed_temporary_object
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9foo_smallv
+// CHECK: call void @llvm.lifetime.end
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9foo_smallv
+// CHECK: call void @llvm.lifetime.end
+
+ foo_small();
+ foo_small();
+}
+
+void large_rvoed_unnamed_temporary_object() {
+// CHECK-LABEL: define void @large_rvoed_unnamed_temporary_object
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9foo_largev
+// CHECK: call void @llvm.lifetime.end
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9foo_largev
+// CHECK: call void @llvm.lifetime.end
+
+ foo_large();
+ foo_large();
+}
+
+void small_rvoed_named_temporary_object() {
+// CHECK-LABEL: define void @small_rvoed_named_temporary_object
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9foo_smallv
+// CHECK: call void @llvm.lifetime.end
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9foo_smallv
+// CHECK: call void @llvm.lifetime.end
+
+ {
+ S_small s = foo_small();
+ }
+ {
+ S_small s = foo_small();
+ }
+}
+
+void large_rvoed_named_temporary_object() {
+// CHECK-LABEL: define void @large_rvoed_named_temporary_object
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9foo_largev
+// CHECK: call void @llvm.lifetime.end
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9foo_largev
+// CHECK: call void @llvm.lifetime.end
+
+ {
+ S_large s = foo_large();
+ }
+ {
+ S_large s = foo_large();
+ }
+}
+
+void small_auto_object() {
+// CHECK-LABEL: define void @small_auto_object
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9bar_smallP7S_small
+// CHECK: call void @llvm.lifetime.end
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9bar_smallP7S_small
+// CHECK: call void @llvm.lifetime.end
+
+ {
+ S_small s;
+ bar_small(&s);
+ }
+ {
+ S_small s;
+ bar_small(&s);
+ }
+}
+
+void large_auto_object() {
+// CHECK-LABEL: define void @large_auto_object
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9bar_largeP7S_large
+// CHECK: call void @llvm.lifetime.end
+// CHECK: call void @llvm.lifetime.start
+// CHECK: call void @_Z9bar_largeP7S_large
+// CHECK: call void @llvm.lifetime.end
+
+ {
+ S_large s;
+ bar_large(&s);
+ }
+ {
+ S_large s;
+ bar_large(&s);
+ }
+}
+
+int large_combiner_test(S_large s) {
+// CHECK-LABEL: define i32 @large_combiner_test
+// CHECK: [[T1:%.*]] = alloca %struct.Combiner
+// CHECK: [[T2:%.*]] = alloca %struct.Combiner
+// CHECK: [[T3:%.*]] = call %struct.Combiner* @_ZN8CombinerC1E7S_large(%struct.Combiner* [[T1]], [9 x i32] %s.coerce)
+// CHECK: call void @_ZN8Combiner1fEv(%struct.Combiner* sret [[T2]], %struct.Combiner* [[T1]])
+// CHECK: [[T4:%.*]] = getelementptr inbounds %struct.Combiner, %struct.Combiner* [[T2]], i32 0, i32 0, i32 0, i32 0
+// CHECK: [[T5:%.*]] = load i32, i32* [[T4]]
+// CHECK: ret i32 [[T5]]
+
+ return Combiner(s).f().a.a[0];
+}
+
+}
diff --git a/test/CodeGenCXX/x86_64-arguments-avx.cpp b/test/CodeGenCXX/x86_64-arguments-avx.cpp
index 1b1c6420636e..29e693451d12 100644
--- a/test/CodeGenCXX/x86_64-arguments-avx.cpp
+++ b/test/CodeGenCXX/x86_64-arguments-avx.cpp
@@ -13,3 +13,40 @@ PR22753 test(PR22753 x) {
return x;
}
}
+
+namespace test2 {
+typedef double __m128d __attribute__((__vector_size__(16)));
+typedef float __m128 __attribute__((__vector_size__(16)));
+typedef double __m256d __attribute__((__vector_size__(32)));
+typedef float __m256 __attribute__((__vector_size__(32)));
+
+union U1 {
+ __m128 v1;
+ __m128d v2;
+};
+
+union UU1 {
+ union U1;
+ __m128d v3;
+};
+
+// CHECK: define <2 x double> @_ZN5test27PR23082ENS_3UU1E(<2 x double>
+UU1 PR23082(UU1 x) {
+ return x;
+}
+
+union U2 {
+ __m256 v1;
+ __m256d v2;
+};
+
+union UU2 {
+ union U2;
+ __m256d v3;
+};
+
+// CHECK: define <4 x double> @_ZN5test27PR23082ENS_3UU2E(<4 x double>
+UU2 PR23082(UU2 x) {
+ return x;
+}
+}
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/lib/sparc64-linux-gnu/.keep b/test/Driver/Inputs/debian_8_sparc64_tree/lib/sparc64-linux-gnu/.keep
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/lib/sparc64-linux-gnu/.keep
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/lib64/.keep b/test/Driver/Inputs/debian_8_sparc64_tree/lib64/.keep
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/lib64/.keep
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/c++/4.9/.keep b/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/c++/4.9/.keep
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/c++/4.9/.keep
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/sparc64-linux-gnu/c++/4.9/.keep b/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/sparc64-linux-gnu/c++/4.9/.keep
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/sparc64-linux-gnu/c++/4.9/.keep
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtbegin.o b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtbegin.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtbegin.o
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtend.o b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtend.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtend.o
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crt1.o b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crt1.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crt1.o
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crti.o b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crti.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crti.o
diff --git a/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crtn.o b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crtn.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crtn.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib/sparc-linux-gnu/.keep b/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib/sparc-linux-gnu/.keep
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib/sparc-linux-gnu/.keep
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib64/.keep b/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib64/.keep
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib64/.keep
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/c++/4.9/backward/.keep b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/c++/4.9/backward/.keep
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/c++/4.9/backward/.keep
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/c++/4.9/64/.keep b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/c++/4.9/64/.keep
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/c++/4.9/64/.keep
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtbegin.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtbegin.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtbegin.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtend.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtend.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtend.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtbegin.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtbegin.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtbegin.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtend.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtend.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtend.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crt1.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crt1.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crt1.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crti.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crti.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crti.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crtn.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crtn.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crtn.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crt1.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crt1.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crt1.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crti.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crti.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crti.o
diff --git a/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crtn.o b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crtn.o
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crtn.o
diff --git a/test/Driver/arm-cortex-cpus.c b/test/Driver/arm-cortex-cpus.c
index 5052f3bb84c3..b9db9622dd83 100644
--- a/test/Driver/arm-cortex-cpus.c
+++ b/test/Driver/arm-cortex-cpus.c
@@ -201,13 +201,17 @@
// ================== Check that a bogus architecture gives an error
// RUN: %clang -target arm -march=armbogusv6 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS %s
-// CHECK-BOGUS: error: the clang compiler does not support '-march=armbogusv6'
+// CHECK-BOGUS: error: {{.*}} does not support '-march=armbogusv6'
// RUN: %clang -target arm---eabihf -march=armbogusv7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-HF %s
-// CHECK-BOGUS-HF: error: the clang compiler does not support '-march=armbogusv7'
+// CHECK-BOGUS-HF: error: {{.*}} does not support '-march=armbogusv7'
+// RUN: %clang -target arm -march=armv6bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS2 %s
+// CHECK-BOGUS2: error: {{.*}} does not support '-march=armv6bogus'
+// RUN: %clang -target arm -march=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS3 %s
+// CHECK-BOGUS3: error: {{.*}} does not support '-march=bogus'
// ================== Check that a bogus CPU gives an error
// RUN: %clang -target arm -mcpu=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-CPU %s
-// CHECK-BOGUS-CPU: error: the clang compiler does not support '-mcpu=bogus'
+// CHECK-BOGUS-CPU: error: {{.*}} does not support '-mcpu=bogus'
// ================== Check default Architecture on each ARM11 CPU
// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1136j-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6 %s
@@ -388,3 +392,13 @@
// RUN: %clang -target arm -mcpu=cortex-a57 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A-THUMB %s
// RUN: %clang -target arm -mcpu=cortex-a72 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A-THUMB %s
// CHECK-BE-CPUV8A-THUMB: "-cc1"{{.*}} "-triple" "thumbebv8-{{.*}}
+
+// ================== Check whether -mcpu accepts mixed-case values.
+// RUN: %clang -target arm-linux-gnueabi -mcpu=Cortex-a5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-A7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=CORTEX-a8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=Cortex-A9 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=corteX-A12 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=CorteX-a15 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=CorteX-A17 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s
+// CHECK-CASE-INSENSITIVE-CPUV7A: "-cc1"{{.*}} "-triple" "armv7-{{.*}}
diff --git a/test/Driver/arm-mfpu.c b/test/Driver/arm-mfpu.c
index d941a3c9af06..8439cddf9d7f 100644
--- a/test/Driver/arm-mfpu.c
+++ b/test/Driver/arm-mfpu.c
@@ -15,13 +15,14 @@
// RUN: | FileCheck --check-prefix=CHECK-FPA %s
// RUN: %clang -target arm-linux-eabi -mfpu=maverick %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-FPA %s
-// CHECK-FPA: "-target-feature" "-vfp2"
-// CHECK-FPA: "-target-feature" "-vfp3"
-// CHECK-FPA: "-target-feature" "-neon"
+// CHECK-FPA: error: {{.*}} does not support '-mfpu={{fpa|fpe|fpe2|fpe3|maverick}}'
// RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-VFP %s
// CHECK-VFP: "-target-feature" "+vfp2"
+// CHECK-VFP: "-target-feature" "-vfp3"
+// CHECK-VFP: "-target-feature" "-vfp4"
+// CHECK-VFP: "-target-feature" "-fp-armv8"
// CHECK-VFP: "-target-feature" "-neon"
// RUN: %clang -target arm-linux-eabi -mfpu=vfp3 %s -### -o %t.o 2>&1 \
@@ -29,14 +30,19 @@
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3 %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-VFP3 %s
// CHECK-VFP3: "-target-feature" "+vfp3"
+// CHECK-VFP3: "-target-feature" "-vfp4"
+// CHECK-VFP3: "-target-feature" "-fp-armv8"
// CHECK-VFP3: "-target-feature" "-neon"
// RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
+// CHECK-VFP3-D16: "-target-feature" "-fp-only-sp"
// CHECK-VFP3-D16: "-target-feature" "+d16"
// CHECK-VFP3-D16: "-target-feature" "+vfp3"
+// CHECK-VFP3-D16: "-target-feature" "-vfp4"
+// CHECK-VFP3-D16: "-target-feature" "-fp-armv8"
// CHECK-VFP3-D16: "-target-feature" "-neon"
// RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \
@@ -44,14 +50,17 @@
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
// CHECK-VFP4: "-target-feature" "+vfp4"
+// CHECK-VFP4: "-target-feature" "-fp-armv8"
// CHECK-VFP4: "-target-feature" "-neon"
// RUN: %clang -target arm-linux-eabi -mfpu=vfp4-d16 %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
+// CHECK-VFP4-D16: "-target-feature" "-fp-only-sp"
// CHECK-VFP4-D16: "-target-feature" "+d16"
// CHECK-VFP4-D16: "-target-feature" "+vfp4"
+// CHECK-VFP4-D16: "-target-feature" "-fp-armv8"
// CHECK-VFP4-D16: "-target-feature" "-neon"
// RUN: %clang -target arm-linux-eabi -mfpu=fp4-sp-d16 %s -### -o %t.o 2>&1 \
@@ -61,6 +70,7 @@
// CHECK-FP4-SP-D16: "-target-feature" "+fp-only-sp"
// CHECK-FP4-SP-D16: "-target-feature" "+d16"
// CHECK-FP4-SP-D16: "-target-feature" "+vfp4"
+// CHECK-FP4-SP-D16: "-target-feature" "-fp-armv8"
// CHECK-FP4-SP-D16: "-target-feature" "-neon"
// RUN: %clang -target arm-linux-eabi -mfpu=fp5-sp-d16 %s -### -o %t.o 2>&1 \
@@ -77,6 +87,7 @@
// RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s
// RUN: %clang -target arm-linux-eabi -mfpu=fpv5-dp-d16 %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s
+// CHECK-FP5-DP-D16: "-target-feature" "-fp-only-sp"
// CHECK-FP5-DP-D16: "-target-feature" "+d16"
// CHECK-FP5-DP-D16: "-target-feature" "+fp-armv8"
// CHECK-FP5-DP-D16: "-target-feature" "-neon"
@@ -92,8 +103,8 @@
// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV4 %s
-// CHECK-NEON-VFPV4: "-target-feature" "+neon"
// CHECK-NEON-VFPV4: "-target-feature" "+vfp4"
+// CHECK-NEON-VFPV4: "-target-feature" "+neon"
// RUN: %clang -target arm-linux-eabi -msoft-float %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-SOFT-FLOAT %s
@@ -126,17 +137,18 @@
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=crypto-neon-fp-armv8 %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRYPTO-NEON-FP-ARMV8 %s
// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
-// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+neon"
// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+crypto"
// RUN: %clang -target armv8-linux-gnueabi -mfpu=none %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NO-FP %s
+// CHECK-NO-FP: "-target-feature" "-fp-only-sp"
+// CHECK-NO-FP: "-target-feature" "-d16"
// CHECK-NO-FP: "-target-feature" "-vfp2"
// CHECK-NO-FP: "-target-feature" "-vfp3"
// CHECK-NO-FP: "-target-feature" "-vfp4"
// CHECK-NO-FP: "-target-feature" "-fp-armv8"
-// CHECK-NO-FP: "-target-feature" "-crypto"
// CHECK-NO-FP: "-target-feature" "-neon"
+// CHECK-NO-FP: "-target-feature" "-crypto"
// RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-HF %s
diff --git a/test/Driver/cl-outputs.c b/test/Driver/cl-outputs.c
index be1172f30fce..b92c82687a9b 100644
--- a/test/Driver/cl-outputs.c
+++ b/test/Driver/cl-outputs.c
@@ -249,22 +249,15 @@
// Fi2: "-E"
// Fi2: "-o" "foo.x"
+// To match MSVC behavior /o should be ignored for /P output.
+
// RUN: %clang_cl /P /ofoo -### -- %s 2>&1 | FileCheck -check-prefix=Fio1 %s
// Fio1: "-E"
-// Fio1: "-o" "foo.i"
+// Fio1: "-o" "cl-outputs.i"
-// RUN: %clang_cl /P /o foo -### -- %s 2>&1 | FileCheck -check-prefix=Fio2 %s
+// RUN: %clang_cl /P /o foo.x -### -- %s 2>&1 | FileCheck -check-prefix=Fio2 %s
// Fio2: "-E"
-// Fio2: "-o" "foo.i"
-
-// RUN: %clang_cl /P /ofoo.x -### -- %s 2>&1 | FileCheck -check-prefix=Fio3 %s
-// Fio3: "-E"
-// Fio3: "-o" "foo.x"
-
-// RUN: %clang_cl /P /o foo.x -### -- %s 2>&1 | FileCheck -check-prefix=Fio4 %s
-// Fio4: "-E"
-// Fio4: "-o" "foo.x"
-
+// Fio2: "-o" "cl-outputs.i"
// RUN: %clang_cl /P /obar.x /Fifoo.x -### -- %s 2>&1 | FileCheck -check-prefix=FioRACE1 %s
// FioRACE1: "-E"
@@ -272,4 +265,10 @@
// RUN: %clang_cl /P /Fifoo.x /obar.x -### -- %s 2>&1 | FileCheck -check-prefix=FioRACE2 %s
// FioRACE2: "-E"
-// FioRACE2: "-o" "bar.x"
+// FioRACE2: "-o" "foo.x"
+
+// RUN: %clang_cl /c /GL -### -- %s 2>&1 | FileCheck -check-prefix=LTO-DEFAULT %s
+// LTO-DEFAULT: "-emit-llvm-bc"{{.*}}"-o" "cl-outputs.obj"
+
+// RUN: %clang_cl /c /GL /Fofoo -### -- %s 2>&1 | FileCheck -check-prefix=LTO-FO %s
+// LTO-FO: "-emit-llvm-bc"{{.*}}"-o" "foo.obj"
diff --git a/test/Driver/crash-report-header.h b/test/Driver/crash-report-header.h
new file mode 100644
index 000000000000..e0193cbe45e9
--- /dev/null
+++ b/test/Driver/crash-report-header.h
@@ -0,0 +1,18 @@
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: not env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s 2>&1 | FileCheck %s
+// RUN: cat %t/crash-report-header-*.h | FileCheck --check-prefix=CHECKSRC "%s"
+// RUN: cat %t/crash-report-header-*.sh | FileCheck --check-prefix=CHECKSH "%s"
+// REQUIRES: crash-recovery
+
+// because of the glob (*.h, *.sh)
+// REQUIRES: shell
+
+#pragma clang __debug parser_crash
+// CHECK: Preprocessed source(s) and associated run script(s) are located at:
+// CHECK-NEXT: note: diagnostic msg: {{.*}}.h
+FOO
+// CHECKSRC: FOO
+// CHECKSH: "-cc1"
+// CHECKSH: "-main-file-name" "crash-report-header.h"
+// CHECKSH: "crash-report-header-{{[^ ]*}}.h"
diff --git a/test/Driver/fopenmp.c b/test/Driver/fopenmp.c
new file mode 100644
index 000000000000..36c856d8820e
--- /dev/null
+++ b/test/Driver/fopenmp.c
@@ -0,0 +1,33 @@
+// RUN: %clang -target x86_64-linux-gnu -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP
+// RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP
+// RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP
+//
+// CHECK-CC1-OPENMP: "-cc1"
+// CHECK-CC1-OPENMP: "-fopenmp"
+//
+// CHECK-CC1-NO-OPENMP: "-cc1"
+// CHECK-CC1-NO-OPENMP-NOT: "-fopenmp"
+//
+// RUN: %clang -target x86_64-linux-gnu -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP
+// RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP
+// RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5
+//
+// CHECK-LD-OMP: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LD-OMP: "-lomp"
+//
+// CHECK-LD-GOMP: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LD-GOMP: "-lgomp"
+//
+// CHECK-LD-IOMP5: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LD-IOMP5: "-liomp5"
+//
+// We'd like to check that the default is sane, but until we have the ability
+// to *always* semantically analyze OpenMP without always generating runtime
+// calls (in the event of an unsupported runtime), we don't have a good way to
+// test the CC1 invocation. Instead, just ensure we do eventually link *some*
+// OpenMP runtime.
+//
+// RUN: %clang -target x86_64-linux-gnu -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY
+//
+// CHECK-LD-ANY: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LD-ANY: "-l{{(omp|gomp|iomp5)}}"
diff --git a/test/Driver/krait-cpu.c b/test/Driver/krait-cpu.c
index ee324b6a54a5..bf85c6e888e5 100644
--- a/test/Driver/krait-cpu.c
+++ b/test/Driver/krait-cpu.c
@@ -1,3 +1,6 @@
// ================== Check default Architecture on krait CPU
// RUN: %clang -target arm-linux-gnueabi -mcpu=krait -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// ================== Check whether -mcpu accepts mixed-case values.
+// RUN: %clang -target arm-linux-gnueabi -mcpu=Krait -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=KRAIT -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
// CHECK-CPUV7A: "-cc1"{{.*}} "-triple" "armv7-{{.*}}
diff --git a/test/Driver/linux-header-search.cpp b/test/Driver/linux-header-search.cpp
index 574ae22c67de..23912cb94aef 100644
--- a/test/Driver/linux-header-search.cpp
+++ b/test/Driver/linux-header-search.cpp
@@ -285,3 +285,60 @@
// CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/mips64el-linux-gnuabi64"
// CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/include"
// CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+
+// Check header search on Debian 8 / Sparc
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target sparc-unknown-linux-gnu \
+// RUN: --sysroot=%S/Inputs/debian_8_sparc_multilib_tree \
+// RUN: --gcc-toolchain="" \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC32 %s
+// CHECK-DEBIAN-SPARC32: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-DEBIAN-SPARC32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// CHECK-DEBIAN-SPARC32: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-SPARC32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../include/c++/4.9"
+// CHECK-DEBIAN-SPARC32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../include/sparc-linux-gnu/c++/4.9"
+// CHECK-DEBIAN-SPARC32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../include/c++/4.9/backward"
+// CHECK-DEBIAN-SPARC32: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-DEBIAN-SPARC32: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
+// CHECK-DEBIAN-SPARC32: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/sparc-linux-gnu"
+// CHECK-DEBIAN-SPARC32: "-internal-externc-isystem" "[[SYSROOT]]/include"
+// CHECK-DEBIAN-SPARC32: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+
+// Check header search on Debian 8 / Sparc, with the oldstyle multilib packages
+// RUN: %clang -no-canonical-prefixes -m64 %s -### -fsyntax-only 2>&1 \
+// RUN: -target sparc-unknown-linux-gnu \
+// RUN: --sysroot=%S/Inputs/debian_8_sparc_multilib_tree \
+// RUN: --gcc-toolchain="" \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC32-LIB64 %s
+// CHECK-DEBIAN-SPARC32-LIB64: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-DEBIAN-SPARC32-LIB64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// CHECK-DEBIAN-SPARC32-LIB64: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-SPARC32-LIB64: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../include/c++/4.9"
+// CHECK-DEBIAN-SPARC32-LIB64: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../include/sparc-linux-gnu/c++/4.9/64"
+// CHECK-DEBIAN-SPARC32-LIB64: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../include/c++/4.9/backward"
+// CHECK-DEBIAN-SPARC32-LIB64: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-DEBIAN-SPARC32-LIB64: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
+/* TODO: GCC 4.9 includes the following dir in its search path, which
+ seems questionable. Clang doesn't. Not sure if clang should be
+ doing that too. */
+// CHECK-DEBIAN-SPARC32-LIB64-todo: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/sparc-linux-gnu"
+// CHECK-DEBIAN-SPARC32-LIB64: "-internal-externc-isystem" "[[SYSROOT]]/include"
+// CHECK-DEBIAN-SPARC32-LIB64: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+
+// Check header search on Debian 8 / Sparc64
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target sparc64-unknown-linux-gnu \
+// RUN: --sysroot=%S/Inputs/debian_8_sparc64_tree \
+// RUN: --gcc-toolchain="" \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC64 %s
+// CHECK-DEBIAN-SPARC64: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-DEBIAN-SPARC64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// CHECK-DEBIAN-SPARC64: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-SPARC64: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../../include/c++/4.9"
+// CHECK-DEBIAN-SPARC64: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../../include/sparc64-linux-gnu/c++/4.9"
+// CHECK-DEBIAN-SPARC64: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../../include/c++/4.9/backward"
+// CHECK-DEBIAN-SPARC64: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-DEBIAN-SPARC64: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
+// CHECK-DEBIAN-SPARC64: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/sparc64-linux-gnu"
+// CHECK-DEBIAN-SPARC64: "-internal-externc-isystem" "[[SYSROOT]]/include"
+// CHECK-DEBIAN-SPARC64: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c
index 38edb7fe4a26..5c4778be8cf5 100644
--- a/test/Driver/linux-ld.c
+++ b/test/Driver/linux-ld.c
@@ -904,6 +904,67 @@
// CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/lib"
// CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib"
//
+// Check linker paths on Debian 8 / Sparc
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=sparc-linux-gnu \
+// RUN: --gcc-toolchain="" \
+// RUN: --sysroot=%S/Inputs/debian_8_sparc_multilib_tree \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC32 %s
+// CHECK-DEBIAN-SPARC32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../sparc-linux-gnu{{/|\\\\}}crt1.o"
+// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../sparc-linux-gnu{{/|\\\\}}crti.o"
+// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9{{/|\\\\}}crtbegin.o"
+// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9"
+// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../sparc-linux-gnu"
+// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib"
+// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/lib/sparc-linux-gnu"
+// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib/sparc-linux-gnu"
+// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/lib"
+// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib"
+// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9{{/|\\\\}}crtend.o"
+// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../sparc-linux-gnu{{/|\\\\}}crtn.o"
+//
+// Check linker paths on Debian 8 / Sparc, with the oldstyle multilib packages
+// RUN: %clang -no-canonical-prefixes -m64 %s -### -o %t.o 2>&1 \
+// RUN: --target=sparc-linux-gnu \
+// RUN: --gcc-toolchain="" \
+// RUN: --sysroot=%S/Inputs/debian_8_sparc_multilib_tree \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC32-LIB64 %s
+// CHECK-DEBIAN-SPARC32-LIB64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib64{{/|\\\\}}crt1.o"
+// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib64{{/|\\\\}}crti.o"
+// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/64{{/|\\\\}}crtbegin.o"
+// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/64"
+// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib64"
+// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/lib/../lib64"
+// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib/../lib64"
+// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9"
+// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/lib"
+// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib"
+// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/64{{/|\\\\}}crtend.o"
+// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib64{{/|\\\\}}crtn.o"
+//
+// Check linker paths on Debian 8 / Sparc64
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=sparc64-linux-gnu \
+// RUN: --gcc-toolchain="" \
+// RUN: --sysroot=%S/Inputs/debian_8_sparc64_tree \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC64 %s
+// CHECK-DEBIAN-SPARC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../sparc64-linux-gnu{{/|\\\\}}crt1.o"
+// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../sparc64-linux-gnu{{/|\\\\}}crti.o"
+// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9{{/|\\\\}}crtbegin.o"
+// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9"
+// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../sparc64-linux-gnu"
+// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/lib/sparc64-linux-gnu"
+// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/lib/../lib64"
+// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib/sparc64-linux-gnu"
+// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../.."
+// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/lib"
+// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib"
+// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9{{/|\\\\}}crtend.o"
+// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../sparc64-linux-gnu{{/|\\\\}}crtn.o"
+//
// Test linker invocation on Android.
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=arm-linux-androideabi \
diff --git a/test/Driver/msvc-triple.c b/test/Driver/msvc-triple.c
new file mode 100644
index 000000000000..f181b3199a3f
--- /dev/null
+++ b/test/Driver/msvc-triple.c
@@ -0,0 +1,9 @@
+// RUN: %clang -target i686-pc-windows-msvc -S -emit-llvm %s -o - | FileCheck %s --check-prefix=DEFAULT
+// RUN: %clang -target i686-pc-windows-msvc19 -S -emit-llvm %s -o - | FileCheck %s --check-prefix=TARGET-19
+// RUN: %clang -target i686-pc-windows-msvc -S -emit-llvm %s -o - -fms-compatibility-version=19 | FileCheck %s --check-prefix=OVERRIDE-19
+// RUN: %clang -target i686-pc-windows-msvc-elf -S -emit-llvm %s -o - | FileCheck %s --check-prefix=ELF-DEFAULT
+
+// DEFAULT: target triple = "i686-pc-windows-msvc18.0.0"
+// TARGET-19: target triple = "i686-pc-windows-msvc19.0.0"
+// OVERRIDE-19: target triple = "i686-pc-windows-msvc19.0.0"
+// ELF-DEFAULT: target triple = "i686-pc-windows-msvc18.0.0-elf"
diff --git a/test/Driver/pic.c b/test/Driver/pic.c
index 3a14d61cf1c6..a515f8117a1d 100644
--- a/test/Driver/pic.c
+++ b/test/Driver/pic.c
@@ -220,6 +220,8 @@
// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
// RUN: %clang -c %s -target powerpc-unknown-openbsd -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIE2
+// RUN: %clang -c %s -target sparc-unknown-openbsd -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIE2
// RUN: %clang -c %s -target sparc64-unknown-openbsd -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIE2
// RUN: %clang -c %s -target i386-pc-openbsd -fno-pie -### 2>&1 \
diff --git a/test/Driver/windows-arm-minimal-arch.c b/test/Driver/windows-arm-minimal-arch.c
index cf55b8f99d0f..43d6ad8602a6 100644
--- a/test/Driver/windows-arm-minimal-arch.c
+++ b/test/Driver/windows-arm-minimal-arch.c
@@ -1,5 +1,5 @@
// RUN: not %clang -target thumbv5-windows -mcpu=arm10tdmi %s -o /dev/null 2>&1 \
// RUN: | FileCheck %s
-// CHECK: error: the target architecture 'thumbv5' is not supported by the target 'thumbv5--windows-msvc'
+// CHECK: error: the target architecture 'thumbv5' is not supported by the target 'thumbv5--windows-msvc
diff --git a/test/Format/style-on-command-line.cpp b/test/Format/style-on-command-line.cpp
index 007022e74461..2e757cc92a55 100644
--- a/test/Format/style-on-command-line.cpp
+++ b/test/Format/style-on-command-line.cpp
@@ -3,13 +3,11 @@
// RUN: clang-format -style="{BasedOnStyle: LLVM, IndentWidth: 7}" %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
// RUN: clang-format -style="{BasedOnStyle: invalid, IndentWidth: 7}" -fallback-style=LLVM %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK3 %s
// RUN: clang-format -style="{lsjd}" %t.cpp -fallback-style=LLVM 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK4 %s
-// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK5 %s
// RUN: printf "\n" > %T/.clang-format
// RUN: clang-format -style=file -fallback-style=webkit %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
-// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
-// RUN: [ ! -e %T/_clang-format ] || rm %T/_clang-format
+// RUN: rm %T/.clang-format
// RUN: printf "BasedOnStyle: google\nIndentWidth: 6\n" > %T/_clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK7 %s
// RUN: clang-format -style="{BasedOnStyle: LLVM, PointerBindsToType: true}" %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK8 %s
@@ -24,7 +22,6 @@ void f() {
// CHECK4: {{^ int \*i;$}}
// CHECK5: {{^ int\* i;$}}
// CHECK6: {{^Error reading .*\.clang-format: (I|i)nvalid argument}}
-// CHECK6: {{^Can't find usable .clang-format, using webkit style$}}
// CHECK6: {{^ int\* i;$}}
// CHECK7: {{^ int\* i;$}}
// CHECK8: {{^ int\* i;$}}
diff --git a/test/Frontend/source-col-map.c b/test/Frontend/source-col-map.c
index a14023bc82a8..ae69fbe565c3 100644
--- a/test/Frontend/source-col-map.c
+++ b/test/Frontend/source-col-map.c
@@ -1,4 +1,4 @@
-// RUN: not %clang_cc1 %s -fsyntax-only -fmessage-length 75 -o /dev/null 2>&1 | FileCheck %s -strict-whitespace
+// RUN: not %clang_cc1 -fsyntax-only -fmessage-length 75 -o /dev/null -x c < %s 2>&1 | FileCheck %s -strict-whitespace
// Test case for the text diagnostics source column conversion crash.
@@ -31,7 +31,8 @@ void test2(Unknown* b); // αααα αααα αααα αααα αααα αααÎ
void test3() {
/* αααα αααα αααα αααα αααα αααα αααα αααα αααα αααα */ printf("%d", "s");
}
-// CHECK: format specifies type 'int' but the argument has type 'char *'
+// CHECK: format specifies type 'int' but the argument has
+// CHECK: type 'char *'
// CHECK-NEXT: ...αααα αααα αααα αααα αααα αααα αααα αααα αααα */ printf("%d", "s");
// CHECK-NEXT: {{^ ~~ \^~~$}}
// CHECK-NEXT: {{^ %s$}}
diff --git a/test/Headers/altivec-intrin.c b/test/Headers/altivec-intrin.c
index 1577d7e566c5..7e6ea0098740 100644
--- a/test/Headers/altivec-intrin.c
+++ b/test/Headers/altivec-intrin.c
@@ -14,5 +14,5 @@ int main()
}
// FIXME: As noted in ms-intrin.cpp, it would be nice if we didn't have to
// hard-code the line number from altivec.h here.
-// expected-note@altivec.h:2514 {{deprecated here}}
-// expected-note@altivec.h:2649 {{deprecated here}}
+// expected-note@altivec.h:* {{deprecated here}}
+// expected-note@altivec.h:* {{deprecated here}}
diff --git a/test/Lexer/keywords_test.cpp b/test/Lexer/keywords_test.cpp
index 19a89c3d30f3..dd45b40edcab 100644
--- a/test/Lexer/keywords_test.cpp
+++ b/test/Lexer/keywords_test.cpp
@@ -1,10 +1,17 @@
// RUN: %clang_cc1 -std=c++03 -fsyntax-only %s
// RUN: %clang_cc1 -std=c++11 -DCXX11 -fsyntax-only %s
+// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -DCXX11 -DCONCEPTS -fsyntax-only %s
#define IS_KEYWORD(NAME) _Static_assert(!__is_identifier(NAME), #NAME)
#define NOT_KEYWORD(NAME) _Static_assert(__is_identifier(NAME), #NAME)
#define IS_TYPE(NAME) void is_##NAME##_type() { int f(NAME); }
+#ifdef CONCEPTS
+#define CONCEPTS_KEYWORD(NAME) IS_KEYWORD(NAME)
+#else
+#define CONCEPTS_KEYWORD(NAME) NOT_KEYWORD(NAME)
+#endif
+
#ifdef CXX11
#define CXX11_KEYWORD(NAME) IS_KEYWORD(NAME)
#define CXX11_TYPE(NAME) IS_TYPE(NAME)
@@ -27,6 +34,10 @@ CXX11_KEYWORD(noexcept);
CXX11_KEYWORD(static_assert);
CXX11_KEYWORD(thread_local);
+// Concepts TS keywords
+CONCEPTS_KEYWORD(concept);
+CONCEPTS_KEYWORD(requires);
+
// Clang extension
IS_KEYWORD(__char16_t);
IS_TYPE(__char16_t);
diff --git a/test/Modules/Inputs/template-default-args/a.h b/test/Modules/Inputs/template-default-args/a.h
new file mode 100644
index 000000000000..1ef1ea5907b5
--- /dev/null
+++ b/test/Modules/Inputs/template-default-args/a.h
@@ -0,0 +1,4 @@
+template<typename T = int> struct A {};
+template<typename T> struct B {};
+template<typename T> struct C;
+template<typename T> struct D;
diff --git a/test/Modules/Inputs/template-default-args/b.h b/test/Modules/Inputs/template-default-args/b.h
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Modules/Inputs/template-default-args/b.h
diff --git a/test/Modules/Inputs/template-default-args/module.modulemap b/test/Modules/Inputs/template-default-args/module.modulemap
new file mode 100644
index 000000000000..6182e6b3eee1
--- /dev/null
+++ b/test/Modules/Inputs/template-default-args/module.modulemap
@@ -0,0 +1 @@
+module X { module A { header "a.h" } module B { header "b.h" } }
diff --git a/test/Modules/template-default-args.cpp b/test/Modules/template-default-args.cpp
new file mode 100644
index 000000000000..63187b8dc190
--- /dev/null
+++ b/test/Modules/template-default-args.cpp
@@ -0,0 +1,22 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs/template-default-args -std=c++11 %s
+//
+// expected-no-diagnostics
+
+template<typename T> struct A;
+template<typename T> struct B;
+template<typename T> struct C;
+template<typename T = int> struct D;
+
+#include "b.h"
+
+template<typename T = int> struct A {};
+template<typename T> struct B {};
+template<typename T = int> struct B;
+template<typename T = int> struct C;
+template<typename T> struct D {};
+
+A<> a;
+B<> b;
+extern C<> c;
+D<> d;
diff --git a/test/Parser/pragma-loop.cpp b/test/Parser/pragma-loop.cpp
index 547d87395ef5..a0213ac50d5a 100644
--- a/test/Parser/pragma-loop.cpp
+++ b/test/Parser/pragma-loop.cpp
@@ -132,7 +132,7 @@ void test(int *List, int Length) {
/* expected-error {{missing argument; expected 'enable' or 'disable'}} */ #pragma clang loop vectorize()
/* expected-error {{missing argument; expected an integer value}} */ #pragma clang loop interleave_count()
-/* expected-error {{missing argument; expected 'enable' or 'disable'}} */ #pragma clang loop unroll()
+/* expected-error {{missing argument; expected 'full' or 'disable'}} */ #pragma clang loop unroll()
/* expected-error {{missing option; expected vectorize, vectorize_width, interleave, interleave_count, unroll, or unroll_count}} */ #pragma clang loop
/* expected-error {{invalid option 'badkeyword'}} */ #pragma clang loop badkeyword
diff --git a/test/Preprocessor/arm-target-features.c b/test/Preprocessor/arm-target-features.c
index 0dace434abb0..389877125d11 100644
--- a/test/Preprocessor/arm-target-features.c
+++ b/test/Preprocessor/arm-target-features.c
@@ -7,6 +7,7 @@
// CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1
// RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7 %s
+// RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7 %s
// CHECK-V7: __ARMEL__ 1
// CHECK-V7: __ARM_ARCH 7
// CHECK-V7: __ARM_ARCH_7A__ 1
@@ -137,8 +138,8 @@
// FPUNONE-A5-NOT:#define __ARM_NEON__ 1
// FPUNONE-A5-NOT:#define __ARM_VFPV4__ 1
-// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=vfp3-d16 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A5 %s
-// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=vfp3-d16 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A5 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=vfp4-d16 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A5 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=vfp4-d16 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A5 %s
// NONEON-A5-NOT:#define __ARM_NEON__ 1
// NONEON-A5:#define __ARM_VFPV4__ 1
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c
index 91ec4d77b5cc..e80d57b82cd8 100644
--- a/test/Preprocessor/init.c
+++ b/test/Preprocessor/init.c
@@ -2793,6 +2793,12 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-netbsd6 -target-feature +sse2 < /dev/null | FileCheck -check-prefix I386-NETBSD6-SSE %s
// I386-NETBSD6-SSE:#define __FLT_EVAL_METHOD__ 1
+// RUN: %clang_cc1 -E -dM -triple=i686-pc-mingw32 < /dev/null | FileCheck -check-prefix I386-DECLSPEC %s
+// RUN: %clang_cc1 -E -dM -fms-extensions -triple=i686-pc-mingw32 < /dev/null | FileCheck -check-prefix I386-DECLSPEC %s
+// RUN: %clang_cc1 -E -dM -triple=i686-unknown-cygwin < /dev/null | FileCheck -check-prefix I386-DECLSPEC %s
+// RUN: %clang_cc1 -E -dM -fms-extensions -triple=i686-unknown-cygwin < /dev/null | FileCheck -check-prefix I386-DECLSPEC %s
+// I386-DECLSPEC: #define __declspec
+
//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-none < /dev/null | FileCheck -check-prefix MIPS32BE %s
//
@@ -6845,10 +6851,10 @@
// SPARC:#define __INTMAX_MAX__ 9223372036854775807LL
// SPARC:#define __INTMAX_TYPE__ long long int
// SPARC:#define __INTMAX_WIDTH__ 64
-// SPARC:#define __INTPTR_FMTd__ "ld"
-// SPARC:#define __INTPTR_FMTi__ "li"
-// SPARC:#define __INTPTR_MAX__ 2147483647L
-// SPARC:#define __INTPTR_TYPE__ long int
+// SPARC:#define __INTPTR_FMTd__ "d"
+// SPARC:#define __INTPTR_FMTi__ "i"
+// SPARC:#define __INTPTR_MAX__ 2147483647
+// SPARC:#define __INTPTR_TYPE__ int
// SPARC:#define __INTPTR_WIDTH__ 32
// SPARC:#define __INT_FAST16_FMTd__ "hd"
// SPARC:#define __INT_FAST16_FMTi__ "hi"
@@ -6900,7 +6906,7 @@
// SPARC:#define __LONG_MAX__ 2147483647L
// SPARC-NOT:#define __LP64__
// SPARC:#define __POINTER_WIDTH__ 32
-// SPARC:#define __PTRDIFF_TYPE__ long int
+// SPARC:#define __PTRDIFF_TYPE__ int
// SPARC:#define __PTRDIFF_WIDTH__ 32
// SPARC:#define __REGISTER_PREFIX__
// SPARC:#define __SCHAR_MAX__ 127
@@ -6920,7 +6926,7 @@
// SPARC:#define __SIZEOF_WCHAR_T__ 4
// SPARC:#define __SIZEOF_WINT_T__ 4
// SPARC:#define __SIZE_MAX__ 4294967295U
-// SPARC:#define __SIZE_TYPE__ long unsigned int
+// SPARC:#define __SIZE_TYPE__ unsigned int
// SPARC:#define __SIZE_WIDTH__ 32
// SPARC:#define __UINT16_C_SUFFIX__ {{$}}
// SPARC:#define __UINT16_MAX__ 65535
@@ -6939,7 +6945,7 @@
// SPARC:#define __UINTMAX_TYPE__ long long unsigned int
// SPARC:#define __UINTMAX_WIDTH__ 64
// SPARC:#define __UINTPTR_MAX__ 4294967295U
-// SPARC:#define __UINTPTR_TYPE__ long unsigned int
+// SPARC:#define __UINTPTR_TYPE__ unsigned int
// SPARC:#define __UINTPTR_WIDTH__ 32
// SPARC:#define __UINT_FAST16_MAX__ 65535
// SPARC:#define __UINT_FAST16_TYPE__ unsigned short
@@ -6969,6 +6975,15 @@
// SPARC:#define __sparcv8 1
// SPARC:#define sparc 1
//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc-none-netbsd < /dev/null | FileCheck -check-prefix SPARC-NETBSD %s
+// SPARC-NETBSD:#define __INTPTR_FMTd__ "ld"
+// SPARC-NETBSD:#define __INTPTR_FMTi__ "li"
+// SPARC-NETBSD:#define __INTPTR_MAX__ 2147483647L
+// SPARC-NETBSD:#define __INTPTR_TYPE__ long int
+// SPARC-NETBSD:#define __PTRDIFF_TYPE__ long int
+// SPARC-NETBSD:#define __SIZE_TYPE__ long unsigned int
+// SPARC-NETBSD:#define __UINTPTR_TYPE__ long unsigned int
+
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=tce-none-none < /dev/null | FileCheck -check-prefix TCE %s
//
// TCE-NOT:#define _LP64
@@ -8346,6 +8361,10 @@
// PS4:#define __x86_64 1
// PS4:#define __x86_64__ 1
//
+// RUN: %clang_cc1 -E -dM -triple=x86_64-pc-mingw32 < /dev/null | FileCheck -check-prefix X86-64-DECLSPEC %s
+// RUN: %clang_cc1 -E -dM -fms-extensions -triple=x86_64-unknown-mingw32 < /dev/null | FileCheck -check-prefix X86-64-DECLSPEC %s
+// X86-64-DECLSPEC: #define __declspec
+//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-none-none < /dev/null | FileCheck -check-prefix SPARCV9 %s
// SPARCV9:#define __INT64_TYPE__ long int
// SPARCV9:#define __INTMAX_C_SUFFIX__ L
diff --git a/test/Profile/Inputs/func-entry.proftext b/test/Profile/Inputs/func-entry.proftext
new file mode 100644
index 000000000000..f7c2052035d4
--- /dev/null
+++ b/test/Profile/Inputs/func-entry.proftext
@@ -0,0 +1,10 @@
+foo
+0
+1
+1000
+
+main
+4
+2
+1
+10000
diff --git a/test/Profile/func-entry.c b/test/Profile/func-entry.c
new file mode 100644
index 000000000000..32c20a2a458e
--- /dev/null
+++ b/test/Profile/func-entry.c
@@ -0,0 +1,19 @@
+// Test that function entry counts are set correctly.
+
+// RUN: llvm-profdata merge %S/Inputs/func-entry.proftext -o %t.profdata
+// RUN: %clang %s -o - -mllvm -disable-llvm-optzns -emit-llvm -S -fprofile-instr-use=%t.profdata | FileCheck %s
+
+void foo(void);
+
+// CHECK: @foo() #0 !prof [[FOO:![0-9]+]]
+void foo() { return; }
+
+// CHECK: @main() #1 !prof [[MAIN:![0-9]+]]
+int main() {
+ int i;
+ for (i = 0; i < 10000; i++) foo();
+ return 0;
+}
+
+// CHECK: [[FOO]] = !{!"function_entry_count", i64 1000}
+// CHECK: [[MAIN]] = !{!"function_entry_count", i64 1}
diff --git a/test/Sema/PR16678.c b/test/Sema/PR16678.c
new file mode 100644
index 000000000000..a06d0a98ba2d
--- /dev/null
+++ b/test/Sema/PR16678.c
@@ -0,0 +1,153 @@
+// RUN: %clang_cc1 -DX32TYPE=ULONG -triple powerpc-unknown-linux-gnu -std=c89 -x c %s -verify
+// RUN: %clang_cc1 -DX32TYPE=ULONG -triple powerpc-unknown-linux-gnu -std=iso9899:199409 -x c %s -verify
+// RUN: %clang_cc1 -DX32TYPE=ULONG -triple powerpc-unknown-linux-gnu -std=c++98 -x c++ %s -verify
+// RUN: %clang_cc1 -DX32TYPE=LLONG -triple powerpc-unknown-linux-gnu -std=c99 -x c %s -verify
+// RUN: %clang_cc1 -DX32TYPE=LLONG -triple powerpc-unknown-linux-gnu -std=c11 -x c %s -verify
+// RUN: %clang_cc1 -DX32TYPE=LLONG -triple powerpc-unknown-linux-gnu -std=c++11 -x c++ %s -verify
+// RUN: %clang_cc1 -DX32TYPE=LLONG -triple powerpc-unknown-linux-gnu -std=c++1y -x c++ %s -verify
+// RUN: %clang_cc1 -DX32TYPE=LLONG -triple powerpc-unknown-linux-gnu -std=c++1z -x c++ %s -verify
+// RUN: %clang_cc1 -DX64TYPE=ULONG -triple powerpc64-unknown-linux-gnu -std=c89 -x c %s -verify
+// RUN: %clang_cc1 -DX64TYPE=ULONG -triple powerpc64-unknown-linux-gnu -std=iso9899:199409 -x c %s -verify
+// RUN: %clang_cc1 -DX64TYPE=ULONG -triple powerpc64-unknown-linux-gnu -std=c++98 -x c++ %s -verify
+// RUN: %clang_cc1 -DX64TYPE=ULLONG -triple powerpc64-unknown-linux-gnu -std=c99 -x c %s -verify
+// RUN: %clang_cc1 -DX64TYPE=ULLONG -triple powerpc64-unknown-linux-gnu -std=c11 -x c %s -verify
+// RUN: %clang_cc1 -DX64TYPE=ULLONG -triple powerpc64-unknown-linux-gnu -std=c++11 -x c++ %s -verify
+// RUN: %clang_cc1 -DX64TYPE=ULLONG -triple powerpc64-unknown-linux-gnu -std=c++1y -x c++ %s -verify
+// RUN: %clang_cc1 -DX64TYPE=ULLONG -triple powerpc64-unknown-linux-gnu -std=c++1z -x c++ %s -verify
+
+#ifdef X64TYPE
+#define X32TYPE long
+#endif
+
+#define IS_ULONG_ULONG 1
+#define IS_ULONG2(X) IS_ULONG_##X
+#define IS_ULONG(X) IS_ULONG2(X)
+
+#if !defined(X64TYPE) && !IS_ULONG(X32TYPE)
+// expected-no-diagnostics
+#endif
+
+typedef unsigned long ULONG;
+typedef long long LLONG;
+typedef unsigned long long ULLONG;
+
+
+/******************************************************************************
+ * Test 2^31 as a decimal literal with no suffix and with the "l" and "L" cases.
+ ******************************************************************************/
+extern X32TYPE x32;
+extern __typeof__(2147483648) x32;
+extern __typeof__(2147483648l) x32;
+extern __typeof__(2147483648L) x32;
+
+#if IS_ULONG(X32TYPE)
+#if !__cplusplus
+
+/******************************************************************************
+ * Under pre-C99 ISO C, unsigned long is attempted for decimal integer literals
+ * that do not have a suffix containing "u" or "U" if the literal does not fit
+ * within the range of int or long. See 6.1.3.2 paragraph 5.
+ ******************************************************************************/
+// expected-warning@39 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards}}
+// expected-warning@40 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards}}
+// expected-warning@41 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards}}
+#else
+
+/******************************************************************************
+ * Under pre-C++11 ISO C++, the same holds if the literal contains an "l" or "L"
+ * in its suffix; otherwise, the behavior is undefined. See 2.13.1 [lex.icon]
+ * paragraph 2.
+ ******************************************************************************/
+// expected-warning@39 {{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 have type 'long long' in C++11 onwards}}
+// expected-warning@40 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C++98; this literal will have type 'long long' in C++11 onwards}}
+// expected-warning@41 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C++98; this literal will have type 'long long' in C++11 onwards}}
+#endif
+#endif
+
+
+#ifdef X64TYPE
+
+/******************************************************************************
+ * Test 2^63 as a decimal literal with no suffix and with the "l" and "L" cases.
+ ******************************************************************************/
+extern X64TYPE x64;
+extern __typeof__(9223372036854775808) x64;
+extern __typeof__(9223372036854775808l) x64;
+extern __typeof__(9223372036854775808L) x64;
+
+#if IS_ULONG(X64TYPE)
+
+#if !__cplusplus
+
+/******************************************************************************
+ * Under pre-C99 ISO C, unsigned long is attempted for decimal integer literals
+ * that do not have a suffix containing "u" or "U" if the literal does not fit
+ * within the range of int or long. See 6.1.3.2 paragraph 5.
+ ******************************************************************************/
+// expected-warning@74 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will be ill-formed in C99 onwards}}
+// expected-warning@75 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will be ill-formed in C99 onwards}}
+// expected-warning@76 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will be ill-formed in C99 onwards}}
+#else
+
+/******************************************************************************
+ * Under pre-C++11 ISO C++, the same holds if the literal contains an "l" or "L"
+ * in its suffix; otherwise, the behavior is undefined. See 2.13.1 [lex.icon]
+ * paragraph 2.
+ ******************************************************************************/
+// expected-warning@74 {{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 be ill-formed in C++11 onwards}}
+// expected-warning@75 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C++98; this literal will be ill-formed in C++11 onwards}}
+// expected-warning@76 {{integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C++98; this literal will be ill-formed in C++11 onwards}}
+#endif
+#else
+
+/******************************************************************************
+ * The status quo in C99/C++11-and-later modes for the literals in question is
+ * to interpret them as unsigned as an extension.
+ ******************************************************************************/
+// expected-warning@74 {{integer literal is too large to be represented in a signed integer type, interpreting as unsigned}}
+// expected-warning@75 {{integer literal is too large to be represented in a signed integer type, interpreting as unsigned}}
+// expected-warning@76 {{integer literal is too large to be represented in a signed integer type, interpreting as unsigned}}
+#endif
+#endif
+
+
+/******************************************************************************
+ * Test preprocessor arithmetic with 2^31 as a decimal literal with no suffix
+ * and with the "l" and "L" cases.
+ ******************************************************************************/
+#if !IS_ULONG(X32TYPE)
+
+/******************************************************************************
+ * If the literal is signed without need for the modified range of the signed
+ * integer types within the controlling constant expression for conditional
+ * inclusion, then it will also be signed with said modified range.
+ ******************************************************************************/
+#define EXPR(X) ((X - X) - 1 < 0)
+#else
+
+/******************************************************************************
+ * Strictly speaking, in pre-C99/C++11 ISO C/C++, the preprocessor arithmetic is
+ * evaluated with the range of long/unsigned long; however, both Clang and GCC
+ * evaluate using 64-bits even when long/unsigned long are 32-bits outside of
+ * preprocessing.
+ *
+ * If the range used becomes 32-bits, then this test will enforce the treatment
+ * as unsigned of the literals in question.
+ *
+ * Note:
+ * Under pre-C99/C++11 ISO C/C++, whether the interpretation of the literal is
+ * affected by the modified range of the signed and unsigned integer types
+ * within the controlling constant expression for conditional inclusion is
+ * unclear.
+ ******************************************************************************/
+#define PP_LONG_MAX ((0ul - 1ul) >> 1)
+#define EXPR(X) \
+ (PP_LONG_MAX >= 0x80000000 || (X - X) - 1 > 0) // either 2^31 fits into a
+ // preprocessor "long" or the
+ // literals in question are
+ // unsigned
+#endif
+
+#if !(EXPR(2147483648) && EXPR(2147483648l) && EXPR(2147483648L))
+#error Unexpected signedness or conversion behavior
+#endif
diff --git a/test/Sema/asm.c b/test/Sema/asm.c
index 6c6f3f398e33..1a1e02993a72 100644
--- a/test/Sema/asm.c
+++ b/test/Sema/asm.c
@@ -204,3 +204,20 @@ void fn6() {
: "=rm"(a), "=rm"(a)
: "11m"(a)) // expected-error {{invalid input constraint '11m' in asm}}
}
+
+// PR14269
+typedef struct test16_foo {
+ unsigned int field1 : 1;
+ unsigned int field2 : 2;
+ unsigned int field3 : 3;
+} test16_foo;
+test16_foo x;
+void test16()
+{
+ __asm__("movl $5, %0"
+ : "=rm" (x.field2)); // expected-error {{reference to a bit-field in asm output with a memory constraint '=rm'}}
+ __asm__("movl $5, %0"
+ :
+ : "m" (x.field3)); // expected-error {{reference to a bit-field in asm input with a memory constraint 'm'}}
+}
+
diff --git a/test/Sema/ast-print-x86.c b/test/Sema/ast-print-x86.c
new file mode 100644
index 000000000000..0059776b3dc1
--- /dev/null
+++ b/test/Sema/ast-print-x86.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple i686-elf %s -ast-print | FileCheck %s
+
+// REQUIRES: x86-registered-target
+
+void assembly() {
+ int added;
+ // CHECK: asm volatile ("addl %%ebx,%%eax" : "=a" (added) : "a" (1), "b" (2));
+ __asm__ __volatile__("addl %%ebx,%%eax" : "=a" (added) : "a" (1), "b" (2) );
+}
diff --git a/test/Sema/ast-print.c b/test/Sema/ast-print.c
index 4b2b43190d42..b4d76844fef7 100644
--- a/test/Sema/ast-print.c
+++ b/test/Sema/ast-print.c
@@ -45,3 +45,11 @@ typedef struct {
// CHECK: struct __attribute__((visibility("default"))) S;
struct __attribute__((visibility("default"))) S;
+
+struct pair_t {
+ int a;
+ int b;
+};
+
+// CHECK: struct pair_t p = {a: 3, .b = 4};
+struct pair_t p = {a: 3, .b = 4};
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c
index 883cced9f3b0..5f5b6f3dc198 100644
--- a/test/Sema/const-eval.c
+++ b/test/Sema/const-eval.c
@@ -134,3 +134,6 @@ EVAL_EXPR(50, &Test50 < (struct Test50S*)((unsigned)&Test50 + 10)) // expected-e
// <rdar://problem/11874571>
EVAL_EXPR(51, 0 != (float)1e99)
+
+// PR21945
+void PR21945() { int i = (({}), 0l); }
diff --git a/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp b/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp
index 0c7d354c3065..bfda837e9590 100644
--- a/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp
+++ b/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp
@@ -6,3 +6,9 @@ enum ENUM; // expected-warning {{forward references to 'enum' types are a Micros
ENUM *var = 0;
ENUM var2 = (ENUM)3;
enum ENUM1* var3 = 0;// expected-warning {{forward references to 'enum' types are a Microsoft extension}}
+
+typedef void (*FnPtrTy)();
+void (*PR23733_1)() = static_cast<FnPtrTy>((void *)0); // expected-warning {{static_cast between pointer-to-function and pointer-to-object is a Microsoft extension}}
+void (*PR23733_2)() = FnPtrTy((void *)0);
+void (*PR23733_3)() = (FnPtrTy)((void *)0);
+void (*PR23733_4)() = reinterpret_cast<FnPtrTy>((void *)0);
diff --git a/test/SemaCXX/attr-noreturn.cpp b/test/SemaCXX/attr-noreturn.cpp
index 41214c4f4b45..6df008dffa81 100644
--- a/test/SemaCXX/attr-noreturn.cpp
+++ b/test/SemaCXX/attr-noreturn.cpp
@@ -17,6 +17,154 @@ namespace test5 {
}
}
+namespace destructor_tests {
+ __attribute__((noreturn)) void fail();
+
+ struct A {
+ ~A() __attribute__((noreturn)) { fail(); }
+ };
+ struct B {
+ B() {}
+ ~B() __attribute__((noreturn)) { fail(); }
+ };
+ struct C : A {};
+ struct D : B {};
+ struct E : virtual A {};
+ struct F : A, virtual B {};
+ struct G : E {};
+ struct H : virtual D {};
+ struct I : A {};
+ struct J : I {};
+ struct K : virtual A {};
+ struct L : K {};
+ struct M : virtual C {};
+ struct N : M {};
+ struct O { N n; };
+
+ __attribute__((noreturn)) void test_1() { A a; }
+ __attribute__((noreturn)) void test_2() { B b; }
+ __attribute__((noreturn)) void test_3() { C c; }
+ __attribute__((noreturn)) void test_4() { D d; }
+ __attribute__((noreturn)) void test_5() { E e; }
+ __attribute__((noreturn)) void test_6() { F f; }
+ __attribute__((noreturn)) void test_7() { G g; }
+ __attribute__((noreturn)) void test_8() { H h; }
+ __attribute__((noreturn)) void test_9() { I i; }
+ __attribute__((noreturn)) void test_10() { J j; }
+ __attribute__((noreturn)) void test_11() { K k; }
+ __attribute__((noreturn)) void test_12() { L l; }
+ __attribute__((noreturn)) void test_13() { M m; }
+ __attribute__((noreturn)) void test_14() { N n; }
+ __attribute__((noreturn)) void test_15() { O o; }
+
+ __attribute__((noreturn)) void test_16() { const A& a = A(); }
+ __attribute__((noreturn)) void test_17() { const B& b = B(); }
+ __attribute__((noreturn)) void test_18() { const C& c = C(); }
+ __attribute__((noreturn)) void test_19() { const D& d = D(); }
+ __attribute__((noreturn)) void test_20() { const E& e = E(); }
+ __attribute__((noreturn)) void test_21() { const F& f = F(); }
+ __attribute__((noreturn)) void test_22() { const G& g = G(); }
+ __attribute__((noreturn)) void test_23() { const H& h = H(); }
+ __attribute__((noreturn)) void test_24() { const I& i = I(); }
+ __attribute__((noreturn)) void test_25() { const J& j = J(); }
+ __attribute__((noreturn)) void test_26() { const K& k = K(); }
+ __attribute__((noreturn)) void test_27() { const L& l = L(); }
+ __attribute__((noreturn)) void test_28() { const M& m = M(); }
+ __attribute__((noreturn)) void test_29() { const N& n = N(); }
+ __attribute__((noreturn)) void test_30() { const O& o = O(); }
+
+ struct AA {};
+ struct BB { BB() {} ~BB() {} };
+ struct CC : AA {};
+ struct DD : BB {};
+ struct EE : virtual AA {};
+ struct FF : AA, virtual BB {};
+ struct GG : EE {};
+ struct HH : virtual DD {};
+ struct II : AA {};
+ struct JJ : II {};
+ struct KK : virtual AA {};
+ struct LL : KK {};
+ struct MM : virtual CC {};
+ struct NN : MM {};
+ struct OO { NN n; };
+
+ __attribute__((noreturn)) void test_31() {
+ AA a;
+ BB b;
+ CC c;
+ DD d;
+ EE e;
+ FF f;
+ GG g;
+ HH h;
+ II i;
+ JJ j;
+ KK k;
+ LL l;
+ MM m;
+ NN n;
+ OO o;
+
+ const AA& aa = AA();
+ const BB& bb = BB();
+ const CC& cc = CC();
+ const DD& dd = DD();
+ const EE& ee = EE();
+ const FF& ff = FF();
+ const GG& gg = GG();
+ const HH& hh = HH();
+ const II& ii = II();
+ const JJ& jj = JJ();
+ const KK& kk = KK();
+ const LL& ll = LL();
+ const MM& mm = MM();
+ const NN& nn = NN();
+ const OO& oo = OO();
+ } // expected-warning {{function declared 'noreturn' should not return}}
+
+ struct P {
+ ~P() __attribute__((noreturn)) { fail(); }
+ void foo() {}
+ };
+ struct Q : P { };
+ __attribute__((noreturn)) void test31() {
+ P().foo();
+ }
+ __attribute__((noreturn)) void test32() {
+ Q().foo();
+ }
+
+ struct R {
+ A a[5];
+ };
+ __attribute__((noreturn)) void test33() {
+ R r;
+ }
+
+ // FIXME: Code flow analysis does not preserve information about non-null
+ // pointers, so it can't determine that this function is noreturn.
+ __attribute__((noreturn)) void test34() {
+ A *a = new A;
+ delete a;
+ } // expected-warning {{function declared 'noreturn' should not return}}
+
+ struct S {
+ virtual ~S();
+ };
+ struct T : S {
+ __attribute__((noreturn)) ~T();
+ };
+
+ // FIXME: Code flow analysis does not preserve information about non-null
+ // pointers or derived class pointers, so it can't determine that this
+ // function is noreturn.
+ __attribute__((noreturn)) void test35() {
+ S *s = new T;
+ delete s;
+ } // expected-warning {{function declared 'noreturn' should not return}}
+}
+
// PR5620
void f0() __attribute__((__noreturn__));
void f1(void (*)());
diff --git a/test/SemaCXX/cxx11-gnu-attrs.cpp b/test/SemaCXX/cxx11-gnu-attrs.cpp
index ac9cc55b9fcb..d20617815e6a 100644
--- a/test/SemaCXX/cxx11-gnu-attrs.cpp
+++ b/test/SemaCXX/cxx11-gnu-attrs.cpp
@@ -8,6 +8,19 @@ int [[gnu::unused]] attr_on_type;
// expected-error@-1 {{'unused' attribute cannot be applied to types}}
int *[[gnu::unused]] attr_on_ptr;
// expected-warning@-1 {{attribute 'unused' ignored, because it cannot be applied to a type}}
+[[gnu::fastcall]] void pr17424_1();
+// expected-warning@-1 {{calling convention 'fastcall' ignored for this target}}
+[[gnu::fastcall]] [[gnu::stdcall]] void pr17424_2();
+// expected-warning@-1 {{calling convention 'fastcall' ignored for this target}}
+// expected-warning@-2 {{calling convention 'stdcall' ignored for this target}}
+[[gnu::fastcall]] __stdcall void pr17424_3();
+// expected-warning@-1 {{calling convention 'fastcall' ignored for this target}}
+// expected-warning@-2 {{calling convention '__stdcall' ignored for this target}}
+[[gnu::fastcall]] void pr17424_4() [[gnu::stdcall]];
+// expected-warning@-1 {{calling convention 'fastcall' ignored for this target}}
+// expected-warning@-2 {{attribute 'stdcall' ignored, because it cannot be applied to a type}}
+void pr17424_5 [[gnu::fastcall]]();
+// expected-warning@-1 {{calling convention 'fastcall' ignored for this target}}
// Valid cases.
diff --git a/test/SemaCXX/dllexport.cpp b/test/SemaCXX/dllexport.cpp
index e41952562c88..badb9e259597 100644
--- a/test/SemaCXX/dllexport.cpp
+++ b/test/SemaCXX/dllexport.cpp
@@ -439,21 +439,17 @@ class __declspec(dllexport) DerivedFromExportedTemplate : public ExportedClassTe
// ImportedTemplate is explicitly imported.
class __declspec(dllexport) DerivedFromImportedTemplate : public ImportedClassTemplate<int> {};
-#ifdef MS
-// expected-note@+4{{class template 'ClassTemplate<double>' was instantiated here}}
-// expected-warning@+4{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
-// expected-note@+3{{attribute is here}}
-#endif
class DerivedFromTemplateD : public ClassTemplate<double> {};
+// Base class previously implicitly instantiated without attribute; it will get propagated.
class __declspec(dllexport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
-#ifdef MS
-// expected-note@+4{{class template 'ClassTemplate<bool>' was instantiated here}}
-// expected-warning@+4{{propagating dll attribute to already instantiated base class template with different dll attribute is not supported}}
-// expected-note@+3{{attribute is here}}
-#endif
-class __declspec(dllimport) DerivedFromTemplateB : public ClassTemplate<bool> {};
-class __declspec(dllexport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
+// Base class has explicit instantiation declaration; the attribute will get propagated.
+extern template class ClassTemplate<float>;
+class __declspec(dllexport) DerivedFromTemplateF : public ClassTemplate<float> {};
+
+class __declspec(dllexport) DerivedFromTemplateB : public ClassTemplate<bool> {};
+// The second derived class doesn't change anything, the attribute that was propagated first wins.
+class __declspec(dllimport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
#ifdef MS
// expected-warning@+3{{propagating dll attribute to explicitly specialized base class template without dll attribute is not supported}}
@@ -479,6 +475,10 @@ struct __declspec(dllexport) DerivedFromExplicitlyExportInstantiatedTemplate : p
// Base class already instantiated with import attribute.
struct __declspec(dllexport) DerivedFromExplicitlyImportInstantiatedTemplate : public ExplicitlyImportInstantiatedTemplate<int> {};
+template <typename T> struct ExplicitInstantiationDeclTemplateBase { void func() {} };
+extern template struct ExplicitInstantiationDeclTemplateBase<int>;
+struct __declspec(dllexport) DerivedFromExplicitInstantiationDeclTemplateBase : public ExplicitInstantiationDeclTemplateBase<int> {};
+
//===----------------------------------------------------------------------===//
// Precedence
diff --git a/test/SemaCXX/dllimport.cpp b/test/SemaCXX/dllimport.cpp
index 6052ea1feef9..0f616d43c89d 100644
--- a/test/SemaCXX/dllimport.cpp
+++ b/test/SemaCXX/dllimport.cpp
@@ -1274,21 +1274,17 @@ class __declspec(dllimport) DerivedFromImportedTemplate : public ImportedClassTe
// ExportedClassTemplate is explicitly exported.
class __declspec(dllimport) DerivedFromExportedTemplate : public ExportedClassTemplate<int> {};
-#ifdef MS
-// expected-note@+4{{class template 'ClassTemplate<double>' was instantiated here}}
-// expected-warning@+4{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
-// expected-note@+3{{attribute is here}}
-#endif
class DerivedFromTemplateD : public ClassTemplate<double> {};
+// Base class previously implicitly instantiated without attribute; it will get propagated.
class __declspec(dllimport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
-#ifdef MS
-// expected-note@+4{{class template 'ClassTemplate<bool>' was instantiated here}}
-// expected-warning@+4{{propagating dll attribute to already instantiated base class template with different dll attribute is not supported}}
-// expected-note@+3{{attribute is here}}
-#endif
-class __declspec(dllexport) DerivedFromTemplateB : public ClassTemplate<bool> {};
-class __declspec(dllimport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
+// Base class has explicit instantiation declaration; the attribute will get propagated.
+extern template class ClassTemplate<float>;
+class __declspec(dllimport) DerivedFromTemplateF : public ClassTemplate<float> {};
+
+class __declspec(dllimport) DerivedFromTemplateB : public ClassTemplate<bool> {};
+// The second derived class doesn't change anything, the attribute that was propagated first wins.
+class __declspec(dllexport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
template <typename T> struct ExplicitlySpecializedTemplate { void func() {} };
#ifdef MS
@@ -1333,3 +1329,7 @@ struct __declspec(dllimport) DerivedFromExplicitlyExportInstantiatedTemplate : p
// Base class already instantiated with import attribute.
struct __declspec(dllimport) DerivedFromExplicitlyImportInstantiatedTemplate : public ExplicitlyImportInstantiatedTemplate<int> {};
+
+template <typename T> struct ExplicitInstantiationDeclTemplateBase { void func() {} };
+extern template struct ExplicitInstantiationDeclTemplateBase<int>;
+struct __declspec(dllimport) DerivedFromExplicitInstantiationDeclTemplateBase : public ExplicitInstantiationDeclTemplateBase<int> {};
diff --git a/tools/clang-format/clang-format.py b/tools/clang-format/clang-format.py
index 56a6e5d86bf4..49ca773b049d 100644
--- a/tools/clang-format/clang-format.py
+++ b/tools/clang-format/clang-format.py
@@ -85,6 +85,8 @@ def main():
for op in reversed(sequence.get_opcodes()):
if op[0] is not 'equal':
vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]
+ if output.get('IncompleteFormat'):
+ print 'clang-format: incomplete (syntax errors)'
vim.command('goto %d' % (output['Cursor'] + 1))
main()
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp
index 6feffa8a63d5..f73d07bd0be9 100644
--- a/tools/driver/cc1as_main.cpp
+++ b/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/tools/libclang/CXType.cpp b/tools/libclang/CXType.cpp
index 015dd6e57af0..1318e86b5553 100644
--- a/tools/libclang/CXType.cpp
+++ b/tools/libclang/CXType.cpp
@@ -490,7 +490,7 @@ CXString clang_getTypeKindSpelling(enum CXTypeKind K) {
}
unsigned clang_equalTypes(CXType A, CXType B) {
- return A.data[0] == B.data[0] && A.data[1] == B.data[1];;
+ return A.data[0] == B.data[0] && A.data[1] == B.data[1];
}
unsigned clang_isFunctionTypeVariadic(CXType X) {
diff --git a/unittests/AST/DeclPrinterTest.cpp b/unittests/AST/DeclPrinterTest.cpp
index 070b4daabb8f..d8cb97709229 100644
--- a/unittests/AST/DeclPrinterTest.cpp
+++ b/unittests/AST/DeclPrinterTest.cpp
@@ -157,6 +157,17 @@ public:
"input.cc");
}
+::testing::AssertionResult
+PrintedDeclCXX1ZMatches(StringRef Code, const DeclarationMatcher &NodeMatch,
+ StringRef ExpectedPrinted) {
+ std::vector<std::string> Args(1, "-std=c++1z");
+ return PrintedDeclMatches(Code,
+ Args,
+ NodeMatch,
+ ExpectedPrinted,
+ "input.cc");
+}
+
::testing::AssertionResult PrintedDeclObjCMatches(
StringRef Code,
const DeclarationMatcher &NodeMatch,
@@ -1264,6 +1275,13 @@ TEST(DeclPrinter, TestTemplateArgumentList15) {
// Should be: with semicolon
}
+TEST(DeclPrinter, TestStaticAssert1) {
+ ASSERT_TRUE(PrintedDeclCXX1ZMatches(
+ "static_assert(true);",
+ staticAssertDecl().bind("id"),
+ "static_assert(true)"));
+}
+
TEST(DeclPrinter, TestObjCMethod1) {
ASSERT_TRUE(PrintedDeclObjCMatches(
"__attribute__((objc_root_class)) @interface X\n"
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 1c100c3b9b06..c4aa712ba1d5 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1337,6 +1337,16 @@ TEST_F(FormatTest, SplitsLongCxxComments) {
"// one line",
format("// A comment that doesn't fit on one line",
getLLVMStyleWithColumns(20)));
+ EXPECT_EQ("/// A comment that\n"
+ "/// doesn't fit on\n"
+ "/// one line",
+ format("/// A comment that doesn't fit on one line",
+ getLLVMStyleWithColumns(20)));
+ EXPECT_EQ("//! A comment that\n"
+ "//! doesn't fit on\n"
+ "//! one line",
+ format("//! A comment that doesn't fit on one line",
+ getLLVMStyleWithColumns(20)));
EXPECT_EQ("// a b c d\n"
"// e f g\n"
"// h i j k",
@@ -1357,6 +1367,12 @@ TEST_F(FormatTest, SplitsLongCxxComments) {
EXPECT_EQ("// Add leading\n"
"// whitespace",
format("//Add leading whitespace", getLLVMStyleWithColumns(20)));
+ EXPECT_EQ("/// Add leading\n"
+ "/// whitespace",
+ format("///Add leading whitespace", getLLVMStyleWithColumns(20)));
+ EXPECT_EQ("//! Add leading\n"
+ "//! whitespace",
+ format("//!Add leading whitespace", getLLVMStyleWithColumns(20)));
EXPECT_EQ("// whitespace", format("//whitespace", getLLVMStyle()));
EXPECT_EQ("// Even if it makes the line exceed the column\n"
"// limit",
@@ -3956,6 +3972,9 @@ TEST_F(FormatTest, TrailingReturnType) {
verifyFormat("auto SomeFunction(A aaaaaaaaaaaaaaaaaaaaa) const\n"
" -> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}");
verifyFormat("auto doSomething(Aaaaaa *aaaaaa) -> decltype(aaaaaa->f()) {}");
+ verifyFormat("template <typename T>\n"
+ "auto aaaaaaaaaaaaaaaaaaaaaa(T t)\n"
+ " -> decltype(eaaaaaaaaaaaaaaa<T>(t.a).aaaaaaaa());");
// Not trailing return types.
verifyFormat("void f() { auto a = b->c(); }");
@@ -4965,6 +4984,9 @@ TEST_F(FormatTest, AlignsPipes) {
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
" aaaaaaaaaaaaaaaaaaaaa)\n"
" << aaaaaaaaaaaaaaaaaaaaaaaaaa;");
+ verifyFormat("LOG_IF(aaa == //\n"
+ " bbb)\n"
+ " << a << b;");
// Breaking before the first "<<" is generally not desirable.
verifyFormat(
@@ -6603,6 +6625,7 @@ TEST_F(FormatTest, UnderstandContextOfRecordTypeKeywords) {
// FIXME: This is still incorrectly handled at the formatter side.
verifyFormat("template <> struct X < 15, i<3 && 42 < 50 && 33 < 28> {};");
+ verifyFormat("int i = SomeFunction(a<b, a> b);");
// FIXME:
// This now gets parsed incorrectly as class definition.
@@ -7585,9 +7608,9 @@ TEST_F(FormatTest, ObjCArrayLiterals) {
" index:(NSUInteger)index\n"
" nonDigitAttributes:\n"
" (NSDictionary *)noDigitAttributes;");
- verifyFormat(
- "[someFunction someLooooooooooooongParameter:\n"
- " @[ NSBundle.mainBundle.infoDictionary[@\"a\"] ]];");
+ verifyFormat("[someFunction someLooooooooooooongParameter:@[\n"
+ " NSBundle.mainBundle.infoDictionary[@\"a\"]\n"
+ "]];");
}
TEST_F(FormatTest, ReformatRegionAdjustsIndent) {
diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp
index a06daac24ecf..efa845cd90be 100644
--- a/unittests/Format/FormatTestJS.cpp
+++ b/unittests/Format/FormatTestJS.cpp
@@ -151,6 +151,14 @@ TEST_F(FormatTestJS, ContainerLiterals) {
// Arrow functions in object literals.
verifyFormat("var x = {y: (a) => { return a; }};");
verifyFormat("var x = {y: (a) => a};");
+
+ // Computed keys.
+ verifyFormat("var x = {[a]: 1, b: 2, [c]: 3};");
+ verifyFormat("var x = {\n"
+ " [a]: 1,\n"
+ " b: 2,\n"
+ " [c]: 3,\n"
+ "};");
}
TEST_F(FormatTestJS, MethodsInObjectLiterals) {
@@ -239,6 +247,33 @@ TEST_F(FormatTestJS, FormatsFreestandingFunctions) {
"}");
}
+TEST_F(FormatTestJS, ArrayLiterals) {
+ verifyFormat(
+ "var aaaaa: List<SomeThing> =\n"
+ " [new SomeThingAAAAAAAAAAAA(), new SomeThingBBBBBBBBB()];");
+ verifyFormat("return [\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
+ " bbbbbbbbbbbbbbbbbbbbbbbbbbb,\n"
+ " ccccccccccccccccccccccccccc\n"
+ "];");
+ verifyFormat("var someVariable = SomeFuntion([\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
+ " bbbbbbbbbbbbbbbbbbbbbbbbbbb,\n"
+ " ccccccccccccccccccccccccccc\n"
+ "]);");
+ verifyFormat("var someVariable = SomeFuntion([\n"
+ " [aaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbb],\n"
+ "]);",
+ getGoogleJSStyleWithColumns(51));
+ verifyFormat("var someVariable = SomeFuntion(aaaa, [\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
+ " bbbbbbbbbbbbbbbbbbbbbbbbbbb,\n"
+ " ccccccccccccccccccccccccccc\n"
+ "]);");
+
+ verifyFormat("someFunction([], {a: a});");
+}
+
TEST_F(FormatTestJS, FunctionLiterals) {
verifyFormat("doFoo(function() {});");
verifyFormat("doFoo(function() { return 1; });");
@@ -322,6 +357,14 @@ TEST_F(FormatTestJS, FunctionLiterals) {
" doSomething();\n"
" doSomething();\n"
" }, this));");
+
+ // FIXME: This is bad, we should be wrapping before "function() {".
+ verifyFormat("someFunction(function() {\n"
+ " doSomething(); // break\n"
+ "})\n"
+ " .doSomethingElse(\n"
+ " // break\n"
+ " );");
}
TEST_F(FormatTestJS, InliningFunctionLiterals) {
@@ -440,7 +483,28 @@ TEST_F(FormatTestJS, ArrowFunctions) {
" return a;\n"
"};");
verifyFormat("var x = (a) => a;");
- verifyFormat("var x = (a) => a;");
+ verifyFormat("return () => [];");
+ verifyFormat("var aaaaaaaaaaaaaaaaaaaa = {\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaaaaa:\n"
+ " (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) =>\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
+ "};");
+ verifyFormat(
+ "var a = a.aaaaaaa((a: a) => aaaaaaaaaaaaaaaaaaaaa(bbbbbbbbb) &&\n"
+ " aaaaaaaaaaaaaaaaaaaaa(bbbbbbb));");
+ verifyFormat(
+ "var a = a.aaaaaaa((a: a) => aaaaaaaaaaaaaaaaaaaaa(bbbbbbbbb) ?\n"
+ " aaaaaaaaaaaaaaaaaaaaa(bbbbbbb) :\n"
+ " aaaaaaaaaaaaaaaaaaaaa(bbbbbbb));");
+
+ // FIXME: This is bad, we should be wrapping before "() => {".
+ verifyFormat("someFunction(() => {\n"
+ " doSomething(); // break\n"
+ "})\n"
+ " .doSomethingElse(\n"
+ " // break\n"
+ " );");
}
TEST_F(FormatTestJS, ReturnStatements) {
@@ -579,6 +643,15 @@ TEST_F(FormatTestJS, ClassDeclarations) {
verifyFormat("class C {\n static x(): string { return 'asd'; }\n}");
verifyFormat("class C extends P implements I {}");
verifyFormat("class C extends p.P implements i.I {}");
+
+ // ':' is not a type declaration here.
+ verifyFormat("class X {\n"
+ " subs = {\n"
+ " 'b': {\n"
+ " 'c': 1,\n"
+ " },\n"
+ " };\n"
+ "}");
}
TEST_F(FormatTestJS, InterfaceDeclarations) {
diff --git a/unittests/Tooling/RefactoringTest.cpp b/unittests/Tooling/RefactoringTest.cpp
index 7e643fa66d9b..6c2c16b484d7 100644
--- a/unittests/Tooling/RefactoringTest.cpp
+++ b/unittests/Tooling/RefactoringTest.cpp
@@ -281,6 +281,7 @@ public:
protected:
clang::SourceManager *SM;
+ clang::ASTContext *Context;
private:
class FindConsumer : public clang::ASTConsumer {
@@ -303,6 +304,7 @@ private:
CreateASTConsumer(clang::CompilerInstance &compiler,
llvm::StringRef dummy) override {
Visitor->SM = &compiler.getSourceManager();
+ Visitor->Context = &compiler.getASTContext();
/// TestConsumer will be deleted by the framework calling us.
return llvm::make_unique<FindConsumer>(Visitor);
}
@@ -368,6 +370,29 @@ TEST(Replacement, TemplatedFunctionCall) {
expectReplacementAt(CallToF.Replace, "input.cc", 43, 8);
}
+class NestedNameSpecifierAVisitor
+ : public TestVisitor<NestedNameSpecifierAVisitor> {
+public:
+ bool TraverseNestedNameSpecifierLoc(NestedNameSpecifierLoc NNSLoc) {
+ if (NNSLoc.getNestedNameSpecifier()) {
+ if (const NamespaceDecl* NS = NNSLoc.getNestedNameSpecifier()->getAsNamespace()) {
+ if (NS->getName() == "a") {
+ Replace = Replacement(*SM, &NNSLoc, "", Context->getLangOpts());
+ }
+ }
+ }
+ return TestVisitor<NestedNameSpecifierAVisitor>::TraverseNestedNameSpecifierLoc(
+ NNSLoc);
+ }
+ Replacement Replace;
+};
+
+TEST(Replacement, ColonColon) {
+ NestedNameSpecifierAVisitor VisitNNSA;
+ EXPECT_TRUE(VisitNNSA.runOver("namespace a { void f() { ::a::f(); } }"));
+ expectReplacementAt(VisitNNSA.Replace, "input.cc", 25, 5);
+}
+
TEST(Range, overlaps) {
EXPECT_TRUE(Range(10, 10).overlapsWith(Range(0, 11)));
EXPECT_TRUE(Range(0, 11).overlapsWith(Range(10, 10)));
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index e6c6d85acd60..11a766c7a4e9 100644
--- a/utils/TableGen/ClangAttrEmitter.cpp
+++ b/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/utils/TableGen/ClangCommentCommandInfoEmitter.cpp b/utils/TableGen/ClangCommentCommandInfoEmitter.cpp
index 857b22e2f0b8..3349030466fc 100644
--- a/utils/TableGen/ClangCommentCommandInfoEmitter.cpp
+++ b/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/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp b/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
index 22c6226cfeb3..477bbc8aaa56 100644
--- a/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
+++ b/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/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp
index e039ae595607..7644ae2c04da 100644
--- a/utils/TableGen/NeonEmitter.cpp
+++ b/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();
}
diff --git a/utils/check_cfc/check_cfc.py b/utils/check_cfc/check_cfc.py
index 3def36eb62f4..c6ab9abf2352 100755
--- a/utils/check_cfc/check_cfc.py
+++ b/utils/check_cfc/check_cfc.py
@@ -213,16 +213,18 @@ def set_input_file(args, input_file):
def is_normal_compile(args):
"""Check if this is a normal compile which will output an object file rather
- than a preprocess or link."""
+ than a preprocess or link. args is a list of command line arguments."""
compile_step = '-c' in args
# Bitcode cannot be disassembled in the same way
bitcode = '-flto' in args or '-emit-llvm' in args
# Version and help are queries of the compiler and override -c if specified
query = '--version' in args or '--help' in args
+ # Options to output dependency files for make
+ dependency = '-M' in args or '-MM' in args
# Check if the input is recognised as a source file (this may be too
# strong a restriction)
input_is_valid = bool(get_input_file(args))
- return compile_step and not bitcode and not query and input_is_valid
+ return compile_step and not bitcode and not query and not dependency and input_is_valid
def run_step(command, my_env, error_on_failure):
"""Runs a step of the compilation. Reports failure as exception."""
@@ -282,12 +284,24 @@ class dash_s_no_change(WrapperCheck):
run_step(alternate_command, my_env,
"Error compiling with -via-file-asm")
- # Compare disassembly (returns first diff if differs)
- difference = obj_diff.compare_object_files(self._output_file_a,
- output_file_b)
- if difference:
- raise WrapperCheckException(
- "Code difference detected with -S\n{}".format(difference))
+ # Compare if object files are exactly the same
+ exactly_equal = obj_diff.compare_exact(self._output_file_a, output_file_b)
+ if not exactly_equal:
+ # Compare disassembly (returns first diff if differs)
+ difference = obj_diff.compare_object_files(self._output_file_a,
+ output_file_b)
+ if difference:
+ raise WrapperCheckException(
+ "Code difference detected with -S\n{}".format(difference))
+
+ # Code is identical, compare debug info
+ dbgdifference = obj_diff.compare_debug_info(self._output_file_a,
+ output_file_b)
+ if dbgdifference:
+ raise WrapperCheckException(
+ "Debug info difference detected with -S\n{}".format(dbgdifference))
+
+ raise WrapperCheckException("Object files not identical with -S\n")
# Clean up temp file if comparison okay
os.remove(output_file_b)
@@ -367,7 +381,7 @@ if __name__ == '__main__':
checker.perform_check(arguments_a, my_env)
except WrapperCheckException as e:
# Check failure
- print(e.msg, file=sys.stderr)
+ print("{} {}".format(get_input_file(arguments_a), e.msg), file=sys.stderr)
# Remove file to comply with build system expectations (no
# output file if failed)
diff --git a/utils/check_cfc/obj_diff.py b/utils/check_cfc/obj_diff.py
index 6f932b3172da..cc4c2a97d5e5 100755
--- a/utils/check_cfc/obj_diff.py
+++ b/utils/check_cfc/obj_diff.py
@@ -4,6 +4,7 @@ from __future__ import print_function
import argparse
import difflib
+import filecmp
import os
import subprocess
import sys
@@ -26,6 +27,15 @@ def disassemble(objfile):
sys.exit(1)
return filter(keep_line, out.split(os.linesep))
+def dump_debug(objfile):
+ """Dump all of the debug info from a file."""
+ p = subprocess.Popen([disassembler, '-WliaprmfsoRt', objfile], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ (out, err) = p.communicate()
+ if p.returncode or err:
+ print("Dump debug failed: {}".format(objfile))
+ sys.exit(1)
+ return filter(keep_line, out.split(os.linesep))
+
def first_diff(a, b, fromfile, tofile):
"""Returns the first few lines of a difference, if there is one. Python
diff can be very slow with large objects and the most interesting changes
@@ -63,6 +73,22 @@ def compare_object_files(objfilea, objfileb):
disb = disassemble(objfileb)
return first_diff(disa, disb, objfilea, objfileb)
+def compare_debug_info(objfilea, objfileb):
+ """Compare debug info of two different files.
+ Allowing unavoidable differences, such as filenames.
+ Return the first difference if the debug info differs, or None.
+ If there are differences in the code, there will almost certainly be differences in the debug info too.
+ """
+ dbga = dump_debug(objfilea)
+ dbgb = dump_debug(objfileb)
+ return first_diff(dbga, dbgb, objfilea, objfileb)
+
+def compare_exact(objfilea, objfileb):
+ """Byte for byte comparison between object files.
+ Returns True if equal, False otherwise.
+ """
+ return filecmp.cmp(objfilea, objfileb)
+
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('objfilea', nargs=1)
diff --git a/utils/check_cfc/test_check_cfc.py b/utils/check_cfc/test_check_cfc.py
index 0eee5b83842b..e304ff59277d 100755
--- a/utils/check_cfc/test_check_cfc.py
+++ b/utils/check_cfc/test_check_cfc.py
@@ -103,6 +103,16 @@ class TestCheckCFC(unittest.TestCase):
check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--version']))
self.assertFalse(
check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--help']))
+ # Outputting dependency files is not a normal compile
+ self.assertFalse(
+ check_cfc.is_normal_compile(['clang', '-c', '-M', 'test.cpp']))
+ self.assertFalse(
+ check_cfc.is_normal_compile(['clang', '-c', '-MM', 'test.cpp']))
+ # Creating a dependency file as a side effect still outputs an object file
+ self.assertTrue(
+ check_cfc.is_normal_compile(['clang', '-c', '-MD', 'test.cpp']))
+ self.assertTrue(
+ check_cfc.is_normal_compile(['clang', '-c', '-MMD', 'test.cpp']))
def test_replace_output_file(self):
self.assertEqual(check_cfc.replace_output_file(